Question Bank DAA-MTE
Question Bank DAA-MTE
Unit I
1 Examine whether 3n 3 + 2n+2 = O (n 3 ). Justify in detail.
4 Apply the Divide – And – Conquer for a recursive Merge sort algorithm and derive the
time complexity of this algorithm
5 Analyze the best, average and worst case efficiency with an example.
6 Differentiate between O(1) and O(n)? Is algorithm performance dependent on input size
(True/False) Justify your answer with a suitable example?
8 write about an Amortized analysis. Find Amortized cost with respect to stack operations
9 State whether the following functions are CORRECT or INCORRECT and justify your
answer.
(i) 3n+2=O(n)
(ii) 100n+6=O(n)
(iii) 10n2 +4n+2=O(n2)
Unit II
1 Apply divide and conquer algorithm to find max and min for given a list 22,
2 13, -5, -8, 15, 60, 17, 31, 47
3 Determine the solution for job sequencing with deadlines using greedy method where
number of jobs=5
4 Jobs J1 J2 J3 J4 J5
Profits 20 15 10 5 1
Deadlines 2 2 1 3 3
5 Define Knapsack problem. Solve the following 0/1 Knapsack problem using dynamic
programming Let n=3 , p={1,2,5), w=(2,3,4) and m=6
7 Apply the greedy algorithm strategy for sum of subset problem on given data
{3, 34, 4, 12, 5, 2}, sum = 9.
8 Illustrate Bellman ford algorithm with an example. Apply Bellman ford algorithm for
following example
9 Determine the minimum cost of single source shortest path for below graph
Unit III
1 Illustrate the 0/1 knapsack algorithm using dynamic programming with an example.
Justify the time complexity.
2 Define Knapsack problem. Solve the following 0/1 Knapsack problem using dynamic
programming Let n=3 , p={1,2,5), w=(2,3,4) and m=6
6 Determine the optimal binary search tree using dynamic programming for below given
data. values:{12,17,29,30,35} and frequency:{2,2,1,4,5}
8 Write and explain the multistage graph algorithm. Justify the time complexity
9 Examine the optimal binary search problem by using dynamic programming? Explain
with an example.
11 Apply dynamic programming for the following multistage graph to find the minimum
cost path from vertex 1 to vertex 12.