Solution
ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2007/iii/paper-31/1/b/solution
Past exam of the mathematics course of the University of Cambridge 2007 iii Paper 31 1 b Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-14
If all leaves of a full binary tree have depth , all binary paths of length end in leaves. Thus it has exactly leaves and . Equivalently, equality in the Kraft inequality gives .
Conversely, when a complete depth- tree is a prefix code with mean length . For any prefix lengths , convexity givesso . The complete tree is optimal. A Huffman code attains this optimum, and equality in the strictly convex first inequality forces all its lengths to equal . Hence, for ,This also proves that ties in the Huffman construction do not change the conclusion.
New to topics? Read the docs here!