Fully Dynamic Triangle and 4-Vertex Subgraph Counting: From Theory to Practice and Back Again
Kathrin Hanauer, Sophia Heck, Monika Henzinger, Leonhard Sidl
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.
Create a lesson
Related papers
Online and Fully-Dynamic Sorting
Shared title terminology · Yossi Azar, Sujoy Bhore, Devdan Dey et al.
Fully Dynamic Unconstrained Submodular Maximization
Shared title terminology · Mohammad Hajiaghayi
Dynamic (Δ+1) Vertex Coloring with Adaptive Adversaries: Entropy Compression to the Rescue
Shared title terminology · Sepehr Assadi, Helia Yazdanyar
Fully Dynamic All-Pairs Min Cuts on Planar Graphs via Planar Pattern Emulators
Shared title terminology · Arnold Filtser, Gramoz Goranci, Ali Momeni et al.
Vertex Ordering for Exact Triangle Listing: Concave Geometry and Certified Rounding
Shared title terminology · Kourosh Mirsohi, Melika Gorgi, Erfan Hajihashemi
Subgraph Counting with Local Node Differential Privacy
Shared title terminology · Sofya Raskhodnikova, Adam Smith, Connor Wagaman et al.