Thursday , 21 November 2024

CS301 Assignments # 3 Solution Spring 2012

Suppose you are given a string You will receive this message in two days, Use Huffman Encoding algorithm to create a binary tree with this string.

Solution Guidelines:

In step 1, You have to create a frequency table of characters along with their frequencies.

In step 2: You have to create Binary Tree from letters and their frequencies created in step 1.

/****************** Assignment No. 4 : Solution **********************\

Step 1:  Create Frequency table.

Letters Frequency
SP 7
A 2
C 1
D 1
E 5
G 1
H 1
I 4
L 2
M 1
N 1
O 2
R 1
S 4
T 2
U 1
V 1
W 2
Y 2


 Table 1: Frequency Table

Step 2: Draw Binary tree based on characters and their frequencies given in Table1, which is as follows:

/****************** DOWNLOAD SOLUTION FROM HERE **********************\

 


Spring 2012_CS301_4_SOL

Check Also

CS301 unSolved Final Term papers Mega Colletionction by Arslan Ali

      FINALTERM  EXAMINATION Spring 2010 CS301- Data Structures Time: 90 min Marks: 58 …

Leave a Reply

Your email address will not be published. Required fields are marked *

*