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.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.