Various specifiable combinatorial structures, with d extensive parameters, can be exactly sampled both by the recursive method, with linear arithmetic complexity if a heavy preprocessing is performed, or by the Boltzmann method, with complexity Theta(n^{1+d/2}). We discuss a modified recursive method, crucially based on the asymptotic expansion of the associated saddle-point integrals, which can be adopted for a large number of such structures (e.g. partitions, permutations, lattice walks, trees, random graphs, all with a variety of prescribed statistics and/or constraints). The new algorithm requires no preprocessing, still it has linear complexity on average. In terms of bit complexity, instead of arithmetic, we only have extra logarithmic factors. For many families of structures, this provides, at our knowledge, the only known quasi-linear generators. We present the general theory, and detail a specific example: the partitions of n elements into k non-empty blocks, counted by the Stirling numbers of the second kind. These objects are involved in the exact sampling of minimal automata with prescribed alphabet size and number of states, which is thus performed here with average Theta(n ln n) bit complexity, outbreaking all previously known Theta(n^{3/2}) algorithms.

生成讲解博客的中文版本

生成AI智能校验的中文版本