Skip to main content

On the average stack size of regularly distributed binary trees

  • Conference paper
  • First Online:
Automata, Languages and Programming (ICALP 1979)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 71))

Included in the following conference series:

Abstract

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  • 1 ABRAMOWITZ, M., STEGUN, I.A., Handbook of Mathematical Functions, Dover, New York, 1970

    Google Scholar 

  • 2 APOSTOL, T.M., Introduction to Analytic Number Theory, Springer-Verlag, New York, 1976

    Google Scholar 

  • 3 CARLITZ, L., ROSELLE, D.P., SCOVILLE, R.A., ‘Some Remarks on Ballot-Type Sequences of Positive Integers', J. Comb. Theory, Ser.A, 11, 258–271, 1971

    Google Scholar 

  • 4 CHANDRASEKHARAN, K., Arithmetical Functions, Die Grundlehren der Mathematischen Wissenschaften, Band 167, Springer-Verlag, 1970

    Google Scholar 

  • 5 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.), 15–22, New York, London, Ac. Press, 1972

    Google Scholar 

  • 6 FELLER, W., An Introduction to Probability Theory and Its Application, vol. 1, 2.nd ed., Wiley, New York, 1957

    Google Scholar 

  • 7 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 

  • 8 KEMP, R., ‘The Average Number of Registers Needed to Evaluate a Binary Tree Optimally', appears in Acta Informatica, 1977

    Google Scholar 

  • 9 KNUTH, D.E., The Art of Computer Programming, vol. 1, second ed., Addison-Wesley, Reading, 1973

    Google Scholar 

  • 10 KREWERAS, G., ‘Sur les éventails de segments', Cahiers du B.U.R.O., 15, Paris, pp. 1–41, 1970

    Google Scholar 

  • 11 RIORDAN, J., An Introduction to Combinatorial Analysis, Wiley, New York, 1958

    Google Scholar 

  • 12 RIORDAN, J, Combinatorial Identities, Wiley, New York, 1968

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Hermann A. Maurer

Rights and permissions

Reprints and permissions

Copyright information

© 1979 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Kemp, R. (1979). On the average stack size of regularly distributed binary trees. In: Maurer, H.A. (eds) Automata, Languages and Programming. ICALP 1979. Lecture Notes in Computer Science, vol 71. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-09510-1_28

Download citation

  • DOI: https://doi.org/10.1007/3-540-09510-1_28

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-09510-1

  • Online ISBN: 978-3-540-35168-9

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics