(I) We revisit the algorithmic problem of finding all triangles in a graph $G=(V,E)$ with $n$ vertices and $m$ edges. According to a result of Chiba and Nishizeki (1985), this task can be achieved by a combinatorial algorithm running in $O(m \alpha) = O(m^{3/2})$ time, where $\alpha= \alpha(G)$ is the graph arboricity. We provide a new very simple combinatorial algorithm for finding all triangles in a graph and show that is amenable to the same running time analysis. We derive these worst-case bounds from first principles and with very simple proofs that do not rely on classic results due to Nash-Williams from the 1960s. (II) We extend our arguments to the problem of finding all small complete subgraphs of a given fixed size. We show that the dependency on $m$ and $\alpha$ in the running time $O(\alpha^{\ell-2} \cdot m)$ of the algorithm of Chiba and Nishizeki for listing all copies of $K_\ell$, where $\ell \geq 3$, is asymptotically tight. (III) We give improved arboricity-sensitive running times for counting and/or detection of copies of $K_\ell$, for small $\ell \geq 4$. A key ingredient in our algorithms is, once again, the algorithm of Chiba and Nishizeki. Our new algorithms are faster than all previous algorithms in certain high-range arboricity intervals for every $\ell \geq 7$.
翻译:(I) 我们重新审视在包含 $n$ 个顶点和 $m$ 条边的图 $G=(V,E)$ 中寻找所有三角形的算法问题。根据Chiba与Nishizeki(1985)的研究成果,该任务可通过运行时间为 $O(m \alpha) = O(m^{3/2})$ 的组合算法实现,其中 $\alpha= \alpha(G)$ 表示图的树度(arboricity)。我们提出一种新的极简组合算法用于寻找图中所有三角形,并证明其具有相同的运行时间复杂度分析特性。我们从基本原理出发推导这些最坏情况边界,且通过极其简洁的证明过程无需依赖Nash-Williams在20世纪60年代提出的经典结论。(II) 我们将论证扩展至寻找给定固定大小的所有小规模完全子图问题。研究表明,对于Chiba与Nishizeki算法中列举所有 $K_\ell$($\ell \geq 3$)副本的运行时间 $O(\alpha^{\ell-2} \cdot m)$,其关于 $m$ 和 $\alpha$ 的依赖关系具有渐近紧致性。(III) 针对 $\ell \geq 4$ 的小规模完全子图,我们提出改进的树度敏感性运行时间算法,用于 $K_\ell$ 副本的计数和/或检测。Chiba与Nishizeki算法再次成为我们算法的核心组件。对于每个 $\ell \geq 7$,在特定高树度值区间内,我们提出的新算法显著快于此前所有已知算法。