NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Constant-time dynamic weight approximation for minimum spanning forest

Monika Henzinger, Pan Peng

TL;DR

This paper breaks the long-standing logarithmic time barrier for maintaining the weight of a Minimum Spanning Forest (MSF) in a dynamic graph. The authors present the first algorithms—one deterministic and one randomized—that can maintain a $(1 + \epsilon)$-approximation of the MSF weight in constant time per update, provided the range of edge weights is not too large.

What Problem Does This Paper Address?

In many real-world networks (like social media or routing tables), the graph is "dynamic"—edges are constantly being added or removed. A fundamental task is maintaining the Minimum Spanning Forest (MSF), which is the set of edges that connects all vertices with the minimum possible total weight.

While we have efficient algorithms for static graphs, the dynamic version is harder. A famous result by Patrascu and Demaine proved that maintaining the exact weight of an MSF requires at least $\Omega(\log n)$ time per update. For decades, even the best approximation algorithms were stuck at this logarithmic limit.

The authors ask a bold question: If we only need an approximate weight (within a factor of $1+\epsilon$), can we bypass this limit and achieve constant update time?

Methods

The authors achieve their results by shifting the focus from the forest's structure to a mathematical property relating MSF weight to connectivity.

  1. The MSF-to-Connectivity Formula: They utilize a known relationship where the weight of an MSF can be expressed as a sum of the number of connected components (CCs) across various subgraphs (specifically, subgraphs containing only edges below certain weight thresholds).
  2. Deterministic Estimation: To count CCs in constant time, the deterministic algorithm uses a "local exploration" strategy. It performs a limited Breadth-First Search (BFS) from the endpoints of a modified edge. The key insight is that they only need to accurately count "small" components; because there can't be many "large" components, ignoring them only introduces a small, controllable error.
  3. Randomized Estimation: The randomized algorithm uses techniques from property testing. It samples vertices to estimate the total number of components. To make this work in a dynamic setting, they developed a novel $O(n)$-space data structure that allows for sampling "non-isolated" vertices (vertices with at least one edge) in $O(1)$ time.
  4. Lower Bound Reductions: To prove when constant time is impossible, they use reductions from the "parity prefix sum" problem and dynamic connectivity, showing that if the weight range $W$ grows too fast relative to $n$, the $\Omega(\log n)$ barrier returns.

Datasets

As a theoretical computer science paper, this work does not use empirical datasets. The results are proven mathematically for any arbitrary graph $G$ with $n$ nodes and edge weights in the range $[1, W]$.

Key Insights and Ideas

  • Weight vs. Structure: Previous dynamic MSF algorithms tried to maintain the actual edges of the forest. By realizing that maintaining just the weight is a strictly easier problem, the authors were able to use local estimation techniques that are impossible for structural maintenance.
  • Small Components Matter Most: In the deterministic case, the "aha moment" is that you don't need to know the full topology. If a component is larger than $1/\epsilon$, you can treat it as "large" and bound its contribution to the error. This allows the BFS to stop early, ensuring constant time.
  • The Sampling Breakthrough: For the randomized algorithm, the authors solved a specific sub-problem: how to pick a random vertex that isn't "lonely" (isolated) in $O(1)$ time while edges are flying in and out. Their solution involves a clever use of two arrays and a counter to keep the "active" vertices packed at the front of a list.

Key Results

  • Deterministic Algorithm: Achieves an update time of $O(W^2 \log W / \epsilon^3)$. If the maximum weight $W$ and the error tolerance $\epsilon$ are constants, this is $O(1)$.
  • Randomized Algorithm: Achieves an update time of $O(\log W / \epsilon^4)$ under specific conditions (when $W$ is small compared to the minimum number of edges in the graph). This is significantly faster than previous $O(\log^4 n)$ randomized approaches.
  • The Limits of Speed: They proved that if $W \ge (\log n)^{\omega(1)}$, no deterministic algorithm can maintain the weight in constant time. This defines the "boundary" of where $O(1)$ performance is theoretically possible.

Limitations and Future Work

  • Weight Only: These algorithms provide the value of the MSF weight but do not tell you which edges are in the forest. If an application needs the actual tree structure, these algorithms cannot be used.
  • Dependence on W: The "constant" time is heavily dependent on $W$. If the edge weights span a massive range (e.g., $W = n$), the performance degrades back to or worse than logarithmic time.
  • Space Complexity: The randomized sampling structure requires $O(n)$ space. While standard for many applications, it might be a constraint for extremely sparse, massive graphs where $O(m)$ space is preferred.
  • Future Direction: A natural next step is investigating whether similar constant-time approximations exist for other dynamic graph properties, like the size of a minimum cut or maximum matching, without relying on the weight range $W$.

Summary updated

BibTeX
@article{henzinger2021constant,
  author = {Monika Henzinger and Pan Peng},
  title = {{Constant-time dynamic weight approximation for minimum spanning forest}},
  journal = {Inf. Comput.},
  year = {2021},
  doi = {10.1016/j.ic.2021.104805},
}
Figure