Solution

ID: past-exam-of-the-information-theory-course-of-the-university-of-oxford/2021/2/b/vi/solution

Assume a full-support finite distribution. The preceding structural arguments show that every internal vertex has three tree children, except possibly one tree parent at depth with two tree children. Let and count these two kinds of internal vertex. Part iv gives ; no vertex has one tree child.
A finite rooted tree with tree leaves has edges, while counting outgoing edges gives . Equating the counts yields
For an odd integer , the right side forces to be an even integer. Since it is at most one, . Thus no deepest pair has only two sibling codewords, and the optimal code tree is a full ternary tree. This leaf-count identity also directly proves that a full ternary tree has an odd number of tree leaves.
Again the unrestricted zero-weight version is false: is an optimal prefix code for , with odd integer , but its two deepest tree leaves form a two-sibling pair. There is no contradiction with the proof because its tree root has only two tree children, which the full-support finite distribution assumption would forbid above the deepest level.

New to topics? Read the docs here!