Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2026/ii/paper-1/3h/b/solution

For the binary code above, the lengths are . Thus
This is optimal by Huffman coding.

New to topics? Read the docs here!