On Random Binary Trees
NAVAL POSTGRADUATE SCHOOL MONTEREY CA DEPT OF OPERATIONS RESEARCH
Pagination or Media Count:
A widely used class of binary trees is studied in order to provide information useful in evaluating algorithms based on this storage structure. A closed form counting formula for the number of binary trees with n nodes and height k is developed and restated as a recursion more useful computationally . A generating function for the number of nodes given height is developed and used to find the asymptotic distribution of binary trees. An asymptotic probability distribution for height given the number of nodes is derived based on equally likely binary trees. This is compared with a similar result for general trees. Random binary trees those resulting from a binary tree sorting algorithm applied to random strings of symbols are counted in terms of the mapping of permutations of n symbols to binary trees of height k. An explicit formula for this number is given with an equivalent recursive definition for computational use. A generating function is derived for the number of symbols given height. Lower and upper bounds on random binary tree height are developed and shown to approach one another asymptotically as a function of n, providing a limiting expression for the expected height. The random binary trees are examined further to provide expressions for the expectations of the number of vacancies at each level, the distribution of vacancies over alI levels. the comparisons required for insertion of a new random symbol, the fraction of nodes occupied at a particular level. the number of leaves, the number of single vacancies at each level, and the number of twin vacancies at each level. A random process is defined for the number of symbols required to grow a tree exceeding any given height. Finally. an appendix is given with sample tabulations and figures of the distributions.
- Theoretical Mathematics