Question

A source emits the four letters a,b,c,da,b,c,d with probabilities 1/2, 1/4, 1/8, 1/81/2,\ 1/4,\ 1/8,\ 1/8. Compute the entropy and compare it with the code a=0, b=10, c=110, d=111a=0,\ b=10,\ c=110,\ d=111: the mean length is 1,751{,}75 bits; it coincides with HH (optimal Huffman code).

Topics: Probability distributions
Concepts: Entropy
Skills: Computing
People: Shannon
Exercise type: Expression evaluation