The height of a tree with n nodes, that is the number of nodes on a maximal simple path starting at the root, is of interest in computing because it represents the maximum size of the stack used in algorithms that traverse the tree. In the classical paper of de Bruijn, Knuth and Rice, there is computed the average height of planted plane trees with n nodes assuming that all n-node trees are equally likely. The first section of this paper is devoted to the computation of the cumulative distribution function of this problem; we give an asymptotic equivalent in terms of familiar functions (Theorem 1). Then we derive an explicit expression and an asymptotic equivalent for the sth moment about origin of this distribution (Theorem 2). In the last section we compute the average stack size after t units of time during postorder-traversing of a binary tree with n leaves. Thereby, in one unit of time, a node is stored in the stack or is removed from the top of the stack.
CITATION STYLE
Kemp, R. (1979). On the average stack size of regularly distributed binary trees. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 71 LNCS, pp. 340–355). Springer Verlag. https://doi.org/10.1007/3-540-09510-1_28
Mendeley helps you to discover research relevant for your work.