Shannon's source coding theorem has two halves, and together they form one of the sharpest results in all of science.
The converse (lower bound): for any uniquely decodable lossless code over an alphabet of size r, the average codeword length Lˉ satisfies
Lˉ≥Hr(X)=−i∑pilogrpi.
No exceptions. The proof is a few lines of Jensen's inequality applied to the concavity of log. Every compressor in the world, past or future, must obey this bound.
The direct part (achievability): for any ε>0 and long enough block length n, there exists a code with Lˉ≤H(X)+ε. In other words, entropy is not just a lower bound — it is an achievable limit. Shannon's 1948 paper proved this. The proof uses the asymptotic equipartition property: almost all long strings concentrate their probability into a "typical set" of roughly 2nH sequences, each needing about nH bits to name.
Huffman codes (1952, David Huffman) achieve H≤Lˉ<H+1 for a single symbol at a time — within one bit of the theoretical floor, no block coding needed. Arithmetic coding and asymmetric numeral systems (ANS, Jarek Duda, 2009) push the gap to near zero in practice.
The key insight: randomness cannot be compressed away. If a source has H=3 bits per symbol, you cannot describe what it outputs in fewer than 3 bits per symbol on average — because those 3 bits are genuinely new information each time. Compare this with Kolmogorov complexity, which asks the same question about individual strings rather than distributions.
Comments
Loading comments...