edited by
1,089 views
0 votes
0 votes

Alice needs to send a large message to Bob using only five words. Seeing that the message is too long she decides to compress the message using Huffman coding algorithm.

If the respective frequencies of words are given in the table, what would be the hamming code for w3 w1 w2 that she was supposed to use?

a  100011011

b   100011101

c  100001101

d  111011000

edited by

2 Answers

1 votes
1 votes
option b)  w3=1000 w1=11  w2=101.  

Hint : try with the two smallest frequency and then iterate for the next two and go on. now to the left branch assign 0 and right branch assign 1.
0 votes
0 votes
The following are hamming codes obtained by using Huffman coding algorithm:
w 4 = 0 w 3 = 1000
w 1 = 11 w 5 = 1001

w 2 = 101
∴ w 3 w 1 w 2 = 100011101

Related questions

0 votes
0 votes
1 answer
2
0 votes
0 votes
1 answer
3
Na462 asked Apr 30, 2018
4,405 views
Consider the following message:The number of bits required for huffman encoding of the above message are __________?My Strategy:- But the answer given is 52bits i used st...
0 votes
0 votes
1 answer
4
aaru14 asked Dec 2, 2017
6,444 views
question based on huffman coding for symbol A with probability 0.3 , B with 0.15 ,c with 0.1 ,D with 0.25 ,E with 0.2 (with the convention 0 labeled for left branch and 1...