A dynamic programming algorithm for constructing optimal "1"-ended binary prefix-free codes
The generic Huffman-Encoding Problem of finding a minimum cost prefix-free code is almost completely understood. There still exist many variants of this problem which are not as well understood, though. One such variant, requiring that each of the codewords ends with a "1," has recently been introduced 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.
dynamic programming prefix-free codes one-ended codes