Professional Documents
Culture Documents
Ada Unit - 5
Ada Unit - 5
13. Write Huffman code algorithm and Generate Huffman code for
following
Letters: A B C D E
Frequency: 24 12 10 8 8
14. Using greedy algorithm find an optimal schedule for following jobs
with n=6.
Profits: (P1,P2,P3,P4,P5,P6) = (20, 15, 10, 7, 5, 3)
Deadline: (d1,d2,d3,d4,d5,d6) =(3, 1, 1, 3, 1, 3)
15. Explain the difference between Greedy and Dynamic Algorithm.
16. Compute MST using PRIM’s Algorithm of following:
17. Find an optimal Huffman code for the following set of frequency. a : 50,
b: 20, c: 15, d: 30.
18. Consider Kanpsack capacity W=50, w=(10,20,40) and v=(60,80,100)
find the maximum profit using greedy approach.
19. Explain Dijkstra algorithm to find the shortest path.
20. Define Minimum Spanning Tree
**********