Faster and Generalized Temporal Triangle Counting, via Degeneracy Ordering

Noujan Pashanasangi, C. Seshadhri
6/5/2021
cs.SIcs.DS

Official code: nojanp/temporal-triangle-counting (1 star, C++, last commit 2021-07-05).

Abstract

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.

Show full abstract

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 $(δ_{1,3}, δ_{1,2}, δ_{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 $(δ_{1,3}, δ_{1,2}, δ_{2,3})$-temporal triangles. Using the classic idea of degeneracy ordering with careful combinatorial arguments, we can prove that DOTTT runs in $O(mκ\log m)$ time, where $m$ is the number of (temporal) edges and $κ$ 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.

View on arXivView PDF

Code Implementations(1)

code for the paper Faster and Generalized Temporal Triangle Counting, via Degeneracy Ordering (KDD 2021)

12C++, MakefileJun 4, 20215 years ago

Similar Papers

Cite this paper

@article{pashanasangi2021faster,
  title  = {Faster and Generalized Temporal Triangle Counting, via Degeneracy Ordering},
  author = {Noujan Pashanasangi and C. Seshadhri},
  year   = {2021},
  eprint = {2106.02762},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2106.02762}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2106.02762.svg)](https://codeofpaper.com/paper/2106.02762)

Discussion