Skip to main content

The evolution of two stacks in bounded space and random walks in a triangle

  • Communications
  • Conference paper
  • First Online:
Mathematical Foundations of Computer Science 1986 (MFCS 1986)

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

Abstract

We analyse a simple storage allocation scheme in which two stacks grow and shrink inside a shared memory area. To that purpose, we provide analytic expressions for the number of 2-dimensional random walks in a triangle with two reflecting barriers and one absorbing barrier.

We obtain probability distributions and expectations of characteristic parameters of that shared memory scheme, namely the sizes of the stacks and the time until the system runs out of memory.

This provides a complete solution to an open problem posed by Knuth in "The Art of Computer Programming", Vol. 1, 1968 [Ex. 2.2.2.13].

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. N. De Bruijn, D. E. Knuth, and S. O. Rice, “The Average Height of Binary Trees and Other Simple Trees,” pp. 15–22 in Graph Theory and Computing, Academic Press, New-York (1972).

    Google Scholar 

  2. L. Comtet, Advanced Combinatorics, Reidel, Dordrecht (1974).

    Google Scholar 

  3. P. Flajolet, “Combinatorial Aspects of Continued Fractions,” Discrete Math. 32 pp. 125–161 (1980).

    Google Scholar 

  4. P. Flajolet, J. Francon, and J. Vuillemin, “Sequence of Operations Analysis for Dynamic Data structures,” J. of Alg. 1 pp. 111–141 (1980).

    Google Scholar 

  5. J. Francon, “Histoires de Fichiers,” RAIRO Inf. Theor. 12 pp. 49–62 (1979).

    Google Scholar 

  6. A. Jonassen and D. E. Knuth, “A Trivial Algorithm Whose Analysis Isn't,” Stanford University Report STAN-CS-77-598 (1977).

    Google Scholar 

  7. D. E. Knuth, The Art of Computer Programming: Fundamental Algorithms, Addison Wesley, Reading, Mass (1968).

    Google Scholar 

  8. J. K. Percus, Combinatorial Methods, Springer Verlag (Applied Mathematical Sciences 4), New-York (1971).

    Google Scholar 

  9. F. Spitzer, Principles of Random Walk, Springer Verlag, New-York (1976). (2nd ed.).

    Google Scholar 

  10. E. T. Whittaker and G. N. Watson, A Course in Modern Analysis, Cambridge University Press (1927).

    Google Scholar 

  11. A. C. Yao, “An Analysis of a Memory Allocation Scheme for Implementing Stacks,” SIAM J. Comput. 10(2), pp. 398–403 (1981).

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Jozef Gruska Branislav Rovan Juraj Wiedermann

Rights and permissions

Reprints and permissions

Copyright information

© 1986 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Flajolet, P. (1986). The evolution of two stacks in bounded space and random walks in a triangle. In: Gruska, J., Rovan, B., Wiedermann, J. (eds) Mathematical Foundations of Computer Science 1986. MFCS 1986. Lecture Notes in Computer Science, vol 233. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0016257

Download citation

  • DOI: https://doi.org/10.1007/BFb0016257

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-16783-9

  • Online ISBN: 978-3-540-39909-4

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics