The expected number of nodes and leaves at level k in ordered trees

Contributed Papers
Part of the Lecture Notes in Computer Science book series (LNCS, volume 145)


In this paper the average number of nodes (nodes of degree t) appearing at some level k in a n-node ordered tree is computed. Exact enumeration formulae for the number of all n-node trees with r nodes (r nodes of degree t) at level k are derived. Assuming all n-node trees to be equally likely, it is shown that the expected number n1(n,k) of nodes (n 1 (t) (n,k) of nodes of degree t) at level k is given by
$$\begin{gathered}n_1 (n,k) = {{n\tfrac{{2k - 1}}{{2n - 1}}\left( {\begin{array}{*{20}c}{2n - 1} \\{n - k} \\\end{array} } \right)} \mathord{\left/{\vphantom {{n\tfrac{{2k - 1}}{{2n - 1}}\left( {\begin{array}{*{20}c}{2n - 1} \\{n - k} \\\end{array} } \right)} {\left( {\begin{array}{*{20}c}{2n - 2} \\{n - 1} \\\end{array} } \right)}}} \right.\kern-\nulldelimiterspace} {\left( {\begin{array}{*{20}c}{2n - 2} \\{n - 1} \\\end{array} } \right)}} \hfill \\and \hfill \\n_{_1 }^{(t)} (n,k) = {{n\tfrac{{2k + t - 1}}{{2n - t - 1}}\left( {\begin{array}{*{20}c}{2n - t - 1} \\{n - t - k} \\\end{array} } \right)} \mathord{\left/{\vphantom {{n\tfrac{{2k + t - 1}}{{2n - t - 1}}\left( {\begin{array}{*{20}c}{2n - t - 1} \\{n - t - k} \\\end{array} } \right)} {\left( {\begin{array}{*{20}c}{2n - 2} \\{n - 1} \\\end{array} } \right)}}} \right.\kern-\nulldelimiterspace} {\left( {\begin{array}{*{20}c}{2n - 2} \\{n - 1} \\\end{array} } \right)}}. \hfill \\\end{gathered}$$

Furthermore, asymptotic equivalents for these expected values and exact expressions for the higher moments about the origin are computed.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [1]
    Comtet, L.: Advanced Combinatorics. Dordrecht-Boston:Reidel 1974Google Scholar
  2. [2]
    de Bruijn, N.G.,Knuth, D.E.,Rice, S.O.: The Average Height of Planted Plane trees.In:Graph Theory and Computing, New York-London:Ac.Press 1972Google Scholar
  3. [3]
    Kemp, R.: The Average Height of R-tuply Rooted Planted Plane Trees. Computing 25, 209–232, (1980)Google Scholar
  4. [4]
    Kemp,R.: On the Number of Deepest Nodes in Ordered Trees. preprint, Johann Wolfgang Goethe-Universität, Fachbereich 20, Frankfurt (M), 1982Google Scholar
  5. [5]
    Knuth, D.E.: The Art of Computer Programming, Vol.1, 2nd ed., Reading, Mass.: Addison-Wesley 1973Google Scholar
  6. [6]
    Meir, A.,Moon, J.W.: On the Altitude of Nodes in Random Trees. Can. J.Math. 30, 997–1015 (1978)Google Scholar
  7. [7]
    Riordan, J.: Combinatorial Identities. New York: Wiley 1968Google Scholar
  8. [8]
    Salomaa, A.,Soittola, M.: Automata-Theoretic Aspects of Formal Power Series. New York: Springer 1978Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1982

Authors and Affiliations

  • R. Kemp
    • 1
  1. 1.Fachbereich Informatik (20)Johann Wolfgang Goethe-UniversitätFrankfurt a. M.

Personalised recommendations