The relevant prefixes of coloured Motzkin walks: An average case analysis

  • Authors:
  • D. Merlini;R. Sprugnoli

  • Affiliations:
  • Dipartimento di Sistemi e Informatica, viale Morgagni 65, 50134, Firenze, Italy;Dipartimento di Sistemi e Informatica, viale Morgagni 65, 50134, Firenze, Italy

  • Venue:
  • Theoretical Computer Science
  • Year:
  • 2010

Quantified Score

Hi-index 5.23

Visualization

Abstract

In this paper we study some relevant prefixes of coloured Motzkin walks (otherwise called coloured Motzkin words). In these walks, the three kinds of step can have @a,@b and @c colours, respectively. In particular, when @a=@b=@c=1 we have the classical Motzkin walks while for @a=@c=1 and @b=0 we find the well-known Dyck walks. By using the concept of Riordan arrays and probability generating functions we find the average length of the relevant prefix in a walk of length n and the corresponding variance in terms of @a,@b and @c. This result is interesting from a combinatorial point of view and also provides an average case analysis of algorithms related to the problem of ranking and generating uniformly at random the coloured Motzkin words.