Triangle counting is a fundamental technique in network analysis, that has received much attention in various input models. The vast majority of triangle counting algorithms are targeted to static graphs. Yet, many real-world graphs are directed and temporal, where edges come with timestamps. Temporal triangles yield much more information, since they account for both the graph topology and the timestamps. Temporal triangle counting has seen a few recent results, but there are varying definitions of temporal triangles. In all cases, temporal triangle patterns enforce constraints on the time interval between edges (in the triangle). We define a general notion $(\delta_{1,3}, \delta_{1,2}, \delta_{2,3})$-temporal triangles that allows for separate time constraints for all pairs of edges. Our main result is a new algorithm, DOTTT (Degeneracy Oriented Temporal Triangle Totaler), that exactly counts all directed variants of $(\delta_{1,3}, \delta_{1,2}, \delta_{2,3})$-temporal triangles. Using the classic idea of degeneracy ordering with careful combinatorial arguments, we can prove that DOTTT runs in $O(m\kappa\log m)$ time, where $m$ is the number of (temporal) edges and $\kappa$ is the graph degeneracy (max core number). Up to log factors, this matches the running time of the best static triangle counters. Moreover, this running time is better than existing. DOTTT has excellent practical behavior and runs twice as fast as existing state-of-the-art temporal triangle counters (and is also more general). For example, DOTTT computes all types of temporal queries in Bitcoin temporal network with half a billion edges in less than an hour on a commodity machine.
翻译:三角形计数是网络分析中的一种基本技术, 在许多输入模型中, 三角形计数法得到了很多关注。 绝大多数三角形计数算法都是针对静态图形的。 然而, 许多真实世界的图形是定向的, 时间也是时间的, 边端会随时间戳而来。 时空三角形可以产生更多信息, 因为它们既包括图形表层, 也包括时间标记。 时间三角形计数最近得出了一些结果, 但对时间三角形的定义各不相同。 在所有情况下, 时间三角形模式会限制边缘( 在三角形中) 之间的时间间隔。 我们定义了一个通用概念 $( delta%1, 1},\ delta_%1, 1,2}, delta_1, 2},\ 真正的真实世界形图表, 美元- 时间三角形三角形会在不同时间范围内。 使用最精确的运算法, 以目前的方式, 最精确的运算法的运算法是现在的运算。