Design and Analysis of Algorithms Feb 2022
Design and Analysis of Algorithms Feb 2022
Design and Analysis of Algorithms Feb 2022
3. a) Write a recursive algorithm for binary search and also bring out its efficiency. [7M]
b) Apply Merge Sort to sort the list 𝑎[1,10] = (31,28,17,65,35,42. ,86,25,45,52). [7M]
Draw the tree of recursive calls of merge sort functions.
4. a) Use the greedy algorithm for sequencing unit time jobs with deadlines and [7M]
profits to generate the solution when 𝑛 = 7,
(𝑝1, 𝑝2, … 𝑝7) = (3, 5, 20, 18, 1, 6, 30),
and
(𝑑1, 𝑑2, … , 𝑑7) = (1, 3, 4, 3, 2, 1, 2).
b) What is a Spanning tree? Explain Prim’s Minimum cost spanning tree [7M]
algorithm with suitable example.
1 of 2
|''|'||||''|'''|||'|
Code No: R1632053 R16 SET - 1
2 of 2
|''|'||||''|'''|||'|