Sl. Chan et Mj. Golin, A dynamic programming algorithm for constructing optimal "1"-ended binary prefix-free codes, IEEE INFO T, 46(4), 2000, pp. 1637-1644
The generic Huffman-Encoding Problem of finding a minimum cost prefix-free
code is almost completely understood. There still exist many variants of th
is problem which are not as well understood, though. One such variant, requ
iring that each of the codewords ends with a "1," has recently been introdu
ced in the literature with the best algorithms known for finding such codes
running in exponential time. In this correspondence we develop a simple O(
n(3)) time algorithm for solving the problem.