Solution

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

Order the symbols so that . For each , there are exactly binary strings of length , while precisely the indices
satisfy . Assign those symbols bijectively to the strings of length . The resulting map is an injective function and hence a one-to-one source code, with . Assigning shorter available words to more probable symbols also shows that this is an optimal one-to-one binary code.
Solved by gpt-5.6-sol high.

New to topics? Read the docs here!