Abstract
We consider the problem of incrementally maintaining the triangle queries with arbitrary free variables under single-tuple updates to the input relations.
We introduce an approach called IVMϵ that exhibits a trade-off between the update time, the space, and the delay for the enumeration of the query result, such that the update time ranges from the square root to linear in the database size while the delay ranges from constant to linear time.
IVMϵ achieves Pareto worst-case optimality in the update-delay space conditioned on the Online Matrix-Vector Multiplication conjecture. It is strongly Pareto optimal for the triangle queries with no or three free variables and weakly Pareto optimal for the remaining triangle queries with one or two free variables.
IVMϵ recovers prior work such as the suboptimal classical view maintenance approach that uses delta query processing and the worst-case optimal approach that computes all triangles in a static database.
Supplemental Material
Available for Download
Supplemental movie, appendix, image and software files for, On Fundamental Principles for Thermal-Aware Design on Periodic Real-Time Multi-Core Systems
- Amir Abboud and Virginia Vassilevska Williams. 2014. Popular conjectures imply strong lower bounds for dynamic problems. In Proceedings of the FOCS. 434--443. Google ScholarDigital Library
- Mahmoud Abo Khamis, Hung Q. Ngo, and Atri Rudra. 2016. FAQ: Questions asked frequently. In Proceedings of the PODS. 13--28. DOI:10.1145/2902251.2902280 Google ScholarDigital Library
- N. Alon, R. Yuster, and U. Zwick. 1997. Finding and counting given length cycles. Algorithmica 17, 3 (1997), 209--223. DOI:10.1007/BF02523189Google ScholarCross Ref
- Ziv Bar-Yossef, Ravi Kumar, and D. Sivakumar. 2002. Reductions in streaming algorithms, with an application to counting triangles in graphs. In Proceedings of the SODA. 623--632. Google ScholarDigital Library
- Luca Becchetti, Paolo Boldi, Carlos Castillo, and Aristides Gionis. 2010. Efficient algorithms for large-scale local triangle counting. Trans. Knowl. Discov. Data 4, 3 (2010), 13:1–13:28. DOI:10.1145/1839490.1839494 Google ScholarDigital Library
- Christoph Berkholz, Jens Keppeler, and Nicole Schweikardt. 2017. Answering conjunctive queries under updates. In Proceedings of the PODS. 303--318. DOI:10.1145/3034786.3034789 Google ScholarDigital Library
- Christoph Berkholz, Jens Keppeler, and Nicole Schweikardt. 2018. Answering UCQs under updates and in the presence of integrity constraints. In Proceedings of the ICDT. 8:1–8:19. DOI:10.4230/LIPIcs.ICDT.2018.8Google Scholar
- Andreas Björklund, Rasmus Pagh, Virginia Vassilevska Williams, and Uri Zwick. 2014. Listing triangles. In Proceedings of the ICALP. 223--234. DOI:10.1007/978-3-662-43948-7_19Google ScholarCross Ref
- Laurent Bulteau, Vincent Froese, Konstantin Kutzkov, and Rasmus Pagh. 2016. Triangle counting in dynamic graph streams. Algorithmica 76, 1 (2016), 259--278. DOI:10.1007/s00453-015-0036-4 Google ScholarDigital Library
- Luciana S. Buriol, Gereon Frahling, Stefano Leonardi, Alberto Marchetti-Spaccamela, and Christian Sohler. 2006. Counting triangles in data streams. In Proceedings of the PODS. 253--262. DOI:10.1145/1142351.1142388 Google ScholarDigital Library
- Norishige Chiba and Takao Nishizeki. 1985. Arboricity and subgraph listing algorithms. SIAM J. Comput. 14, 1 (1985), 210--223. DOI:10.1137/0214017 Google ScholarDigital Library
- Rada Chirkova and Jun Yang. 2012. Materialized views. Found. Trends Datab. 4, 4 (2012), 295--405. DOI:10.1561/1900000020 Google ScholarCross Ref
- Shumo Chu and James Cheng. 2012. Triangle listing in massive networks. Trans. Knowl. Discov. Data 6, 4 (2012), 17:1–17:32. DOI:10.1145/2382577.2382581 Google ScholarDigital Library
- Graham Cormode and Hossein Jowhari. 2017. A second look at counting triangles in graph streams (corrected). Theor. Comput. Sci. 683 (2017), 22--30. DOI:10.1016/j.tcs.2016.06.020Google ScholarCross Ref
- Shaleen Deep and Paraschos Koutris. 2018. Compressed representations of conjunctive query results. In Proceedings of the PODS. 307--322. DOI:10.1145/3196959.3196979 Google ScholarDigital Library
- Lech Duraj, Krzysztof Kleiner, Adam Polak, and Virginia Vassilevska Williams. 2020. Equivalences between triangle and range query problems. In Proceedings of the SODA. DOI:10.1137/1.9781611975994.3 Google ScholarCross Ref
- Arnaud Durand and Yann Strozecki. 2011. Enumeration complexity of logical query problems with second-order variables. In Proceedings of the CSL. 189--202. DOI:10.4230/LIPIcs.CSL.2011.189Google Scholar
- Talya Eden, Amit Levi, Dana Ron, and C. Seshadhri. 2015. Approximately counting triangles in sublinear time. In Proceedings of the FOCS. 614--633. DOI:10.1109/FOCS.2015.44 Google ScholarDigital Library
- Monika Henzinger, Sebastian Krinninger, Danupon Nanongkai, and Thatchaphol Saranurak. 2015. Unifying and strengthening hardness for dynamic problems via the online matrix-vector multiplication conjecture. In Proceedings of the STOC. 21--30. DOI:10.1145/2746539.2746609 Google ScholarDigital Library
- Muhammad Idris, Martín Ugarte, and Stijn Vansummeren. 2017. The Dynamic Yannakakis algorithm: Compact and efficient query processing under updates. In Proceedings of the SIGMOD. 1259--1274. DOI:10.1145/3035918.3064027 Google ScholarDigital Library
- Alon Itai and Michael Rodeh. 1978. Finding a minimum circuit in a graph. SIAM J. Comput. 7, 4 (1978), 413--423. DOI:10.1137/0207033Google ScholarDigital Library
- Hossein Jowhari and Mohammad Ghodsi. 2005. New streaming algorithms for counting triangles in graphs. In Proceedings of the COCOON. 710--716. DOI:10.1007/11533719_72Google ScholarCross Ref
- Ahmet Kara, Hung Q. Ngo, Milos Nikolic, Dan Olteanu, and Haozhe Zhang. 2018. Counting triangles under updates in worst-case optimal time. CoRR abs/1804.02780 (2018).Google Scholar
- Ahmet Kara, Hung Q. Ngo, Milos Nikolic, Dan Olteanu, and Haozhe Zhang. 2019a. Counting triangles under updates in worst-case optimal time. In Proceedings of the ICDT. 4:1–4:18. DOI:10.4230/LIPIcs.ICDT.2019.4Google Scholar
- Ahmet Kara, Hung Q. Ngo, Milos Nikolic, Dan Olteanu, and Haozhe Zhang. 2020. Maintaining triangle queries under updates. CoRR abs/2004.03716 (2020).Google Scholar
- Ahmet Kara, Milos Nikolic, Dan Olteanu, and Haozhe Zhang. 2019b. Trade-offs in static and dynamic evaluation of hierarchical queries. CoRR abs/1907.01988 (2019).Google Scholar
- Christoph Koch, Yanif Ahmad, Oliver Kennedy, Milos Nikolic, Andres Nötzli, Daniel Lupei, and Amir Shaikhha. 2014. DBToaster: Higher-order delta processing for dynamic, frequently fresh views. VLDB J. 23, 2 (2014), 253--278. DOI:10.1007/s00778-013-0348-4Google ScholarCross Ref
- Mihail N. Kolountzakis, Gary L. Miller, Richard Peng, and Charalampos E. Tsourakakis. 2012. Efficient triangle counting in large graphs via degree-based vertex partitioning. Internet Math. 8, 1–2 (2012), 161--185. DOI:10.1080/15427951.2012.625260Google ScholarCross Ref
- Tsvi Kopelowitz, Seth Pettie, and Ely Porat. 2015. Dynamic set intersection. In Proceedings of the WADS. 470--481. DOI:10.1007/978-3-319-21840-3_39Google ScholarCross Ref
- S. Rao Kosaraju and Mihai Pop. 1998. De-amortization of algorithms. In Proceedings of the COCOON. 4--14. DOI:10.1007/3-540-68535-9_4 Google ScholarCross Ref
- Paraschos Koutris, Semih Salihoglu, and Dan Suciu. 2018. Algorithmic aspects of parallel data processing. Found. Trends Datab. 8, 4 (2018), 239--370. DOI:10.1561/1900000055 Google ScholarDigital Library
- L. H. Loomis and H. Whitney. 1949. An inequality related to the isoperimetric inequality. J. Bull. Amer. Math. Soc. 55, 55 (1949), 961--962. DOI:10.1090/S0002-9904-1949-09320-5Google ScholarCross Ref
- Andrew McGregor, Sofya Vorotnikova, and Hoa T. Vu. 2016. Better algorithms for counting triangles in data streams. In Proceedings of the PODS. 401--411. DOI:10.1145/2902251.2902283 Google ScholarDigital Library
- Hung Q. Ngo, Ely Porat, Christopher Ré, and Atri Rudra. 2018. Worst-case optimal join algorithms. J. ACM 65, 3 (2018), 16:1–16:40. DOI:10.1145/3180143 Google ScholarDigital Library
- Milos Nikolic and Dan Olteanu. 2018. Incremental view maintenance with triple lock factorization benefits. In Proceedings of the SIGMOD. 365--380. DOI:10.1145/3183713.3183758 Google ScholarDigital Library
- Mihai Patrascu. 2010. Towards polynomial lower bounds for dynamic problems. In Proceedings of the STOC. 603--610. Google ScholarDigital Library
- Thomas Schank and Dorothea Wagner. 2005. Finding, counting and listing all triangles in large graphs, an experimental study. In Proceedings of the WEA. 606--609. DOI:10.1007/11427186_54 Google ScholarDigital Library
- Thomas Schwentick and Thomas Zeume. 2016. Dynamic complexity: Recent updates. SIGLOG News 3, 2 (2016), 30--52. DOI:10.1145/2948896.2948899 Google ScholarDigital Library
- Charalampos E. Tsourakakis. 2008. Fast counting of triangles in large real networks without counting: Algorithms and laws. In Proceedings of the ICDM. 608--617. DOI:10.1109/ICDM.2008.72 Google ScholarDigital Library
- Ryan Williams. 2007. Matrix-vector multiplication in sub-quadratic time: (Some preprocessing required). In Proceedings of the SODA. 995--1001. Google ScholarDigital Library
- Virginia Vassilevska Williams. 2018. On some fine-grained questions in algorithms and complexity. In Proceedings of the ICM, Vol. 3. 3431--3472. DOI:10.1142/9789813272880_0188Google Scholar
- Raphael Yuster and Uri Zwick. 1997. Finding even cycles even faster. SIAM J. Discrete Math. 10, 2 (1997), 209--222. DOI:10.1137/S0895480194274133 Google ScholarDigital Library
- Thomas Zeume. 2017. The dynamic descriptive complexity of k-clique. Inf. Comput. 256 (2017), 9--22. DOI:10.1016/j.ic.2017.04.005Google ScholarCross Ref
Index Terms
- Maintaining Triangle Queries under Updates
Recommendations
Maintaining Acyclic Foreign-Key Joins under Updates
SIGMOD '20: Proceedings of the 2020 ACM SIGMOD International Conference on Management of DataA large number of analytical queries (e.g., all the 22 queries in the TPC-H benchmark) are based on acyclic foreign-key joins. In this paper, we study the problem of incrementally maintaining the query results of these joins under updates, i.e., ...
Differential evaluation of continual queries
ICDCS '96: Proceedings of the 16th International Conference on Distributed Computing Systems (ICDCS '96)We define continual queries as a useful tool for monitoring of updated information. Continual queries are standing queries that monitor the source data and notify the users whenever new data matches the query. In addition to periodic refresh, continual ...
Answering Conjunctive Queries under Updates
PODS '17: Proceedings of the 36th ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database SystemsWe consider the task of enumerating and counting answers to k-ary conjunctive queries against relational databases that may be updated by inserting or deleting tuples. We exhibit a new notion of q-hierarchical conjunctive queries and show that these can ...
Comments