for a message source
are unknown, it may be imprudent to construct a Huffman code for
based on the relative frequencies
of the letters in a sample message
. Rather, a more cautious approach is to select an integer
and to construct the code
which encodes
most efficiently subject to the restriction that codewords are at most
bits long. This correspondence describes an algorithm for calculating
in
steps.