recategorized by
1,356 views
1 votes
1 votes

RavindraBabu Ravula is trying to send a message to Anand. The following message is: 
GATE2018GAATTTEEEE22000011188
What is the average length of bits required for encoding each letter using Huffman coding___?

given solution :

My solution using min heap ?

I am also getting average length 89/29=3 but I am getting 3 bit code for each char.

I am confuse when to use min heap and is there other approach if any ?

In min heap what to do when two char have same frequency ,does we get more than one tree and hence  more than one solution?  

sorry if it is naive and already discussed 

recategorized by

Please log in or register to answer this question.

Related questions

0 votes
0 votes
1 answer
2
aaru14 asked Dec 2, 2017
6,383 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...
0 votes
0 votes
1 answer
3
reena_kandari asked Jan 10, 2017
369 views
0 votes
0 votes
2 answers
4