Non-redundant random generation from weighted context-free languages
Yann Ponty (INRIA Saclay - Ile de France, LIX)

TL;DR
This paper introduces an efficient recursive algorithm for non-redundant random generation of multiple words from weighted context-free languages, outperforming rejection-based methods especially for large k.
Contribution
It proposes a novel recursive algorithm that enables non-redundant generation of words with significantly improved complexity over traditional rejection methods.
Findings
Recursive algorithm achieves O(kn log n) complexity after precomputation.
Rejection-based approach can have exponential time complexity in k.
Non-redundant generation cost is negligible compared to overall complexity.
Abstract
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 the limits of a rejection-based approach, whose time complexity is shown to grow exponentially in k in some cases. We propose an alternative recursive algorithm, whose careful implementation allows for a non-redundant generation of k words of size n in O(kn log n) arithmetic operations after the precomputation of O(n) numbers. The overall complexity is therefore dominated by the generation of k words, and the non-redundancy comes at a negligible cost.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAlgorithms and Data Compression · semigroups and automata theory · DNA and Biological Computing
