In
coding theory, Kraft's inequality gives the necessary and sufficient 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 set of codeworded lengths possible for making a prefix code. It asserts that the exponentiated codeword length assignments 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.
See more at Wikipedia.org...