2.I.4G

Coding and Cryptography
Part II, 2008

Describe briefly the Shannon-Fano and Huffman binary codes for a finite alphabet. Find examples of such codes for the alphabet A={a,b,c,d}\mathcal{A}=\{a, b, c, d\} when the four letters are taken with probabilities 0.4,0.3,0.20.4,0.3,0.2 and 0.10.1 respectively.