Boltzmann sampling of irreducible context-free structures in linear time

We continue our program of improving the complexity of so-called ‘Boltzmann sampling’ algorithms, for the exact sampling of combinatorial structures, and reach average linear-time complexity, i.e. optimality up to a multiplicative constant. Here we solve this problem for ‘irreducible context-free structures’, a broad family of structures to which the celebrated Drmota–Lalley–Woods Theorem applies. Our algorithm is a ‘rejection algorithm’. The main idea is to single out some degrees of freedom, i.e. write p(x) = p1(y)p2(x|y), which allows to introduce a rejection factor at the level of the y object, that is almost surely of order 1.

[1]  Alain Denise Génération aléatoire uniforme de mots de langages rationnels , 1996, Theor. Comput. Sci..

[2]  Olivier Bodini,et al.  Random Sampling of Plane Partitions , 2006, Combinatorics, Probability and Computing.

[3]  Frédérique Bassino,et al.  Linear-time exact sampling of sum-constrained random variables , 2018, GASCom.

[4]  Yann Ponty,et al.  Multi-dimensional Boltzmann Sampling of Languages , 2010, 1002.0046.

[5]  Luc Devroye,et al.  Simulating Size-constrained Galton-Watson Trees , 2012, SIAM J. Comput..

[6]  Philippe Duchon Random generation of combinatorial structures: Boltzmann samplers and beyond , 2011, Proceedings of the 2011 Winter Simulation Conference (WSC).

[7]  Omer Giménez,et al.  A Linear Algorithm for the Random Sampling from Regular Languages , 2010, Algorithmica.

[8]  Axel Bacher,et al.  Efficient random sampling of binary and unary-binary trees via holonomic equations , 2017, Theor. Comput. Sci..

[9]  Guy Louchard,et al.  Boltzmann Samplers for the Random Generation of Combinatorial Structures , 2004, Combinatorics, Probability and Computing.

[10]  Richard Arratia,et al.  Probabilistic Divide-and-Conquer: A New Exact Simulation Method, With Integer Partitions as an Example , 2011, Combinatorics, Probability and Computing.

[11]  Hsien-Kuei Hwang,et al.  Generating Random Permutations by Coin Tossing , 2017, ACM Trans. Algorithms.

[12]  P. Flajolet,et al.  Boltzmann Sampling of Unlabelled Structures , 2006 .

[13]  Josef Kittler,et al.  Combinatorial Algorithms , 2016, Lecture Notes in Computer Science.

[14]  Olivier Bodini,et al.  Entropic Uniform Sampling of Linear Extensions in Series-Parallel Posets , 2017, CSR.

[15]  Philippe Flajolet,et al.  A Calculus for the Random Generation of Labelled Combinatorial Structures , 1994, Theor. Comput. Sci..

[16]  Axel Bacher,et al.  MergeShuffle: a very fast, parallel random permutation algorithm , 2015, GASCom.

[17]  Philippe Duchon,et al.  Preserving the Number of Cycles of Length k in a Growing Uniform Permutation , 2016, Electron. J. Comb..

[18]  Michael Drmota,et al.  Systems of functional equations , 1997, Random Struct. Algorithms.

[19]  S. Lalley Finite Range Random Walk on Free Groups and Homogeneous Trees , 1993 .

[20]  J. Marckert,et al.  Some families of increasing planar maps , 2007, 0712.0593.

[21]  Michèle Soria,et al.  Boltzmann samplers for first-order differential specifications , 2012, Discret. Appl. Math..

[22]  Frédérique Bassino,et al.  Linear-time generation of inhomogeneous random directed walks , 2015, ANALCO.

[23]  Michèle Soria,et al.  Algorithms for combinatorial structures: Well-founded systems and Newton iterations , 2011, J. Comb. Theory, Ser. A.

[24]  Olivier Bodini,et al.  Polynomial tuning of multiparametric combinatorial samplers , 2017, ANALCO.

[25]  Frédérique Bassino,et al.  Asymptotic enumeration of Minimal Automata , 2011, STACS.

[26]  H. Robbins A Remark on Stirling’s Formula , 1955 .

[27]  Alan R. Woods Coloring rules for finite trees, and probabilities of monadic second order sentences , 1997, Random Struct. Algorithms.

[28]  Axel Bacher,et al.  Improving the Florentine algorithms: recovering algorithms for Motzkin and Schröder paths , 2018, ArXiv.

[29]  Axel Bacher,et al.  Exact-size Sampling for Motzkin Trees in Linear Time via Boltzmann Samplers and Holonomic Specification , 2013, ANALCO.

[30]  Alain Denise,et al.  Uniform Random Generation of Decomposable Structures Using Floating-Point Arithmetic , 1999, Theor. Comput. Sci..