639401 Design and Analysis of Algorithms MAY 2024
639401 Design and Analysis of Algorithms MAY 2024
: ______________
Q.4 (a) Explain Activity selection problem and its solution using greedy 07
strategy.Solve below given example of Activity Selection problem.
Activity A1 A2 A3 A4 A5 A6
Start Time 7 1 3 0 5 8
Finish Time 9 2 4 2 8 10
(b) Describe Aggregate method applied on dynamic array for amortized analysis. 07
OR
(a) Explain Huffman code problem and its solution using greedy strategy.Find 07
the Huffman codes for the following characters
Characters a b c d e f
Frequency 38 15 19 20 27 11
(b) Describe Accounting method applied on dynamic array for amortized 07
analysis.
1/2
Q.5 (a) Explain Krushkal’s algorithm and apply the same on given figure A. 07
(b) Explain Dijkshtra’s algorithm for shortest path with example. 07
OR
(a) Explain Prim’s algorithm and apply the same on figure A. 07
(b) Explain Bellman Ford algorithm for shortest path with example. 07
Figure A.
************
2/2