Solution
= Solution
For the binary code above, the lengths are $1,2,3,5,5,5,5$. Thus
$$
\bar\ell=.45+2(.28)+3(.14)+5(.04+.04+.03+.02)=2.08.
$$
This is optimal by <Huffman coding>.
= Solution
For the binary code above, the lengths are $1,2,3,5,5,5,5$. Thus
$$
\bar\ell=.45+2(.28)+3(.14)+5(.04+.04+.03+.02)=2.08.
$$
This is optimal by <Huffman coding>.