retagged by
10,785 views
29 votes
29 votes

Suppose the letters $a, \,b, \,c, \,d, \,e, \,f$ have probabilities $\frac{1}{2}, \frac{1}{4}, \frac{1}{8}, \frac{1}{16}, \frac{1}{32}, \frac{1}{32}$, respectively. 

Which of the following is the Huffman code for the letter $a, \,b, \,c, \,d, \,e, \,f$?

  1. $0$, $10$, $110$, $1110$, $11110$, $11111$

  2. $11$, $10$, $011$, $010$, $001$, $000$

  3. $11$, $10$, $01$, $001$, $0001$, $0000$

  4. $110$, $100$, $010$, $000$, $001$, $111$

retagged by

1 Answer

Best answer
38 votes
38 votes

Based on the probabilities, we can say the probable frequency of the letters will be 

$16$, $8$, $4$, $2$, $1$, $1$

Now, the Huffman tree can be constructed as follows:

So, A is the answer for $76$.

https://en.wikipedia.org/wiki/Huffman_coding

edited by
Answer:

Related questions

29 votes
29 votes
2 answers
1