David Bruce Wilson 2026-11-05
David Bruce Wilson developed an exact sampling algorithm for uniform spanning trees. Wilson's algorithm grows a tree by adding loop-erased random walks, each stopped on first reaching the tree already constructed.[ref]
Generating Random Spanning Trees More Quickly than the Cover Time by David Bruce Wilson. Original byline, RandomTreeWithRoot and correctness argument
Erasing loops ensures that an added path creates no cycle. The more surprising assertion is distributional: the resulting tree is uniform among spanning trees, despite the sequential construction and the choice of starting vertices. The algorithm makes a global random combinatorial object accessible through local walk operations.[ref]
Wilson's algorithm Created 2026-09-24 Updated 2026-11-05
For a finite connected graph, Wilson's algorithm starts with a chosen root as the current tree. Choose an unvisited vertex, run a random walk until it hits the current tree, erase loops in chronological order, and attach the resulting simple path. Repeat until every vertex belongs to the tree.
Each attached path has no repeated vertices and first meets the old tree at its endpoint, so attachment preserves connectedness and cannot create a graph cycle. Finiteness and connectedness make each hitting time finite almost surely. The output is a uniform spanning tree, and its law does not depend on the order in which starting vertices were chosen.
For positive electrical conductances , use transition probabilities . The output then has probability proportional to . The proof uses cycle popping: independent stacks of prospective outgoing edges can be exposed and cyclic choices discarded in any order without changing the final rooted tree.[ref]
Generating Random Spanning Trees More Quickly than the Cover Time by David Bruce Wilson. RandomTreeWithRoot and cycle-popping correctness argument