English

Approximately Counting Triangles in Sublinear Time

Data Structures and Algorithms 2016-11-17 v3

Abstract

We consider the problem of estimating the number of triangles in a graph. This problem has been extensively studied in both theory and practice, but all existing algorithms read the entire graph. In this work we design a {\em sublinear-time\/} algorithm for approximating the number of triangles in a graph, where the algorithm is given query access to the graph. The allowed queries are degree queries, vertex-pair queries and neighbor queries. We show that for any given approximation parameter 0<ϵ<10<\epsilon<1, the algorithm provides an estimate t^\widehat{t} such that with high constant probability, (1ϵ)t<t^<(1+ϵ)t(1-\epsilon)\cdot t< \widehat{t}<(1+\epsilon)\cdot t, where tt is the number of triangles in the graph GG. The expected query complexity of the algorithm is  ⁣(nt1/3+min{m,m3/2t})poly(logn,1/ϵ)\!\left(\frac{n}{t^{1/3}} + \min\left\{m, \frac{m^{3/2}}{t}\right\}\right)\cdot {\rm poly}(\log n, 1/\epsilon), where nn is the number of vertices in the graph and mm is the number of edges, and the expected running time is  ⁣(nt1/3+m3/2t)poly(logn,1/ϵ)\!\left(\frac{n}{t^{1/3}} + \frac{m^{3/2}}{t}\right)\cdot {\rm poly}(\log n, 1/\epsilon). We also prove that Ω ⁣(nt1/3+min{m,m3/2t})\Omega\!\left(\frac{n}{t^{1/3}} + \min\left\{m, \frac{m^{3/2}}{t}\right\}\right) queries are necessary, thus establishing that the query complexity of this algorithm is optimal up to polylogarithmic factors in nn (and the dependence on 1/ϵ1/\epsilon).

Keywords

Cite

@article{arxiv.1504.00954,
  title  = {Approximately Counting Triangles in Sublinear Time},
  author = {Talya Eden and Amit Levi and Dana Ron and C. Seshadhri},
  journal= {arXiv preprint arXiv:1504.00954},
  year   = {2016}
}

Comments

To appear in the 56th Annual IEEE Symposium on Foundations of Computer Science (FOCS 2015)

R2 v1 2026-06-22T09:09:52.218Z