Kraft's inequality

The force 's inequality, also referred to as force - McMillan inequality, is in the coding theory, a necessary and sufficient condition for the existence of a uniquely decodable code for a given set of key lengths. Its implications on prefix codes and binary trees commonly found in computer science and information theory application.

The power inequality was developed in 1949 by Leon G. Kraft, where he exclusively treated prefix codes in his work. Regardless of power came Brockway McMillan 1956 to identical results.

Statement

Let T be a (n, q) - tree with maximum q child nodes per node and n leaves, whose depths were.

Then:

Equality holds if T is a complete tree.

Evidence

It is easily seen that for a tree of depth 0 the following applies:

Since a node of a -ary tree has at most children or is a leaf, each node distributes its value ( depth) to a maximum value with the children, have the highest combined worth. If the tree is incomplete, ie. has less than a child node, the sum falls even below 1 the inequality is exactly violated when internal nodes are used as sheets, for example because all of the nodes can be used at a depth level as a code word at the same time but still exist longer, deeper code words. Since these longer code words but then have a code word as a prefix, thereby the property of the Präfixfreiheit is injured. It is of course possible and also not rare that the tree is unbalanced, ie a path of length exists, while in another branch even deeper ones leaves are to be found.

But on the other hand, it is also possible to "dumb" code to construct that satisfy the inequality, but still using a part of a path to a sheet as a code word.

Must comply with the power inequality in the context of coding theory for each code uniquely decodable over the alphabet of length, the lengths of the codewords. In the reversal exists for each set of codeword lengths satisfying the Kraft inequality, a uniquely decodable, präfixfreier code with these lengths.

Proof of infinite sequences of code word lengths

Be all right then a präfixfreier binary code when

Be prefix-free binary code with codeword lengths

Be The sum converges absolutely, we can rearrange without loss of generality

Induction on k

Let b be equal to the number of leaves in T. Then T ' Can not complete codeword length add def. b inductively, this results präfixfreier binary code.

487493
de