Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2021/iii/paper-224/4/b/solution

The Shannon lengths are . Their Competitive optimality of the Shannon code says that for every binary uniquely decodable code of lengths and every positive integer ,
On this event, . Summing and applying the Kraft inequality proves

New to topics? Read the docs here!