Solution

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

If one comma codeword were a prefix of another, its terminal comma would occur inside the longer codeword, contrary to the definition. Thus every comma code is prefix-free. Directly, the disjoint cylinder sets of infinite strings beginning with the respective comma-terminated words have measures , so their total measure gives Kraft's inequality.
Kraft's inequality does not imply unique decipherability. Over the binary alphabet,
has Kraft sum , but
Thus it is not uniquely decipherable.

New to topics? Read the docs here!