Q.2
Solution:
Method 1
0e7322a1-5dce-4ad9-acd1-733be402ae4b-image.png
Method 2
fc8e2c51-4c04-4b4e-9bd0-b2b542a413f2-image.png
a29b0121-e9be-4b74-aea3-d49d9f189d4c-image.png
► Optimal
► Non-optimal
► Exponential
► Polynomial
@moaaz said in The Huffman algorithm finds for?:
Optimal
If optimal is measured by average code word length, Huffman’s algorithm gives optimal codes, and the redundancy can be measured as the difference between the average code word length and Shannon’s entropy. If the objective function is replaced by an exponentially weighted average, then a simple modification of Huffman’s algorithm gives optimal codes. The redundancy can now be measured as the difference between this new average and Renyi’s generalization of Shannon’s entropy. By decreasing some of the codeword lengths in a Shannon code, the upper bound on the redundancy given in the standard proof of the noiseless source coding theorem is improved. The lower bound is improved by randomizing between codeword lengths, allowing linear programming techniques to be used on an integer programming problem. These bounds are shown to be asymptotically equal, providing a new proof of Kricevski’s results on the redundancy of Huffman codes. These results are generalized to the Renyi case and are related to Gallager’s bound on the redundancy of Huffman codes.