Abstract.
For a given set of real weights, Huffman trees minimize the weighted external path length. Over the years, several algorithms have been proposed for constructing Huffman trees that minimize additional natural cost functions such as the external path length, the variance and, more generally, the central moments. We show that all these cost functions are minimized on exactly the same class of Huffman trees, and we characterize the class: it consists of all Huffman trees of minimal level set. It follows that a Huffman tree minimizing one of the cost functions in fact minimizes all of them, and has the minimal level set; in particular, it has minimum height. We show that the unique Huffman tree produced by the simplest construction method, the bottom-merge algorithm of Schwartz, belongs to the class. Finally, we prove that several natural variants of Huffman's algorithm, that appear to be nondeterministic, in fact all lead to the single Huffman tree obtained by Schwartz's algorithm.
Similar content being viewed by others
Author information
Authors and Affiliations
Additional information
Received: 6 October 1997 / 29 September 1998
Rights and permissions
About this article
Cite this article
Forst, G., Thorup, A. Minimal Huffman trees. Acta Informatica 36, 721–734 (2000). https://doi.org/10.1007/s002360050172
Issue Date:
DOI: https://doi.org/10.1007/s002360050172