Kraft's Inequality

In coding theory, Kraft's inequality, named after Leon Kraft, gives a sufficient condition for the existence of a prefix code and necessary condition for the existence of a uniquely decodable code for a given set of codeword lengths. Its applications to prefix codes and trees often find use in computer science and information theory.

More specifically, Kraft's inequality limits the lengths of codewords in a prefix code: if one takes an exponential function of each length, the resulting values must look like a probability mass function. Kraft's inequality can be thought of in terms of a constrained budget to be spent on codewords, with shorter codewords being more expensive.

  • If Kraft's inequality holds with strict inequality, the code has some redundancy.
  • If Kraft's inequality holds with strict equality, the code in question is a complete code.
  • If Kraft's inequality does not hold, the code is not uniquely decodable.

Kraft's inequality was published by Kraft (1949). However, Kraft's paper discusses only prefix codes, and attributes the analysis leading to the inequality to Raymond Redheffer. The inequality is sometimes also called the Kraft–McMillan theorem after the independent discovery of the result by 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.

Read more about Kraft's Inequality:  Formal Statement, Proof For Prefix Codes, Proof of The General Case

Famous quotes containing the word inequality:

    All the aspects of this desert are beautiful, whether you behold it in fair weather or foul, or when the sun is just breaking out after a storm, and shining on its moist surface in the distance, it is so white, and pure, and level, and each slight inequality and track is so distinctly revealed; and when your eyes slide off this, they fall on the ocean.
    Henry David Thoreau (1817–1862)