Abstract
On an evolving graph that is continuously updated by a high-velocity stream of edges, how can one efficiently maintain if two vertices are connected? This is the connectivity problem, a fundamental and widely studied problem on graphs. We present the first shared-memory parallel algorithm for incremental graph connectivity that is both provably work-efficient and has polylogarithmic parallel depth. We also present a simpler algorithm with slightly worse theoretical properties, but which is easier to implement and has good practical performance. Our experiments show a throughput of hundreds of millions of edges per second on a $20$-core machine.
Introduction
In the era of big data, graphs representing social media interactions, financial transactions, or IoT sensor networks are rarely static. These "evolving graphs" are constantly updated by high-velocity streams of new edges. A fundamental challenge in managing these graphs is maintaining connectivity information: determining in real-time if a path exists between two vertices.
While sequential algorithms like the classic Union-Find data structure are highly effective, they struggle to leverage modern multi-core processors. Conversely, existing parallel algorithms are often designed for static graphs and lack the "incremental" capability needed to update connectivity without full recomputation. This paper introduces algorithms that are both work-efficient (performing no more total work than the best sequential versions) and possess low parallel depth, allowing for massive concurrency.
Methods
The authors propose a "bulk-parallel" model where edges and queries are processed in minibatches. Two primary approaches are detailed:
Simple Parallel Incremental Connectivity
This algorithm acts as a practical bridge between theory and implementation. It processes a batch of edges by relabeling them based on their current "supernodes" (roots in a union-find forest). It identifies new connections within the minibatch using a standard parallel connectivity algorithm and then merges these components into the main data structure using a recursive Parallel-Join operation.
Work-Efficient Parallel Algorithm
To match the optimal $O(\alpha(m, n))$ work complexity of sequential algorithms, the authors implemented a novel parallel path compression technique called Bulk-Find. This two-phase procedure uses a Breadth-First Search (BFS) approach to find roots for all queries in a batch, coalescing "flows" when they meet at the same node to avoid redundant work. The second phase reverses this process to distribute results and "flatten" the trees across the entire forest simultaneously.
Experimental Evaluation
The algorithms were evaluated using synthetic graph streams (e.g., 3Dgrid, random, rMat) designed to mimic real-world topologies.
Key Results: * High Throughput: On a 20-core machine, the implementation processed hundreds of millions of edges per second. * Strong Speedup: The algorithm achieved an 8–11x speedup over single-threaded performance. * Theoretical Milestone: It is the first algorithm to achieve the optimal $O((m+q)\alpha(m+q, n))$ work bound for $m$ edges and $q$ queries in a parallel, incremental setting with polylogarithmic depth. * Scalability: Performance scales well with thread count, especially on complex power-law graphs (rMat) where connectivity changes rapidly.
Conclusion and Future Work
This research demonstrates that batching is a powerful lever for throughput, reducing synchronization overhead and maximizing parallel utilization. While the current algorithms are strictly incremental (handling only edge additions), they serve as a vital stepping stone toward fully dynamic connectivity, which would include edge deletions. Future work will focus on bridging the gap between the complex theoretical "Work-Efficient" model and practical production environments, as well as optimizing batch sizes to balance throughput against query latency.
Summary updated