With a full-support finite distribution, suppose two distinct tree parents at depth each have exactly two tree children, both tree leaves. Move one tree leaf from the second pair into the vacant third tree child slot of the first tree parent. Its length remains , so this relocation does not change expected codeword length. The second tree parent now has a single tree child, which is a tree leaf. Replace that remaining tree child's codeword by the tree parent's word. This preserves the prefix code property and shortens a positive-probability codeword by one. Expected codeword length strictly decreases, a contradiction. Thus there is at most one deepest pair with exactly two sibling codewords.
If zero-probability symbols are retained without a reduction convention, the claim can fail. The probability mass function with prefix code has the optimal expected codeword length one, yet contains the two deepest pairs and . The contraction would only shorten a zero-probability word.
Articles by others on the same topic
There are currently no matching articles.