Batch-dynamic Algorithms via Parallel Change Propagation and Applications to Dynamic Trees

Umut A. Acar, Daniel Anderson, Guy E. Blelloch, Laxman Dhulipala, Sam WestrickarXiv 2020

Introduction

Dynamic trees are a fundamental structure in graph theory, enabling the maintenance of a forest of trees as edges are added (linked) or removed (cut). While sequential algorithms such as Link-Cut Trees and Euler Tour Trees (ETTs) are well-established, they are designed to process updates one by one. In modern computational environments—ranging from massive social network analysis to real-time physical simulations—data often arrives in large batches. Processing these batches sequentially on a single CPU is inefficient, yet designing parallel dynamic algorithms from scratch is notoriously difficult and error-prone.

This paper introduces a general framework for "dynamizing" static parallel algorithms using change propagation. By applying this framework to the classic problem of tree contraction, the authors develop the first work-efficient parallel batch-dynamic algorithm for dynamic trees. This approach supports a wide array of queries, including those involving non-invertible operations, with optimal work bounds and remarkably low span.

The Challenge of Batch-Parallelism

Previous attempts to parallelize dynamic tree operations have faced significant hurdles. Most existing parallel data structures, such as parallel Euler Tour Trees, are limited in the types of queries they can support. Specifically, they often require "invertible" operations (e.g., addition, where an operation can be reversed by subtraction) to maintain subtree or path properties. This limitation makes them unsuitable for non-invertible tasks, such as finding the maximum value along a path or determining the diameter of a subtree.

Furthermore, the manual design of parallel dynamic algorithms is complex. Developers must carefully manage concurrency and state consistency, which often leads to specialized solutions that do not generalize well to other problems.

A General Framework for Dynamization

The authors propose a two-step solution that shifts the focus from manual algorithm design to automated change propagation:

1. Change Propagation in Round-Synchronous Models

The framework operates within a "round-synchronous" parallel model, where an algorithm proceeds in discrete rounds. By tracking dependencies between memory reads and writes across these rounds, the framework implements a change propagation mechanism. When the input changes (e.g., a batch of edges is modified), the framework identifies only the "affected" computations and reruns them, rather than restarting the entire process from scratch.

2. Computation Distance ($W_\Delta$)

To analyze the efficiency of this approach, the authors introduce a new cost model called "computation distance." This metric measures the total work of the round computations that differ between two executions (e.g., the state before and after a batch update). This provides a rigorous way to bound the work required to update the data structure.

Application: Parallel Tree Contraction

The authors apply this framework to the Miller-Reif tree contraction algorithm. By dynamizing tree contraction, they construct Rake-Compress (RC) trees in parallel. RC-trees are a powerful hierarchical representation of a tree that can support both path-based and subtree-based queries.

The core insight is that Miller-Reif tree contraction is "stable." Small changes to the input tree do not cause a massive ripple effect throughout the parallel contraction process. The authors prove that for a tree of size $n$, a batch of $k$ updates results in a computation distance of only $O(k \log(1 + n/k))$.

Key Results and Performance

The resulting batch-dynamic tree algorithm provides strong theoretical guarantees:

  • Work Efficiency: For a batch of $k$ insertions or deletions, the algorithm performs $O(k \log(1 + n/k))$ work in expectation. This matches the best-known sequential bounds for batch updates, meaning the parallelism does not introduce significant overhead in terms of total operations.
  • Low Span: The "span" (the longest chain of sequential dependencies, representing the parallel runtime) is $O(\log n \log^* n)$ with high probability. This indicates that the algorithm can scale effectively across a large number of processors.
  • Versatile Querying: Once the batch update is processed, the structure can answer a variety of queries—including connectivity, Least Common Ancestor (LCA), subtree-sum, path-sum, diameter, center, and median—in $O(\log n)$ time. Crucially, this includes non-invertible functions that previous parallel methods could not handle.

Conclusion and Future Work

This research demonstrates that it is possible to create efficient dynamic algorithms by leveraging the stability of static parallel algorithms. The "automatic" nature of the framework reduces the complexity of designing dynamic data structures while maintaining high performance.

While the theoretical bounds are excellent, the authors note that the framework's requirement for "restricted" round-synchronous algorithms—where processes only read data from the immediately preceding round—may limit its application to certain classes of algorithms. Additionally, while the work and span are theoretically optimal, practical implementations must account for the constant-factor overhead associated with tracking dependencies. Future research may explore extending this framework to more complex graph problems, such as dynamic shortest paths or dynamic matchings, and evaluating its performance in physical hardware environments.

Summary updated

BibTeX
@misc{acar2020batch,
  author = {Umut A. Acar and Daniel Anderson and Guy E. Blelloch and Laxman Dhulipala and Sam Westrick},
  title = {{Batch-dynamic Algorithms via Parallel Change Propagation and Applications to Dynamic Trees}},
  year = {2020},
  eprint = {2002.05129},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2002.05129},
}
Figure