in Algorithms edited by
4,534 views
5 votes
5 votes

Huffman tree is constructed for the following data :$\{A,B,C,D,E\}$ with frequency $\{0.17,0.11,0.24,0.33\ \text{and} \ 0.15 \}$ respectively. $100\ 00\ 01101$ is decoded as

  1. $BACE$
  2. $CADE$
  3. $BAD$
  4. $CADD$
in Algorithms edited by
by
4.5k views

2 Answers

3 votes
3 votes

There's a typo in the huffman code. It should be 100 00 01 101.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

100 - B
00 - A
01 - C
101 - E

BACE

Option A 

1 vote
1 vote

100 00 01101 is decoded as BACE

2 Comments

can we interchange left and right subtree of root ? does it affect in encoding?
0
0
No it can not  be changed because according to huffman coding the left side is lower child and right onee is bigger child.
1
1
Answer:

Related questions