Purpose: Greg Frederickson’s work on spanning trees covers two related results:
- Dynamic MST maintenance in per edge update, via topology trees and the ambivalent data structure;
- Topology trees — a general tree-clustering structure for dynamic tree problems.
The closely related Fredman-Tarjan algorithm (often confused with this one) computes a static MST in .
Topology trees
Partition a bounded-degree tree into clusters of vertices, then recursively cluster the cluster graph, building a balanced hierarchy of levels. Each level shrinks the tree by a constant factor.
This gives:
- path and subtree aggregate queries;
- link and cut;
- support for non-local information (like “the minimum edge crossing a cut”), which is what dynamic MST needs and what plain link-cut trees handle less naturally.
Dynamic MST
Maintain a spanning forest under edge insertion and deletion:
- Insert : if are in different components, add it. Otherwise find the maximum-weight edge on the tree path ; if it exceeds , swap. This is a path-max query — with topology trees.
- Delete a tree edge: the hard case. The tree splits into two components and you must find the minimum replacement edge crossing the cut. Frederickson’s ambivalent data structure partitions the edges so that this search takes .
With the sparsification technique of Eppstein, Galil, Italiano and Nissenzweig this improves to .
Complexity landscape for dynamic connectivity / MST
| Problem | Best known | Technique |
|---|---|---|
| Incremental connectivity | amortized | DSU |
| Decremental connectivity (trees) | amortized | Euler tour + tricks |
| Fully dynamic connectivity | amortized | HDT |
| Fully dynamic MST | amortized | HDT extension |
| Frederickson (original) | worst case | topology trees |
| Offline dynamic connectivity | segment tree on time + rollback DSU |
What to write in a contest
Offline dynamic connectivity: put each edge’s lifetime as an interval on a segment tree over the time axis, DFS the segment tree, and use a rollback DSU. About 60 lines, , and it handles the overwhelming majority of dynamic-graph problems that appear in contests. See Dynamic Connectivity.
Fredman-Tarjan (the static algorithm)
Runs Prim with a Fibonacci heap but stops each growth phase once the heap exceeds a size threshold , contracts what it has, and restarts with a larger threshold. Each pass raises the threshold from to , so the number of passes is , giving total.
Variants / Use Cases
- Link-Cut Trees — the other dynamic tree structure; simpler to implement, handles path aggregates
- Dynamic Connectivity — the topic page
- Chazelle — the deterministic static MST
- Minimum Spanning Tree — the topic page