We propose two efficient algorithms for generating uniform random directed acyclic graphs, including an asymptotically optimal exact-size sampler that performs $\frac{n^2}{2} + o(n^2)$ operations and requests to a random generator. This was achieved by extending the Boltzmann model for graphical generating functions and by using various decompositions of directed acyclic graphs. The presented samplers improve upon the state-of-the-art algorithms in terms of theoretical complexity and offer a significant speed-up in practice.
翻译:本文提出了两种生成均匀随机有向无环图的高效算法,包括一种渐近最优的精确规模采样器,其执行$\frac{n^2}{2} + o(n^2)$次操作并调用随机生成器。该成果通过扩展图生成函数的Boltzmann模型,并利用有向无环图的各种分解方法实现。所提出的采样器在理论复杂度上超越了现有最优算法,并在实践中实现了显著的加速效果。