Huffman coding with unequal letter costs
STOC '02 Proceedings of the thiry-fourth annual ACM symposium on Theory of computing
Online prefix-free encoding algorithm
SPPRA'06 Proceedings of the 24th IASTED international conference on Signal processing, pattern recognition, and applications
The structure of optimal prefix-free codes in restricted languages: the uniform probability case
WADS'05 Proceedings of the 9th international conference on Algorithms and Data Structures
Hi-index | 0.00 |
We consider the following variant of Huffman coding in which the costs of the letters, rather than the probabilities of the words, are nonuniform: ``Given an alphabet of $r$ letters {\em of nonuniform length}, find a minimum-average-length prefix-free set of $n$ codewords over the alphabet''; equivalently, ``Find an optimal $r$-ary search tree with $n$ leaves, where each leaf is accessed with equal probability but the cost to descend from a parent to its $i$th child depends on $i$.'' We show new structural properties of such codes, leading to an $O(n\log^2 r)$-time algorithm for finding them. This new algorithm is simpler and faster than the best previously known $O(nr\, \min\{\log n, r\})$-time algorithm, due to Perl, Garey, and Even [{\em J. Assoc. Comput. Mach.}, 22 (1975), pp. 202--214].