Solution

ID: past-exam-of-the-communication-theory-course-of-the-university-of-oxford/2011/2/b/ii/solution

First consider any instantaneous code. Put and . Part 1(a) gives
so .
For the construction, take the Shannon lengths . Then , so Kraft's condition holds. Also for every . Averaging gives
For a nontrivial alphabet all , so these lengths are positive and the ordinary code convention applies. For a deterministic one-symbol source, the usual zero-bit convention uses when the number of source symbols is externally known. If strictly nonempty codewords and arbitrary unframed message lengths are required instead, that degenerate case has and cannot satisfy the printed strict upper bound. This convention issue does not affect sources with at least two symbols.

New to topics? Read the docs here!