Entropy lower bound for prefix codes
ID: entropy-lower-bound-for-prefix-codes
For a finite source alphabet with probabilities and binary prefix code lengths , the expected length satisfiesTo see this, let by Kraft inequality and put . Direct calculation givesusing 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!