Design and Analysis of Algorithms
Design and Analysis of Algorithms
Instructions to Candidates :—
(1) Assume suitable data wherever necessary.
(2) All questions carry marks as indicated.
2. (a) Discuss the drawbacks of traditional matrix multiplication over divide and
conquer matrix multiplication. Multiply the given matrices A and B using
Strassen's matrix multiplication algorithm :
A = ( ( 4
5
5
9
B = (2
1
10
6 ( 5(CO2)
(b) Write the algorithm to show how the merge function merges the two sorted
parts of the array A = [36 26 37 40 29 38 73 70 75 45].
5(CO2)
(b) Compute the optimal solution for job sequencing with deadlines using
greedy method. N = 4, Profits (p1, p2, p3, p4) = (100, 10, 15, 27),
Deadlines (d1, d2, d3, d4) = (2, 1, 2, 1). Also discuss the time complexity
of given algorithm. 5(CO2)
4. (a) Find optimal solution for the given sequences. Also find the length of Longest
common subsequences :
X = <A B C B D A B>
Y = <B D C A B A> 3(CO3)
(b) Find the solution to the travelling salesman problem for the graph whose
adjacency matrix shown below :
Vertex 1 2 3 4
1 0 5 2 3
2 2 0 4 1
3 6 3 0 5
4 2 1 6 0 7(CO3)
5. (a) Implement sum of subset algorithm on the following data using backtracking
formulation :
W = {15, 5, 10, 20}
M = 30 5(CO3)
5(CO3)
WYXZ/MS-23 / 1744 3 25