Let a memoryless source have probabilities , and let a uniquely decodable -ary code have word lengths and mean length . The Shannon source coding theorem states
and that some prefix code satisfies
For the lower bound, the Kraft inequality gives . Set . The Gibbs inequality, or nonnegativity of relative entropy, gives
Therefore .
For achievability choose . Then , so the converse part of the Kraft theorem supplies a prefix code with these lengths, and
Hence the entropy is the optimal mean code length up to less than one code symbol.

Articles by others on the same topic (0)

There are currently no matching articles.