The binary Kraft inequality says that codeword lengths of a prefix code satisfyConversely, suppose positive integer lengths obey this inequality and arrange them in nondecreasing order. Construct codewords greedily in the infinite binary tree. Before assigning length , each earlier codeword of length excludes exactly nodes at depth . Thus the number excluded iswhere strictness follows because the remaining term occurs in the full Kraft sum. A free depth- node therefore exists. Assign it as the next codeword; choosing a node not below an earlier codeword preserves prefix-freeness. Induction constructs the required prefix code.
Articles by others on the same topic
There are currently no matching articles.