Abstract

The main result of this paper is an algorithm which generates uniformly at random a Dyck path with increasing peaks, in quasi-linear time. First, we show that the ratio between the number of Dyck paths with decreasing valleys and the number of Dyck paths with increasing peaks, of a given size, tends to a constant c=2,303727… . Then, we give an algorithm for the generation of Dyck paths with decreasing valleys by coding these paths with words of a rational language. This leads to a reject algorithm for the generation of Dyck paths with increasing peaks, with less than three failures, in average.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call