English

How Hard is Counting Triangles in the Streaming Model

Data Structures and Algorithms 2013-04-05 v1

Abstract

The problem of (approximately) counting the number of triangles in a graph is one of the basic problems in graph theory. In this paper we study the problem in the streaming model. We study the amount of memory required by a randomized algorithm to solve this problem. In case the algorithm is allowed one pass over the stream, we present a best possible lower bound of Ω(m)\Omega(m) for graphs GG with mm edges on nn vertices. If a constant number of passes is allowed, we show a lower bound of Ω(m/T)\Omega(m/T), TT the number of triangles. We match, in some sense, this lower bound with a 2-pass O(m/T1/3)O(m/T^{1/3})-memory algorithm that solves the problem of distinguishing graphs with no triangles from graphs with at least TT triangles. We present a new graph parameter ρ(G)\rho(G) -- the triangle density, and conjecture that the space complexity of the triangles problem is Ω(m/ρ(G))\Omega(m/\rho(G)). We match this by a second algorithm that solves the distinguishing problem using O(m/ρ(G))O(m/\rho(G))-memory.

Keywords

Cite

@article{arxiv.1304.1458,
  title  = {How Hard is Counting Triangles in the Streaming Model},
  author = {Vladimir Braverman and Rafail Ostrovsky and Dan Vilenchik},
  journal= {arXiv preprint arXiv:1304.1458},
  year   = {2013}
}
R2 v1 2026-06-21T23:54:04.319Z