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).
Similar content being viewed by others
References
Alonso, L.: Uniform Generation of a Motzkin word. Theoret. Comput. Sci. 134(2), 529–536 (1994)
Alonso, L., Schott, R.: Random generation of trees. Kluwer Academic Publishers, Dordrecht, The Netherlands (1995)
Barcucci, E., Pinzani, R., Sprugnoli, R.: The random generation of directed animals. Theoret. Comput. Sci. 127, 333–350 (1994)
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.
Denise, A., Ponty, Y., Termier, M.: Random generation of structured genomic sequences. In: Proceedings of 7th RECOMB, Berlin, Germany, April 10–13 (2003)
Devroye, L.: Non-uniform random variate generation. Springer-Verlag, New York, NY (1986)
Dvoretzky, A., Motzkin, Th.: A problem of arrangements. Duke Math. J. 14, 305–313 (1976)
Flajolet, P., Zimmerman, P., Van Custem, B.: A calculus for the random generation of labelled combinatorial structures. Theoret. Comput. Sci. 132, 1–35 (1994)
Kreweras, G.: Aires des chemins surdiagonaux et application à un problème économique. Cahiers du Bur. Univ. de Recherche Opérationnelle 24, 1–8 (1976)
Labelle, J.: Langages de Dyck généralizés. Ann. Sci. Math. Québec 17(1), 1–13 (1993)
Lothaire, M.: Combinatorics on Words. Addison-Wesley, Reading, MA (1983)
Lothaire, M.: Applied Combinatorics on Words. Cambridge University Press (2005)
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)
Penaud, J.G., Roques, O.: Génération de chemins de Dyck à pics croissants. In: Proceedings of 11th FPSAC, pp. 438–449 (1999)
Pergola, E., Pinzani, R.: A Combinatorial Interpretation of the Area of Schröder Paths. Electron. J. Combin. 6 (1999)
Pergola, E.: Two Bijections for the Area of Dyck Paths. Discrete Math. 241, 435–447 (2001)
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)
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
Searls, D.B.: Formal Language Theory and Biological Macromolecules. DIMACS Ser. Discrete Math. Theoret. Comput. Sci. 47, 117–140 (1999)
Stanley, R.P.: Enumerative Combinatorics, vol. 2. Cambridge University Press, Cambridge, MA (1999)
Sulanke, R.A.: Moments of Generalized Motzkin paths. J. Integer Seq. 3 (2000)
Takács, L.: Some asymptotic formulas for lattice paths. J. Statist. Plann. Inference 14, 123–142 (1986)
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)
Wormald, N.C.: Generating random unlabelled graphs. SIAM J. Comput. 16(4), 717–727 (1987)
Author information
Authors and Affiliations
Corresponding author
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
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
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00236-006-0008-x