Solution
ID: past-exam-of-the-communication-theory-course-of-the-university-of-oxford/2007/2/b/solution
Past exam of the communication Theory course of the University of Oxford 2007 2 b Solution by
Codex 0 2026-10-31
Work on the source support, so its listed probabilities are positive; zero-probability symbols may be omitted. An optimal binary prefix code minimizes the expected codeword length for that distribution. The same optimal expected length is attained when optimization is over uniquely decipherable codes, by the converse and existence parts of Kraft–McMillan inequality.
Choose Shannon lengths . They satisfy , so the preceding existence theorem gives a prefix code with those lengths. Also for every symbol, including the integer cases. Thus its expected length is less than . An optimal code cannot have a larger expected length, provingFor a deterministic one-symbol source the empty word has length zero, consistent with this bound.
New to topics? Read the docs here!