DAA Question - Bank
DAA Question - Bank
NOTE: All the above questions solutions are available in Unit 1 ppts
Evaluate the total time required (i.e., O(n)) for execution of following program codes:
Total time = number of iterations * the running time of the statements inside the loop
a) for (int i = 0; i < = n; i++)
m = m + 1; //constant time c
Determine which is better expression from complexity point of view using principle of
mathematical induction
.
(10n+10) vs (0.01n2+10)
Determine the running time required for following recurrence relation. Use recursion tree
method for solving given relation.
T ( n )=4 T ( n2 )+ n n>1
NOTE: All the above problem based questions solutions are available in Unit 1 ppts
A= [ ]
1 3
5 7
B= [ ]
8 4
6 2
NOTE: Some of the problem based questions solutions are available in Unit 2 ppts
Explain the 4 Queen problem using backtracking based algorithm and suitable example.
What is a Hamiltonian Cycle. Define Hamiltanion path.
Describe the graph colouring problem with the help of folloing example:
Explain the 8 Queen problem using backtracking based algorithm and suitable example.
Given n=6, Weights = {5,10,12,13,15,18} and M=30. Find all possible subsets for which
sum = M. Draw the generated state space tree.
NOTE: Some of the above problem based questions solutions are available in Unit 3
ppts