Design and Analysis of Algorithms-3
Design and Analysis of Algorithms-3
Instructions to Candidates :—
(1) Assume suitable data wherever necessary.
(2) All questions carry marks as indicated.
(b) State and explain the necessity of amortized analysis. Illustrate the process
with the help of binary counter. 5(CO1)
2. (a) Draw and split merge tree for the given sequences. Write algorithm for
recursive merge sort. How merge sort is different from quick sort ?
39, 9, 81, 45, 90, 27, 72, 18, 72, 50. 4(CO2)
(b) Multiply the given matrices A and B using Strassen's matrix multiplication
algorithm :
2 3 1 6 2 1 3 4
A = 3 1 5 0 B = 1 3 1 2
4 6 2 1 1 0 2 1
1 5 2 6 1 4 3 2 6(CO2)
4. (a) Find optimal solution for the given sequences. Also find the length of Longest
common subsequences.
String 1 : S U B S E Q U E N C E
String 2 : U S A M E N I C E 5(CO3)
(b) Using all pairs shortest path algorithm find the length of shortest path from
all vertices to all other vertices of the given graph.
5(CO3)
5. (a) Formulate at least two solutions for the 8 Queen's problems using backtracking.
What the constraint applicable to solve the problems ? 5(CO3)
6. (a) Clearly define the polynomial reduction process. Define NP complete and
NP hard problem with the help of polynomial reduction. Give an example.
6(CO4)
(b) Discuss vertex cover problem. Find the minimum size vertex cover in given
graph.
4(CO4)
KQLR/RS-24 / 1068 3 75