https://hal.archives-ouvertes.fr/hal-00820373v2Basset, NicolasNicolasBassetLIGM - Laboratoire d'Informatique Gaspard-Monge - UPEM - Université Paris-Est Marne-la-Vallée - ENPC - École des Ponts ParisTech - ESIEE Paris - Fédération de Recherche Bézout - CNRS - Centre National de la Recherche ScientifiqueLIAFA - Laboratoire d'informatique Algorithmique : Fondements et Applications - UPD7 - Université Paris Diderot - Paris 7 - CNRS - Centre National de la Recherche ScientifiqueCounting and generating permutations using timed languages (long version)HAL CCSD2013signature of a permutationregular language of signaturesascents and descents of a permutationvolumes of timed languagesexponential generating functionsuniform sampling of permutationsorder and chain polytopesuniform sampling of timed words[INFO.INFO-CL] Computer Science [cs]/Computation and Language [cs.CL]Basset, Nicolas2013-10-02 10:59:362022-09-29 14:21:152013-10-02 17:09:04enPreprints, Working Papers, ...https://hal.archives-ouvertes.fr/hal-00820373v1application/pdf2The signature of a permutation $\sigma$ is a word whose letter of index i is d when $sigma$ has a descent (i.e. $\sigma(i)>\sigma(i+1)$) and is a when $\sigma$ has an ascent (i.e. $\sigma(i)<\sigma(i+1)$). Combinatorics of permutations with a prescribed signature is quite well explored. Given a language over the alphabet {a,d}, we associate to it the class of permutations with signature in the language. Here we state and address the two problems of counting and randomly generating for every classes of permutations associated to a regular language. First we give an algorithm that computes a closed form formula for the exponential generating function of such a class. Then we give an algorithm that given a regular language L and an integer n generates randomly the n-length permutations of the class associated to L in a uniform manner, i.e. all the permutations of length n with signature in L are equally probable to be returned. Both contributions are based on a geometric interpretation of a subclass of regular timed languages.