An Improved Fully Dynamic Algorithm for Counting 4-Cycles in General Graphs using Fast Matrix Multiplication
Sepehr Assadi, Vihan Shah
TL;DR
The paper tackles dynamic subgraph counting, specifically maintaining the number of 4-cycles in fully dynamic graphs. It introduces a novel approach that leverages fast matrix multiplication within a layered-graph framework, achieving a worst-case update time of $O(m^{2/3-\varepsilon})$ with $\varepsilon>0$ (approximately $0.0098$ under the current $\omega$, and $1/24$ when $\omega=2$). The authors develop a phase-based scheme, a substantial array of data-structures across degree-based vertex classes, and incorporate tiny-vertex handling to remove static-assumption limitations, ultimately extending results to general graphs via a layered-graph simulation. This work demonstrates that $O(m^{2/3})$ is not the best possible bound and opens avenues for non-combinatorial dynamic IVM techniques that exploit matrix multiplication. The results have implications for database join-size maintenance and subgraph counting in large, dynamic networks, potentially improving real-time analytics in social networks and other domains.
Abstract
We study subgraph counting over fully dynamic graphs, which undergo edge insertions and deletions. Counting subgraphs is a fundamental problem in graph theory with numerous applications across various fields, including database theory, social network analysis, and computational biology. Maintaining the number of triangles in fully dynamic graphs is very well studied and has an upper bound of O(m^{1/2}) for the update time by Kara, Ngo, Nikolic, Olteanu, and Zhang (TODS 20). There is also a conditional lower bound of approximately Omega(m^{1/2}) for the update time by Henzinger, Krinninger, Nanongkai, and Saranurak (STOC 15) under the OMv conjecture implying that O(m^{1/2}) is the ``right answer'' for the update time of counting triangles. More recently, Hanauer, Henzinger, and Hua (SAND 22) studied the problem of maintaining the number of 4-cycles in fully dynamic graphs and designed an algorithm with O(m^{2/3}) update time which is a natural generalization of the approach for counting triangles. Thus, it seems natural that O(m^{2/3}) might be the correct answer for the complexity of the update time for counting 4-cycles. In this work, we present an improved algorithm for maintaining the number of 4-cycles in fully dynamic graphs. Our algorithm achieves a worst-case update time of O(m^{2/3-eps}) for some constant eps>0. Our approach crucially uses fast matrix multiplication and leverages recent developments therein to get an improved runtime. Using the current best value of the matrix multiplication exponent omega=2.371339 we get eps=0.009811 and if we assume the best possible exponent i.e. omega=2 then we get eps=1/24. The lower bound for the update time is Omega(m^{1/2}), so there is still a big gap between the best-known upper and lower bounds. The key message of our paper is demonstrating that O(m^{2/3}) is not the correct answer for the complexity of the update time.
