MathLabs
TheoremProved

Shannon's source coding theorem

Statement

Let a discrete memoryless source emit symbols from an alphabet according to a probability distribution with entropy HH (in bits, using log⁡2\log_2). Then for any ε>0\varepsilon > 0, there exists a lossless block code with average length per symbol below H+εH + \varepsilon for block length nn large enough; conversely, no lossless code can achieve an average length per symbol below HH. In short, the entropy HH is exactly the minimal achievable average number of bits per symbol.

Why is it true?

A message is only as long as the surprise it carries: a symbol that occurs with near certainty needs almost no bits to convey, while a rare symbol needs many. Entropy averages this 'surprise' (measured as −log⁡2p-\log_2 p) over the whole source, giving a hard floor: you can compress common patterns away, but you can never compress a random source below the true unpredictability baked into its own statistics.

Proof sketch

For long blocks of nn i.i.d. symbols, the asymptotic equipartition property shows that almost all probability mass concentrates on a 'typical set' of roughly 2nH2^{nH} sequences, each with probability close to 2−nH2^{-nH}. Assigning short codewords (about nHnH bits) only to this typical set, and longer codewords to the negligible remainder, achieves average length close to HH per symbol; the converse follows because any code assigning fewer than nHnH bits on average would have too few codewords to cover the typical set without collisions, by a counting argument.

Stated by

Topics that use this theorem

Step-by-step proofs

No step-by-step proof yet for this theorem.

References

  1. Claude E. Shannon (1948). A Mathematical Theory of Communication
  2. Thomas M. Cover, Joy A. Thomas (2006). Elements of Information Theory