Acta Informatica

, Volume 16, Issue 3, pp 363–370 | Cite as

Best Huffman trees

  • George Markowsky


Given a sequence of positive weights, W=w1≧...≧w n >0, there is a Huffman tree, T↑ (“T-up”) which minimizes the following functions: max{d(wi)}; Σd(wi); Σf(d(wi)) wi(here d(wi) represents the distance of a leaf of weight wi to the root and f is a function defined for nonnegative integers having the property that g(x) = f(x + 1) − f(x) is monotone increasing) over the set of all trees for W having minimal expected length. Minimizing the first two functions was first done by Schwartz [5]. In the case of codes where W is a sequence of probabilities, this implies that the codes based on T↑ have all their absolute central moments minimal. In particular, they are the least variance codes which were also described by Kou [3]. Furthermore, there exists a Huffman tree T↓, (“T-down”) which maximizes the functions considered above.

However, if g(x) is monotone decreasing, T↑ and T↓, respectively maximize and minimize Σf(d(wi) wi) over the set of all trees for W having minimal expected length. In addition, we derive a number of interesting results about the distribution of labels within Huffman trees. By suitable modifications of the usual Huffman tree construction, (see [1]) T↑ and T↓ can also be constructed in time O(n log n).


Information System Operating System Data Structure Communication Network Information Theory 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Even, S.: Algorithmic combinatorics. New York: Macmillan 1973Google Scholar
  2. 2.
    Huffman, D.A.: A method for the construction of minimum-redundancy codes. Proc. IRE 40, 1098–1101 (1952)Google Scholar
  3. 3.
    Kou, L.T.: Minimal variance Huffman codes. IBM Technical Report RC8333, T.J. Yorktown Heights, NY: Watson esearch Center 1980Google Scholar
  4. 4.
    McEliece, R.J.: The theory of information and coding. Reading, Mass.: Addison-Wesley 1977Google Scholar
  5. 5.
    Schwartz, E.S.: An optimal encoding with minimum longest code and total number of digits. Information and control, 7, 37–44 (1964)Google Scholar

Copyright information

© Springer-Verlag 1981

Authors and Affiliations

  • George Markowsky
    • 1
  1. 1.Computer Sciences DepartmentIBM Thomas J. Watson Research CenterYorktown HeightsUSA

Personalised recommendations