Uniform random generations and rejection method(II) with trivial majorant - Inria - Institut national de recherche en sciences et technologies du numérique
Pré-Publication, Document De Travail Année : 2023

Uniform random generations and rejection method(II) with trivial majorant

Laurent Alonso
  • Fonction : Auteur
  • PersonId : 1276883

Résumé

We present a simple algorithm to help generate simple structures: 'Fibonacci words' (i.e., certain words that are enumerated by Fibonacci numbers), Motzkin words, Schröder trees of size n. It starts by choosing an initial integer with uniform probability (i.e., 1/n for some n), then uses a basic rejection method to accept or reject it. We show that at least for these structures, this leads to very simple and efficient algorithms with an average complexity of O(√ n log n) that only use small integers (integers smaller than n^2). More generally, for structures that satisfy a basic condition, we prove that this leads to an algorithm with an average complexity of O(n). We then show that we can extend it to be more efficient if a distribution has a long 'trail' by showing how we can generate Partial Injections of size n in O(n^(1/4) log n) and Motzkin left factors of size n and final height h in O(√ n log n).
Fichier principal
Vignette du fichier
binomial_generation.pdf (228.08 Ko) Télécharger le fichier
Origine Fichiers produits par l'(les) auteur(s)

Dates et versions

hal-04185683 , version 1 (23-08-2023)

Licence

Identifiants

  • HAL Id : hal-04185683 , version 1

Citer

Laurent Alonso. Uniform random generations and rejection method(II) with trivial majorant. 2023. ⟨hal-04185683⟩
37 Consultations
23 Téléchargements

Partager

More