Scalable Triangle Counting: The Threshold Algorithm
Abstract
We study one-pass triangle counting on random-order edge streams. We present a remarkably simple algorithm---read edges from the stream until triangles are observed in the prefix, then output where is the stopping length---and prove that, when the maximum number of triangles incident to any edge satisfies , this is a -approximation of with probability using memory. Crucially, the algorithm does not need any a priori estimate of , in sharp contrast with state-of-the-art sampling-rate based algorithms (McGregor and Vorotnikova, PODS 2020; Tsourakakis et al., KDD 2009). It also does not need a prescribed memory budget: the stopping rule self-selects the prefix length and can return an estimate before reading the entire stream. The proof rests on a Schudy--Sviridenko concentration argument for an independent-edge-sampling estimator, coupled to the without-replacement prefix produced by the algorithm. On six real temporal streams, the algorithm's stopping prefix follows the predicted cube-root scaling and achieves at most error at a prefix, without using . At a fixed stored-edge budget, variance-reduced reservoir samplers are often more accurate, but only after reading the entire stream. On a separate, much larger, -edge graph, the threshold algorithm reads of the stream and returns error, while the strongest reservoir baselines do not finish a pass within the wall-clock cap.
Create a lesson
Metadata
- Categories
- cs.DS, cs.DB
Related papers
Parameter-Free Triangle Counting
Shared title terminologycs.DSAsaf Etgar, Anna Gilbert, Quanquan Liu et al.
Counting Triangles in Graph Streams with Repeatable and Forgettable Edges
Shared title terminologycs.DSSourav Chakraborty, Debarshi Chanda, Arijit Ghosh et al.
Parallelizing the Factorial Space: Multi-Core OpenMP Scaling and Scalable SIMD Acceleration of the Steinhaus-Johnson-Trotter Algorithm via Dual-Lane AVX2 Execution
Shared title terminologycs.DSSerge Melnikov
An m+n^{3/2} algorithm for counting spanning trees by \ell_1-regularized resistance
Shared title terminologycs.DSRong-Hua Li, Yichun Yang
Vertex-Weighted Graph Burning: Bounds and Algorithms
Shared title terminologycs.DSAli Abdoli Masinan, Ayda Ataiy, Hourieh Mehrabiun et al.
Approximation Algorithms for Minimizing the Makespan in Distributed Proportionate Flow Shops
Shared title terminologycs.DSDvir Shabtay, Baruch Mor, Gur Mosheiov