07-22-2014, 02:21 AM
CS502 Fundamentals of Algorithms Assignment No. 04 Solution and Discussion Fall 2014 Due Date 24th July 2014
Q.No.1
Let us suppose you have to give Money change for Rs.23 in Pakistani currency in minimum possible coins/currency notes. The denominations in the form of coins are 1, 2, 5 and currency notes of 10, 20, 50, 100, 500, 1000, and 5000.
You are required to solve this question by both Dynamic Programming as well as Greedy approach and find optimum value by calculating the required number of total coins/notes.
Q.No.2
Compute Huffman encoding for the following frequencies of the characters. Apply the greedy strategy and your goal is to draw the binary tree to produce Huffman Codes for the given frequencies.
Untitled.jpg (Size: 16.47 KB / Downloads: 475)
