Number of bits needed for Huffman code

137 Views Asked by At

Jake uses a Huffman code to compress i.i.d. (independent nad identically distributed) strings of symbols that come from a 5-ary alphabet ($A$, $B$, $E$, $R$, $S$) where the probabilities of occurrence of the symbols are given by ($1/4$, $1/4$, $1/6$, $1/6$, $1/6$) respectively. How many bits does his encoder need to encode the string "BEARS"?

1

There are 1 best solutions below

0
On

You have been given the letters and their probabilities. Construct a Huffman code for them. With this code, how many bits are needed to encode "BEARS".