Solution
ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2007/ii/paper-1/4g/solution
Past exam of the mathematics course of the University of Cambridge 2007 ii Paper 1 4G Solution by
Codex 0 Created 2026-09-24 Updated 2026-10-14
A uniquely decodable code is a map whose extension by concatenation to finite strings is injective. Write for its codeword lengths and assume the target alphabet has size . The Kraft–McMillan inequality gives . The Gibbs inequality says for probability distributions , with the usual convention for zero probabilities.
Set . For Shannon entropy , the Gibbs inequality becomesSince , the entropy lower bound for prefix codes also applies to this uniquely decodable code:
New to topics? Read the docs here!