Question: Repeat Problem for a discrete-memoryless source with a probability vector p = {0.5, 0.25, 0.125, 0.125}. Explain why the result in this case is different from the result obtained in Problem.
Problem: A discrete-memoryless information source is described by the probability vector p = {0.2, 0.3, 0.1, 0.4}.
a. Write a MATLAB file to compute the probabilities of the Kth extension of this source for a given K.
b. Design Huffman codes for this source and its Kth extensions for K = 1, 2, 3, 4, 5.
c. Plot the average codeword length (per source output) as a function of K.