Multi-Parameter Sampling for Rational Languages
Résumé
This paper addresses how to efficiently sample words from a rational language (over an alphabet of size $k$), while constraining every letter to a targeted frequencies of occurrence. Our approach consists in an extended -- multivariate -- version of the classical Boltzmann samplers~\cite{Duchon2004}. We prove that, under relatively weak hypotheses, our sampler returns a word of size in $[(1-\varepsilon)n, (1+\varepsilon)n]$ and exact frequency in $\mathcal{O}(n^{1+k/2})$ expected time. Moreover, if we accept a tolerance interval of length in $\mathcal{O}(\sqrt{n})$ for the number of occurrences of each letters, our sampler reaches an approximate-size generation of words in expected $\mathcal{O}(n)$ time. We illustrate these techniques on the generation of perfect Tetris histories (Tesselations of a $w\times h$ rectangle).
Origine | Fichiers produits par l'(les) auteur(s) |
---|