Assignment:
1. Let xn be a message with iid symbols, a quaternary alphabet and the following PMD
Px(0) = 0.7, Px(1) = Px(2) = Px(3) = 0.1
a) Find a binary Huffman code with single symbols xn as input and calculate its efficiency.
b) Find the efficiency of a ternary Shannon-Fano code with pairs x = [x, xn+1] as input.
2. A stationary message {xn} with iid symbols and alphabet Ax = {0, 1, 2} has PMD
Px(0) =1/2, px(1) = 1/3, px(2) = 1/6.
a) Construct a binary prefix code y with Ay = {0, 1} that is optimal for coding single symbols of x. Evaluate the code efficiency.
b) Consider the vector made of two consecutive symbols taken from {xn} and find a binary code that is optimal for xm. Compare the efficiencies ηy and ηy.