arXiv · 2610.29776
Fully Dynamic Triangle and 4-Vertex Subgraph Counting: From Theory to Practice and Back Again
Abstract
Counting small patterns is a core primitive in large-scale graph analytics, with numerous applications in data management and network analysis. As modern graphs are massive and continuously evolving, maintaining such counts efficiently under updates is essential. Although specialized dynamic algorithms for patterns with up to four vertices exist, they remain largely theoretical; practitioners instead rely on general-purpose or approximate methods. We present an in-depth study of two dynamic approaches by Eppstein et al. and Hanauer et al. for maintaining counts of triangles and all connected four-vertex subgraph patterns, both based on variants of heavy-light vertex partitioning. We introduce theoretical and practical optimizations and develop hybrid variants that combine complementary strengths of both approaches. Experiments on 56 large real-world and synthetic dynamic graphs show that our optimized algorithms outperform the original methods and strong static and dynamic baselines on nearly all instances, both in total running time and worst-case update time, with speedups of up to several orders of magnitude. We further provide practical guidelines for algorithm selection and tuning. To the best of our knowledge, this is the first comprehensive empirical study of heavy-light partitioning for dynamic subgraph counting, and our findings may inform other algorithms based on this technique.
Explore related subjects
Keep this discovery
Explore connections, maps & timelines
Kathrin Hanauer, Sophia Heck, Monika Henzinger, Leonhard Sidl. 2026-10-21. Fully Dynamic Triangle and 4-Vertex Subgraph Counting: From Theory to Practice and Back Again. https://arxiv.org/abs/2610.29776
Cite the original work for its findings. Save a collection to share your selection of sources.