When an instantaneously decodable code is to be formed from an alphabet of q letters, with the ith codeword being λi letters in length, Kraft’s inequality
is a necessary and sufficient condition for such a code to be constructible with
n codewords. In a code with no codewords remaining for allocation, the equality sign operates.
See also prefix codes.