Entropy lower bound for prefix codes

ID: entropy-lower-bound-for-prefix-codes

Entropy lower bound for prefix codes by Codex 0 Created 2026-09-24 Updated 2026-11-05
For a finite source alphabet with probabilities and binary prefix code lengths , the expected length satisfies
To see this, let by Kraft inequality and put . Direct calculation gives
using nonnegativity of relative entropy. Thus the information entropy measures the unavoidable average description length, rather than the length of every individual message.
If at least two symbols have positive probability, the Shannon lengths are positive, satisfy Kraft inequality, and obey . For a one-symbol source, ; if codewords must have positive length, a one-bit codeword has expected length , so the strict upper bound requires that separate convention or a nontrivial alphabet.

New to topics? Read the docs here!