The Average Height of Binary Trees and Other Simple Trees

Abstract The average height of a binary tree with n internal nodes is shown to be asymptotic to 2√ πn . This represents the average stack height of the simplest recursive tree traversal algorithm. The method used in this estimation is also applicable to the analysis of traversal algorithms of unary-binary trees, unbalanced 2–3 trees, t-ary trees for any t , and other families of trees. It yields the two previously known estimates about average heights of trees, namely for labeled nonplanar trees (a result due to Renyi and Szekeres) and for planar trees (a result of De Bruijn, Knuth, and Rice). The method developed here, which relies on a singularity analysis of generating functions, is new and widely applicable.

[1]  Philippe Flajolet,et al.  On the analysis of tree-matching algorithms , 1980, CLAAP.

[2]  Rainer Kemp,et al.  On the Average Stack Size of Regularly Distributed Binary Trees , 1979, ICALP.

[3]  N. D. Bruijn Asymptotic methods in analysis , 1958 .

[4]  John Riordan,et al.  The Enumeration of Trees by Height and Diameter , 1960, IBM J. Res. Dev..

[5]  Philippe Flajolet,et al.  The Number of Registers Required for Evaluating Arithmetic Expressions , 1979, Theor. Comput. Sci..

[6]  John W. Moon,et al.  On the Order of Random Channel Networks , 1980, SIAM J. Matrix Anal. Appl..

[7]  Rainer Kemp,et al.  A note on the stack size of regularly distributed binary trees , 1980, BIT.

[8]  de Ng Dick Bruijn,et al.  THE AVERAGE HEIGHT OF PLANTED PLANE TREES , 1972 .

[9]  John Michael Robson,et al.  The Height of Binary Search Trees , 1979, Aust. Comput. J..

[10]  A. Odlyzko Periodic oscillations of coefficients of power series that satisfy functional equations , 1982 .

[11]  A. Rényi,et al.  On the height of trees , 1967, Journal of the Australian Mathematical Society.

[12]  Donald E. Knuth The art of computer programming: fundamental algorithms , 1969 .

[13]  E. Bender Asymptotic Methods in Enumeration , 1974 .

[14]  Donald E. Knuth,et al.  The Art of Computer Programming, Volume I: Fundamental Algorithms, 2nd Edition , 1997 .

[15]  J. Moon,et al.  On the Altitude of Nodes in Random Trees , 1978, Canadian Journal of Mathematics.

[16]  Donald E. Knuth,et al.  The art of computer programming: sorting and searching (volume 3) , 1973 .

[17]  G. Pólya Kombinatorische Anzahlbestimmungen für Gruppen, Graphen und chemische Verbindungen , 1937 .

[18]  Philippe Flajolet,et al.  Exploring binary trees and other simple trees , 1980, 21st Annual Symposium on Foundations of Computer Science (sfcs 1980).