Skip to main content
Log in

Non uniform random generation of generalized Motzkin paths

  • Original Article
  • Published:
Acta Informatica Aims and scope Submit manuscript

Abstract

We consider in this paper the class M k n of generalized Motzkin paths of length n, that is, lattice paths using steps (1,1), (1,−1), (k,0), where k is a fixed positive integer, starting at the origin (0,0), running above the x-axis, and ending at (n,0). The area is the region bounded by the path and the x-axis. We first establish a bijection between the area of paths in M k n and some lattice paths of length n+1. Then, by using a rejection technique, we obtain a linear algorithm with an average time complexity (k mod 2 +1)(n+1).

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Alonso, L.: Uniform Generation of a Motzkin word. Theoret. Comput. Sci. 134(2), 529–536 (1994)

    Article  Google Scholar 

  2. Alonso, L., Schott, R.: Random generation of trees. Kluwer Academic Publishers, Dordrecht, The Netherlands (1995)

    Google Scholar 

  3. Barcucci, E., Pinzani, R., Sprugnoli, R.: The random generation of directed animals. Theoret. Comput. Sci. 127, 333–350 (1994)

    Article  Google Scholar 

  4. Denise, A.: Méthodes de génération d'objets combinatoires de grande taille et problèmes d'énumération. Thèse, Université Bordeaux I, Janvier 1994.

  5. Denise, A., Ponty, Y., Termier, M.: Random generation of structured genomic sequences. In: Proceedings of 7th RECOMB, Berlin, Germany, April 10–13 (2003)

  6. Devroye, L.: Non-uniform random variate generation. Springer-Verlag, New York, NY (1986)

    Google Scholar 

  7. Dvoretzky, A., Motzkin, Th.: A problem of arrangements. Duke Math. J. 14, 305–313 (1976)

    Article  Google Scholar 

  8. Flajolet, P., Zimmerman, P., Van Custem, B.: A calculus for the random generation of labelled combinatorial structures. Theoret. Comput. Sci. 132, 1–35 (1994)

    Article  Google Scholar 

  9. Kreweras, G.: Aires des chemins surdiagonaux et application à un problème économique. Cahiers du Bur. Univ. de Recherche Opérationnelle 24, 1–8 (1976)

    Google Scholar 

  10. Labelle, J.: Langages de Dyck généralizés. Ann. Sci. Math. Québec 17(1), 1–13 (1993)

    Google Scholar 

  11. Lothaire, M.: Combinatorics on Words. Addison-Wesley, Reading, MA (1983)

    Google Scholar 

  12. Lothaire, M.: Applied Combinatorics on Words. Cambridge University Press (2005)

  13. Penaud, J.G., Pergola, E., Pinzani, R., Roques, O.: Chemins de Schröder et hiérarchies aléatoires. Theoret. Comput. Sci. 255, 345–361 (2001)

    Article  Google Scholar 

  14. Penaud, J.G., Roques, O.: Génération de chemins de Dyck à pics croissants. In: Proceedings of 11th FPSAC, pp. 438–449 (1999)

  15. Pergola, E., Pinzani, R.: A Combinatorial Interpretation of the Area of Schröder Paths. Electron. J. Combin. 6 (1999)

  16. Pergola, E.: Two Bijections for the Area of Dyck Paths. Discrete Math. 241, 435–447 (2001)

    Article  Google Scholar 

  17. Pergola, E., Pinzani, R., Rinaldi, S., Sulanke, R.A.: A bijective approach to the area of generalized Motzkin paths. Adv. Appl. Math. 28, 580–591 (2002)

    Article  Google Scholar 

  18. Section on Structural and Functional Genomics. In: Proceedings of 8th RECOMB, San Diego, USA, March 27–31(2004) available electronically at http://recomb04.sdsc.edu

  19. Searls, D.B.: Formal Language Theory and Biological Macromolecules. DIMACS Ser. Discrete Math. Theoret. Comput. Sci. 47, 117–140 (1999)

    Google Scholar 

  20. Stanley, R.P.: Enumerative Combinatorics, vol. 2. Cambridge University Press, Cambridge, MA (1999)

  21. Sulanke, R.A.: Moments of Generalized Motzkin paths. J. Integer Seq. 3 (2000)

  22. Takács, L.: Some asymptotic formulas for lattice paths. J. Statist. Plann. Inference 14, 123–142 (1986)

    Article  Google Scholar 

  23. Vauchaussade de Chaumont, M., Viennot, X.G.: Enumeration of RNA's secondary structures by complexity. In: Capasso, V., Grosso, E., Paven- Fontana, S.L. (eds) Mathematics in Medecine and Biology. Lecture Notes in Biomath. 57 Springer, New York, 360–365 (1985)

  24. Wormald, N.C.: Generating random unlabelled graphs. SIAM J. Comput. 16(4), 717–727 (1987)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Srečko Brlek.

Additional information

With the support of NSERC (Canada), G.N.C.S. – Istituto Nazionale di Alta Matematica (Italia), MIUR Project: Linguaggi Formalie Automi: Teoriae Applicazioni

Rights and permissions

Reprints and permissions

About this article

Cite this article

Brlek, S., Pergola, E. & Roques, O. Non uniform random generation of generalized Motzkin paths. Acta Informatica 42, 603–616 (2006). https://doi.org/10.1007/s00236-006-0008-x

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00236-006-0008-x

Keywords

Navigation