Non-redundant random generation algorithms for weighted context-free languages - Inria - Institut national de recherche en sciences et technologies du numérique
Pré-Publication, Document De Travail Année : 2011

Non-redundant random generation algorithms for weighted context-free languages

Résumé

We address the non-redundant random generation of $k$ words of length $n$ from a context-free language. Additionally, we want to avoid a predefined set of words. We study a rejection-based approach, whose worst-case time complexity is shown to grow exponentially with $k$ for some specifications and in the limit case of a coupon collector. We propose two algorithms respectively based on the recursive method and on an unranking approach. We show how careful implementations of these algorithms allows for the non-redundant generation of $k$ words of size $n$ in $\mathcal{O}(k\cdot n\cdot \log{n})$ arithmetic operations, after precomputation of $\Theta(n)$ numbers. The overall complexity is therefore dominated by the generation of $k$ words, and the non-redundancy comes at a negligible cost.
Fichier principal
Vignette du fichier
NonRedundantGeneration-TCS-2010.pdf (382.58 Ko) Télécharger le fichier
Origine Fichiers produits par l'(les) auteur(s)

Dates et versions

inria-00607745 , version 1 (11-07-2011)
inria-00607745 , version 2 (01-11-2012)

Identifiants

  • HAL Id : inria-00607745 , version 1

Citer

Andy Lorenz, Yann Ponty. Non-redundant random generation algorithms for weighted context-free languages. 2011. ⟨inria-00607745v1⟩
378 Consultations
417 Téléchargements

Partager

More