Boltzmann sampling and optimal exact-size sampling for directed acyclic graphs
Wojciech Gabryelski, Zbigniew Gołȩbiewski, Martin Pépin
TL;DR
This work addresses uniform random generation of labelled directed acyclic graphs (DAGs) by extending the graphic Boltzmann framework to digraphs. It develops two complementary Boltzmann samplers based on root-layering and a peeling decomposition, enabling efficient and scalable DAG generation. A key achievement is an asymptotically optimal exact-size sampler that uses $\frac{n^2}{2}+o(n^2)$ random bits on average with no preprocessing, and a memory-access profile compatible with a single pass over the adjacency structure. Together, these approaches yield substantial speed-ups over prior methods and provide practical tools for large-scale random DAG generation.
Abstract
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.
