Directed acyclic graphs (DAGs) are directed graphs in which there is no path from a vertex to itself. DAGs are an omnipresent data structure in computer science and the problem of counting the DAGs of given number of vertices and to sample them uniformly at random has been solved respectively in the 70's and the 00's. In this paper, we propose to explore a new variation of this model where DAGs are endowed with an independent ordering of the out-edges of each vertex, thus allowing to model a wide range of existing data structures. We provide efficient algorithms for sampling objects of this new class, both with or without control on the number of edges, and obtain an asymptotic equivalent of their number. We also show the applicability of our method by providing an effective algorithm for the random generation of classical labelled DAGs with a prescribed number of vertices and edges, based on a similar approach. This is the first known algorithm for sampling labelled DAGs with full control on the number of edges, and it meets a need in terms of applications, that had already been acknowledged in the literature.
翻译:有向有限无环图的渐进分析与高效随机抽样
翻译后的摘要:
有向无环图(DAG)是一类有向图,其中不存在从一个顶点到其本身的路径。DAG是计算机科学中无处不在的数据结构,已经在70年代和00年代分别解决了给定顶点数目的DAG计数和均匀随机抽样问题。在本文中,我们提出了一种新的变体,其中DAG被赋予了每个顶点的外向边的独立顺序,从而允许建模广泛的现有数据结构。我们为抽样这种新类的对象提供了有效的算法,包括具有或不具有边数控制的对象,并获得它们数量的渐进等价。我们还显示了我们方法的适用性,提供了一种基于类似方法的按照预定的顶点数目和边数随机生成经典标记DAG的有效算法。这是已知的第一种完全在边数控制下抽样标记DAG的算法,并且满足了文献中已经承认的应用需求。