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)=p_1(y) p_2(x|y)$, which allows to introduce a rejection factor at the level of the $y$ object, that is almost surely of order $1$.
翻译:我们继续改进所谓的Boltzmann采样算法的复杂性,以精确地取样组合结构,并达到平均线性时间复杂性,即优化到多倍化常数。在这里,我们解决了不可复制的无背景结构问题,这是众所周知的Drmota-Lalley-Woods Theorem所适用的一个广泛的结构体系。我们的算法是一种拒绝算法。主要的想法是挑出某种程度的自由,即写出$p(x)=p_1(y) p_2(x)y)$,这允许在美元目标的水平上引入一个拒绝因素,这几乎肯定是一美元的顺序。