5. A document that contains only the letters A, B, C, D, E and F is too long. The frequencies and the current
coding is given in the table below.
A B C D E F
16% 5% 12% 13% 45% 9%
000 001 010 011 100 101
a) Use Huffman coding to produce a more efficient code. Make a table showing the code for each symbol. (10
points)
b) Using your table, encode the word FACE. (2 points)
c) On average, how many bits are needed to encode a character. In other words, if a long message is n bits
long, approximately how many bits are needed to encode it. (5 points)