arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2303.06090cs.DS
收藏

稀疏图上简单高效的四环计数

Simple and efficient four-cycle counting on sparse graphs

Paul Burkhardt, David G. Harris

AI总结:

本文提出一种稀疏图上计数4-环的确定性精简算法,仅需O(mδ̄)时间和n个字空间,无需哈希表或排序,且实验显示比哈希表实现平均快4至7倍。

摘要:

我们考虑在具有 n 个顶点和 m 条边的无向图 G 中计数 4-环(C₄)的问题(在二分图中,4-环也常被称为 butterflies)。最近,Wang 等人(2019, 2022)基于哈希表和按度数对图进行排序开发了针对该问题的算法。他们的算法需要 O(mδ̄) 的期望时间和 O(m) 的空间,其中 δ̄ ≤ O(√m) 是由 Burkhardt、Faber 和 Harris(2020)引入的平均退化度参数。我们开发了该算法的一个精简版本,需要 O(mδ̄) 的时间,并且恰好需要 n 个字的空间。它具有若干实际改进和优化;例如,它是完全确定性的,不需要任何辅助存储或对输入图进行排序,并且在其内层循环中仅使用加法和数组访问。我们的算法非常简单,并且易于适配为计数与每个顶点和每条边相关联的 4-环。实证测试表明,与流行的哈希表实现相比,我们基于数组的方法平均快 4 倍到 7 倍。

英文摘要:

We consider the problem of counting 4-cycles ($C_4$) in an undirected graph $G$ of $n$ vertices and $m$ edges (in bipartite graphs, 4-cycles are also often referred to as $\textit{butterflies}$). Most recently, Wang et al. (2019, 2022) developed algorithms for this problem based on hash tables and sorting the graph by degree. Their algorithm takes $O(m\barδ)$ expected time and $O(m)$ space, where $\bar δ\leq O(\sqrt{m})$ is the $\textit{average degeneracy}$ parameter introduced by Burkhardt, Faber \& Harris (2020). We develop a streamlined version of this algorithm requiring $O(m\barδ)$ time and precisely $n$ words of space. It has several practical improvements and optimizations; for example, it is fully deterministic, does not require any auxiliary storage or sorting of the input graph, and uses only addition and array access in its inner loops. Our algorithm is very simple and easily adapted to count 4-cycles incident to each vertex and edge. Empirical tests demonstrate that our array-based approach is $4\times$ -- $7\times$ faster on average compared to popular hash table implementations.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑