# Kraft–McMillan inequality

Kraft's inequality was published in Kraft (1949). Jedoch, Kraft's paper discusses only prefix codes, and attributes the analysis leading to the inequality to Raymond Redheffer. The result was independently discovered in McMillan (1956). McMillan proves the result for the general case of uniquely decodable codes, and attributes the version for prefix codes to a spoken observation in 1955 by Joseph Leo Doob.

Inhalt 1 Applications and intuitions 2 Formale Aussage 3 Beispiel: binary trees 4 Nachweisen 4.1 Proof for prefix codes 4.2 Proof of the general case 4.3 Alternative construction for the converse 5 Anmerkungen 6 Verweise 7 See also Applications and intuitions Kraft's inequality limits the lengths of codewords in a prefix code: if one takes an exponential of the length of each valid codeword, the resulting set of values must look like a probability mass function, das ist, it must have total measure less than or equal to one. Kraft's inequality can be thought of in terms of a constrained budget to be spent on codewords, with shorter codewords being more expensive. Among the useful properties following from the inequality are the following statements: If Kraft's inequality holds with strict inequality, the code has some redundancy. If Kraft's inequality holds with equality, the code in question is a complete code. If Kraft's inequality does not hold, the code is not uniquely decodable. For every uniquely decodable code, there exists a prefix code with the same length distribution. Formal statement Let each source symbol from the alphabet {Anzeigestil S={,s_{1},s_{2},Punkte ,s_{n},}} be encoded into a uniquely decodable code over an alphabet of size {Anzeigestil r} with codeword lengths {displaystyle ell _{1},ell _{2},Punkte ,ell _{n}.} Dann {Anzeigestil Summe _{i=1}^{n}r^{-ell _{ich}}leqslant 1.} Umgekehrt, for a given set of natural numbers {displaystyle ell _{1},ell _{2},Punkte ,ell _{n}} satisfying the above inequality, there exists a uniquely decodable code over an alphabet of size {Anzeigestil r} with those codeword lengths.

Beispiel: binary trees 9, 14, 19, 67 und 76 are leaf nodes at depths of 3, 3, 3, 3 und 2, beziehungsweise.

Any binary tree can be viewed as defining a prefix code for the leaves of the tree. Kraft's inequality states that {Anzeigestil Summe _{ell in {Text{leaves}}}2^{-{Text{depth}}(Ell )}leqslant 1.} Here the sum is taken over the leaves of the tree, d.h. the nodes without any children. The depth is the distance to the root node. In the tree to the right, this sum is {Anzeigestil {frac {1}{4}}+4links({frac {1}{8}}Rechts)={frac {3}{4}}leqslant 1.} Proof Proof for prefix codes Example for binary tree. Red nodes represent a prefix tree. The method for calculating the number of descendant leaf nodes in the full tree is shown.

Zuerst, let us show that the Kraft inequality holds whenever the code for {Anzeigestil S} is a prefix code.

Nehme an, dass {displaystyle ell _{1}leqslant ell _{2}leqslant cdots leqslant ell _{n}} . Lassen {Anzeigestil A} be the full {Anzeigestil r} -ary tree of depth {displaystyle ell _{n}} (daher, every node of {Anzeigestil A} at level {Anzeigestil ich, the first {displaystyle ell _{ich}} digits of Cj form a larger number than Ci, so the code is prefix free.

Notes ^ Cover, Thomas M.; Thomas, Joy A. (2006), "Datenkompression", Elemente der Informationstheorie (2und Aufl.), John Wiley & Sons, Inc, pp. 108–109, doi:10.1002/047174882X.ch5, ISBN 978-0-471-24195-9 ^ De Rooij, Stefan; Grünwald, Peter D. (2011), "LUCKINESS AND REGRET IN MINIMUM DESCRIPTION LENGTH INFERENCE", Philosophy of Statistics (1st ed.), Elsevier, p. 875, ISBN 978-0-080-93096-1 References Kraft, Leon G. (1949), A device for quantizing, grouping, and coding amplitude modulated pulses, Cambridge, MA: MS Thesis, Electrical Engineering Department, Massachusetts Institute of Technology, hdl:1721.1/12390. McMillan, Brockway (1956), "Two inequalities implied by unique decipherability", IEEE Trans. Inf. Theorie, 2 (4): 115–116, doi:10.1109/TIT.1956.1056818. See also Chaitin's constant Canonical Huffman code Categories: Coding theoryInequalities

Wenn Sie andere ähnliche Artikel wissen möchten Kraft–McMillan inequality Sie können die Kategorie besuchen Coding theory.

Geh hinauf

Wir verwenden eigene Cookies und Cookies von Drittanbietern, um die Benutzererfahrung zu verbessern Mehr Informationen