# The path length of binary trees

Efficiency Of Data Organizations

First Online:

## Abstract

More than twenty years ago Nievergelt and Wong obtained a number of new bounds on the path length of binary trees in both the weighted and unweighted cases.

For the unweighted case, the novelty of their approach was that the bounds were applicable to *all trees*, not just the extremal ones. To obtain these “adaptive” bounds they introduced what came to be known as the weight balance of a tree, subsequently used as the basis of weight-balanced trees.

We introduce the notion of the where

*thickness*, Δ(*T*), of a tree*T*; the difference in the lengths of the longest and shortest root-to-leaf paths in*T*. We then prove that an upper bound on the external path length of a binary tree is$$N(\log _2 N + \Delta - \log _2 \Delta - 0.6623),$$

*N*is the number of external nodes in the tree. We prove that this bound is tight up to an*O*(*N*) term if Δ ≤ \(\sqrt N\). Otherwise, we construct binary trees whose external path length is at least as large as*N*(log_{2}*N*+ φ(*N*, Δ) Δ − log_{2}Δ − 4), where φ(*N*, Δ) = 1/(1 + 2 Δ/*N*).## Preview

Unable to display preview. Download preview PDF.

## References

- [1]R. Bayer. Symmetric binary B-trees: Data structure and maintenance algorithms.
*Acta Informatica*, 1:290–306, 1972.Google Scholar - [2]A. Brüggemann-Klein and D. Wood. Drawing trees nicely with TEX.
*Electronic Publishing, Origination, Dissemination, and Design*, to appear, 1989.Google Scholar - [3]L.J. Guibas and R. Sedgewick. A dichromatic framework for balanced trees. In
*Proceedings of the 19th Annual Symposium on Foundations of Computer Science*, pages 8–21, 1978.Google Scholar - [4]R.W. Hamming.
*Coding and Information Theory*. Prentice-Hall, Inc., Englewood Cliffs, New Jersey, 1980.Google Scholar - [5]R. Klein and D. Wood. On the maximum path length of AVL trees. In M. Dauchet and M. Nivat, editors,
*Proceedings of the 13th Colloquium on Trees in Algebra and Programming (CAAP '88), Springer-Verlag Lecture Notes in Computer Science 299*, pages 16–27, 1988.Google Scholar - [6]R. Klein and D. Wood. On the path length of binary trees.
*Journal of the ACM*, 36, 1989.Google Scholar - [7]D.E. Knuth.
*The Art of Computer Programming, Vol.3: Sorting and Searching*. Addison-Wesley Publishing Co., Reading, Mass., 1973.Google Scholar - [8]J. Nievergelt, J. Pradels, C.K. Wong, and P.C. Yue. Bounds on the weighted path length of binary trees.
*Information Processing Letters*, 1:220–225, 1972.Google Scholar - [9]J. Nievergelt and E.M. Reingold. Binary search trees of bounded balance.
*SIAM Journal on Computing*, 2:33–43, 1973.Google Scholar - [10]J. Nievergelt and C.K. Wong. On binary search trees. In C.V. Freiman, editor,
*Information Processing 71*, pages 91–98, Amsterdam, 1971. North-Holland Publishing Co.Google Scholar - [11]J. Nievergelt and C.K. Wong. Upper bounds for the total path length of binary trees.
*Journal of the ACM*, 20:1–6, 1973.Google Scholar - [12]H. J. Olivié.
*A Study of Balanced Binary Trees and Balanced One-Two Trees*. PhD thesis, Department Wiskunde, Universiteit Antwerpen, Antwerp, Belgium, 1980.Google Scholar - [13]H. J. Olivié. A new class of balanced search trees: Half-balanced search trees.
*RAIRO Informatique théorique*, 16:51–71, 1982.Google Scholar - [14]W. Specht. Zur Theorie der Elementaren Mittel.
*Mathematische Zeitschrift*, 74:91–98, 1960.Google Scholar

## Copyright information

© Springer-Verlag Berlin Heidelberg 1989