Question 1: Consider a source with 4 symbols {a,b,c,d}. The probability of the 4 symbols are:
P(a) = 0.4, p(b) = 0.1, p(c) = 0.2, p(d) = 0.3.
a) Design a Huffman codebook for such symbols. Find out the average bit rate and compared it to the entropy of this source.
b) Code the sequence {aacddacbda} by using the codebook you designed. Write the resultant binary bits stream. Compute the average bit rate.
Question 2: Suppose that you have strings of characters containing only the vowels 'A', 'E', 'I', 'O' and 'U'. An analysis of a random sampling of your data displays the probability of each character:
A E I O U
.23 .35 .05 .25 .12
a) As there are only 5 characters in the data, the string can be encoded by assigning each character a fixed 3-bit code. Why are 3 bits sufficient?
b) Consider the given string of vowels:
IUAUAAAAOAOOOOEOEEEOEEEIUUEEAAEEEOOEE
For this string, what percentage reduction does your Huffman encoding accomplish over a 3 bit fixed length encoding?
Question 3: Consider the given alphabet {a, c, d, e, i } with probabilities as shown:
p(a) = 0.5; p(c) = 0.2, p(d) = 0.15, p(e) = 0.1, p(i) = 0.05
Arithmetically encode and decode the word “dice”. Suppose that the computer know the word has a fixed length of four.