Solution (source code)

= Solution

The binary <Kraft inequality> states that codeword lengths $l(a)$ of a <prefix code>, or more generally a uniquely decodable code, satisfy
$$
\sum_a2^{-l(a)}\leq1.
$$
Conversely, positive integer lengths obeying this inequality can be realized by a binary prefix code.