Balancing exchange for a uniform optimal prefix code
ID: balancing-exchange-for-a-uniform-optimal-prefix-code
For an equiprobable source, an optimal binary prefix tree has leaf depths differing by at most one. If one leaf has depth and a deepest sibling pair has depth , split the shallow leaf into two children and collapse the deep pair into its parent. The number of leaves is unchanged and their total depth decreases by , contradicting optimality.
// Target: probability-and-statistics.bigb
New to topics? Read the docs here!