Counting Triangles under Updates in Worst-Case Optimal Time

We consider the problem of incrementally maintaining the triangle count query under single-tuple updates to the input relations. We introduce an approach that exhibits a space-time tradeoff such that the space-time product is quadratic in the size of the input database and the update time can be as low as the square root of this size. This lowest update time is worst-case optimal conditioned on the Online Matrix-Vector Multiplication conjecture. The classical and factorized incremental view maintenance approaches are recovered as special cases of our approach within the space-time tradeoff. In particular, they require linear-time maintenance under updates, which is suboptimal. Our approach can also count all triangles in a static database in the worst-case optimal time needed for enumerating them. 2012 ACM Subject Classification Theory of computation → Database query processing and optimization (theory); Information systems → Database views; Information systems → Data streams

[1]  Atri Rudra,et al.  Skew strikes back: new developments in the theory of join algorithms , 2013, SGMD.

[2]  Dan Olteanu,et al.  Incremental View Maintenance with Triple Lock Factorization Benefits , 2017, SIGMOD Conference.

[3]  Ziv Bar-Yossef,et al.  Reductions in streaming algorithms, with an application to counting triangles in graphs , 2002, SODA '02.

[4]  Hung Q. Ngo,et al.  Worst-Case Optimal Join Algorithms: Techniques, Results, and Open Problems , 2018, PODS.

[5]  Thomas Zeume The Dynamic Descriptive Complexity of k-Clique , 2014, MFCS.

[6]  Amir Shaikhha,et al.  DBToaster: higher-order delta processing for dynamic, frequently fresh views , 2012, The VLDB Journal.

[7]  Hung Q. Ngo,et al.  Counting Triangles under Updates in Worst-Case Optimal Time , 2018, ICDT.

[8]  Sofya Vorotnikova,et al.  Better Algorithms for Counting Triangles in Data Streams , 2016, PODS.

[9]  Dana Ron,et al.  Approximately Counting Triangles in Sublinear Time , 2015, 2015 IEEE 56th Annual Symposium on Foundations of Computer Science.

[10]  Monika Henzinger,et al.  Unifying and Strengthening Hardness for Dynamic Problems via the Online Matrix-Vector Multiplication Conjecture , 2015, STOC.

[11]  Mohammad Ghodsi,et al.  New Streaming Algorithms for Counting Triangles in Graphs , 2005, COCOON.

[12]  Nicole Schweikardt,et al.  Answering UCQs under updates and in the presence of integrity constraints , 2017, ICDT.

[13]  Christian Sohler,et al.  Counting triangles in data streams , 2006, PODS.

[14]  Noga Alon,et al.  Finding and counting given length cycles , 1997, Algorithmica.

[15]  Atri Rudra,et al.  FAQ: Questions Asked Frequently , 2015, PODS.

[16]  Graham Cormode,et al.  A second look at counting triangles in graph streams (corrected) , 2017, Theor. Comput. Sci..

[17]  Thomas Schwentick,et al.  Dynamic complexity: recent updates , 2016, SIGL.

[18]  Stijn Vansummeren,et al.  The Dynamic Yannakakis Algorithm: Compact and Efficient Query Processing Under Updates , 2017, SIGMOD Conference.

[19]  V. V. Williams ON SOME FINE-GRAINED QUESTIONS IN ALGORITHMS AND COMPLEXITY , 2019, Proceedings of the International Congress of Mathematicians (ICM 2018).

[20]  Dan Suciu,et al.  Algorithmic Aspects of Parallel Data Processing , 2018, Found. Trends Databases.

[21]  Nicole Schweikardt,et al.  Answering Conjunctive Queries under Updates , 2017, PODS.