Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2007/iii/paper-31/1/c/solution

Use the balancing fact proved by the exchange argument in part d: every leaf of an optimal tree has depth or . A full binary tree with this property has all possible vertices at level ; at least one of these is split into two deepest leaves. Thus
These inequalities characterize the maximum codeword length exactly:
In the suggested notation , , this is for and for . The distinction at a power of two is important.

New to topics? Read the docs here!