增量式DFS算法的理论与实验研究
Incremental DFS algorithms: a theoretical and experimental study
摘要:
深度优先搜索(DFS)树是解决图问题的基本数据结构.一个具有$n$顶点和$m$边的图$G$的DFS树可以在$O(m+n)$时间内建立。到目前为止,只有少数算法已被设计用于维持增量DFS。对于无向图,这两种算法,即ADFS 1和ADFS 2 [ICALP 14],分别实现总的$O(n^{3/2}\sqrt{m})$和$O(n^2)$时间。对于DAG,唯一的非平凡算法,即FDFS [IPL 97]需要总的$O(mn)$时间。在本文中,我们进行了广泛的实验和理论评估现有的增量DFS算法在随机和真实的图形,并得出以下结果。1-对于$n \choose 2$边缘的均匀随机序列的插入,ADFS 1、ADFS 2和FDFS表现同样好,并且实验发现花费$Θ(n^2)$时间。这是非常令人惊讶的,因为ADFS 1和FDFS的最差情况界限分别比$Θ(n^2)$大$\sqrt{m/n}$和$m/n$倍。我们补充这一结果的概率分析,这些算法证明$\tilde{O}(n^2)$约束的更新时间。在这里,我们得出的结果的DFS树的结构在随机图,这是独立的利益。2-这些见解使我们设计了一个非常简单的增量DFS算法,用于无向图和有向图。该算法在理论上与密集随机图的最新技术相匹配,在实验上优于最新技术。它也可以作为一个单通道半流算法的增量DFS和强连通性的随机图。3-即使对于实数图,ADFS 1和FDFS的性能也比它们的理论界限好得多。在这里,我们再次提出了两个简单的算法,增量DFS的有向和无向实数图。事实上,我们的有向图算法几乎总是与FDFS的性能相匹配。
英文摘要:
Depth First Search (DFS) tree is a fundamental data structure for solving graph problems. The DFS tree of a graph $G$ with $n$ vertices and $m$ edges can be built in $O(m+n)$ time. Till date, only a few algorithms have been designed for maintaining incremental DFS. For undirected graphs, the two algorithms, namely, ADFS1 and ADFS2 [ICALP14] achieve total $O(n^{3/2}\sqrt{m})$ and $O(n^2)$ time respectively. For DAGs, the only non-trivial algorithm, namely, FDFS [IPL97] requires total $O(mn)$ time. In this paper, we carry out extensive experimental and theoretical evaluation of existing incremental DFS algorithms in random and real graphs, and derive the following results. 1- For insertion of uniformly random sequence of $n \choose 2$ edges, ADFS1, ADFS2 and FDFS perform equally well and are found to take $Θ(n^2)$ time experimentally. This is quite surprising because the worst case bounds of ADFS1 and FDFS are greater than $Θ(n^2)$ by a factor of $\sqrt{m/n}$ and $m/n$ respectively. We complement this result by probabilistic analysis of these algorithms proving $\tilde{O}(n^2)$ bound on the update time. Here, we derive results about the structure of a DFS tree in random graphs, which are of independent interest. 2- These insights led us to design an extremely simple incremental DFS algorithm for both undirected and directed graphs. This algorithm theoretically matches and experimentally outperforms the state-of-the-art in dense random graphs. It can also be used as a single-pass semi-streaming algorithm for incremental DFS and strong connectivity in random graphs. 3- Even for real graphs, both ADFS1 and FDFS perform much better than their theoretical bounds. Here again, we present two simple algorithms for incremental DFS for directed and undirected real graphs. In fact, our algorithm for directed graphs almost always matches the performance of FDFS.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。