Huffman Coding & Entropy Bound
Adjust the probability distribution and observe how the Huffman code approaches the entropy bound.
Expected length L
—
bits/symbol
Gap L − H
—
< 1 bit (theorem)
Redundancy R
—
1 − H/log₂|X|
Huffman Tree
Entropy vs. Expected Length