Computing

, Volume 25, Issue 3, pp 209–232 | Cite as

The average height of r-typly rooted planted plane trees

Article

Abstract

In this paper we generalize a result of de Bruijn, Knuth und Rice concerning the average height of planted plane trees withn nodes. First we compute the number of allr-typly rooted planted plane trees (r-trees) withn nodes and height less than or equal tok. Assuming that all planted plane trees withn nodes are equally likely, we show, that in the average a planted plane tree is a 3-tree for largen; for this distribution we compute also the cumulative distribution function and the variance. Finally, we shall derive an exact expression and its asymptotic equivalent for the average height\(\bar h_r \) (n) of anr-tree withn nodes. We obtain for all ε>0
$$\bar h_r (n) = \sqrt {\pi n} - \frac{1}{2}(r - 2) + O(1n(n)/n^{1/2 - \varepsilon } ).$$

Die mittlere Höhe r-fach gewurzelter planarer Bäume

Zusammenfassung

Wir verallgemeinern in dieser Arbeit ein Ergebnis von de Bruijn, Knuth und Rice über die Höhe planarer Wurzelbäume mitn Knoten. Wir berechnen zunächst die Anzahl allerr-fach gewurzelter planarer Bäume (r-Bäume) mitn Knoten und einer Höhe kleiner gleichk. Unter der Annahme, daß alle planare Bäume mitn Knoten gleichwahrscheinlich sind, zeigen wir, daß für großen ein planarer Wurzelbaum ein 3-Baum ist; für diese Verteilung berechnen wir die Verteilungsfunktion und die Varianz. Schließlich leiten wir einen exakten Ausdruck und sein asymptotisches Äquivalent für die mittlere Höhe\(\bar h_r \)n einesr-Baumes mitn Knoten ab. Wir erhalten für alle ε>0
$$\bar h_r (n) = \sqrt {\pi n} - \frac{1}{2}(r - 2) + O(1n(n)/n^{1/2 - \varepsilon } ).$$

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [1]
    Abramowitz, M., Stegun, I. A.: Handbook of mathematical functions. New York: Dover Publications 1970.Google Scholar
  2. [2]
    Apostol, T. M.: Introduction to analytic number theory. New York: Springer 1976.Google Scholar
  3. [3]
    De Bruijn, N. G., Knuth, D. E., Rice, S. O.: The average height of planted plane trees, in: Graph theory and computing (R. C. Read, ed.), pp. 15–22. New York-London: Academic Press 1972.Google Scholar
  4. [4]
    Flajolet, Ph., Raoult, J. C., Vuillemin, J.: On the average number of registers required for evaluating arithmetic expressions. IRIA Rapport de Recherche, No. 228 (1977).Google Scholar
  5. [5]
    Kemp, R.: The average number of registers needed to evaluate a binary tree optimally. Acta Informatica11, 363–372 (1979).Google Scholar
  6. [6]
    Kemp, R.: On the average stack size of regularly distributed binary trees, in: Proc. of the sixth international colloquium on automata, languages and programming (ICALP 79), pp. 340–355. Berlin-Heidelberg-New York: Springer 1979.Google Scholar
  7. [7]
    Kemp, R.: The average depth of a prefix of the Dycklanguage D1, in: Proc. of the 2-th international conference of fundamentals of computing theory (FCT 79), pp. 230–236 (1979).Google Scholar
  8. [8]
    Knuth, D. E.: The art of computer programming, Vol. 1, 2nd ed., Reading, Mass.: Addison-Wesley 1973.Google Scholar
  9. [9]
    Kreweras, G.: Sur les éventails de segments. Cahiers du B.U.R.O.15, 1–41 (1970).Google Scholar
  10. [10]
    Kuich, W., Prodinger, H., Urbanek, F. J.: On the height of derivation trees, in: Proc. of the 6th international colloquium on automata, languages and programming (ICALP 79), pp. 370–384. Berlin-Heidelberg-New York: Springer 1979.Google Scholar
  11. [11]
    Munro, I.: Random walks in binary trees. CS-Dept., University of Waterloo, 1976.Google Scholar
  12. [12]
    Prodinger, H.: The average maximal lead position of a Ballot sequence. Preprint, Technische Universität Wien, 1979.Google Scholar
  13. [13]
    Riordan, J.: Combinatorial identities. New York: Wiley 1968.Google Scholar
  14. [14]
    Ruskey, F., Hu, T. C.: Generating binary trees lexicographically. Siam J. Comput.6, 745–758 (1977).Google Scholar

Copyright information

© Springer-Verlag 1980

Authors and Affiliations

  • R. Kemp
    • 1
  1. 1.Fachbereich 10Universität des SaarlandesSaarbrücken 11Federal Republic of Germany

Personalised recommendations