# huffman code

1.6k 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 for right) the minimum no of bits required to represent all the symbols together is??

a)1

b)2

c)3

d)4

0
Is it 3?
0
3 bits ?
0
2
A = 11

B = 101

C = 100

D = 01

E = 00

Hence to represent all symbols at least 3 bits are required.
0
How did you get 11 for A? Solving this one feels like I have to use my third eye.

a = "11"

b ="101"

c="100"

d="01"

e="00"

Total bits required to represent huffman code =12.

The average code length is 30*2+15*3+10*3+25*2+20*2 = 225.

## Related questions

1 vote
1
544 views
************ ****** 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 ... 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