Approximately Counting Triangles in Sublinear TimeOpen Website

Published: 2017, Last Modified: 05 Oct 2023SIAM J. Comput. 2017Readers: Everyone
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 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<\epsilon<1$, the algorithm provides an estimate $\widehat{t}$ such that, with high constant probability, $(1-\epsilon)\cdot t< \widehat{t}<(1+\epsilon)\cdot t$, where $t$ is the number of triangles in the graph $G$. The expected query complexity of the algorithm is $(\frac{n}{t^{1/3}} + \min\{m, \frac{m^{3/2}}{t}\})\cdot {poly}(\log n, \frac{1}{\epsilon})$, where $n$ is the number of vertices in the graph and $m$ is the number of edges. The expected running time of the algorithm is $(\frac{n}{t^{1/3}} + \frac{m^{3/2}}{t})\cdot {poly}(\log n, \frac{1}{\epsilon})$. We also prove that $\Omega(\frac{n}{t^{1/3}} + \min\{m, \frac{m^{3/2}}{t}\})$ queries are necessary, thus establishing that the query complexity of this algorithm is optimal up to the dependence on ${poly}(\log n, \frac{1}{\epsilon})$.
0 Replies

Loading