Author/Authors :
Jean-Guy Penaud، نويسنده , , Elisa Pergola and Olivier Roques ، نويسنده ,
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.
Résumé
Le résultat principal de cet article est un algorithme qui engendre de façon aléatoire et uniforme un chemin de Dyck à pics croissants en temps quasi-linéaire. Nous montrons que le rapport entre le nombre de chemins de Dyck à vallées décroissantes et le nombre de chemins de Dyck à pics croissants, de taille fixée, tend vers une constante c=2,303727… Nous donnons ensuite un algorithme de génération des chemins de Dyck à vallées décroissantes en temps quasi-linéaire, en codant ces chemins par les mots dʹun langage rationnel. Enfin, nous en déduisons un algorithme à rejet pour engendrer les chemins de Dyck à pics croissants, avec en moyenne moins de trois échecs.