Birthday paradox, coupon collectors, caching algorithms and self-organizing search
Discrete Applied Mathematics
GFUN: a Maple package for the manipulation of generating and holonomic functions in one variable
ACM Transactions on Mathematical Software (TOMS)
A calculus for the random generation of labelled combinatorial structures
Theoretical Computer Science
Random generation of words in an algebraic language in linear binary space
Information Processing Letters
Systems of functional equations
Random Structures & Algorithms - Special issue: average-case analysis of algorithms
Coloring rules for finite trees, and probabilities of monadic second order sentences
Random Structures & Algorithms
Uniform random generation of decomposable structures using floating-point arithmetic
Theoretical Computer Science - Special issue on Caen '97
A generic approach for the unranking of labeled combinatorial classes
Random Structures & Algorithms - Special issue on analysis of algorithms dedicated to Don Knuth on the occasion of his (100)8th birthday
Journal of Symbolic Computation
Boltzmann Samplers for the Random Generation of Combinatorial Structures
Combinatorics, Probability and Computing
Uniform random sampling of traces in very large models
Proceedings of the 1st international workshop on Random testing
Controlled non-uniform random generation of decomposable structures
Theoretical Computer Science
On Buffon machines and numbers
Proceedings of the twenty-second annual ACM-SIAM symposium on Discrete Algorithms
Hi-index | 5.23 |
We address the non-redundant random generation of k words of length n in 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 allow for a non-redundant generation of k words of length n in O(k@?n@?logn) arithmetic operations, after a precomputation of @Q(n) numbers. The overall complexity is therefore dominated by the generation of k words, and the non-redundancy comes at a negligible cost.