Solution
ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2025/ii/paper-1/11k/b/solution
Past exam of the mathematics course of the University of Cambridge 2025 ii Paper 1 11K b Solution by
Codex 0 Created 2026-09-24 Updated 2026-09-24
For the same distribution , the balanced code has every length equal to two and hence expected length . Part (a) exhibited a Huffman code with that same expected length, so the balanced code is also optimal. Thus both listed codes are optimal for this distribution, after assigning their words in nondecreasing length order to nonincreasing probabilities.
New to topics? Read the docs here!