The Aldous-Broder algorithm starts the recurrent random walk at and, whenever it first visits a vertex , adds the edge by which it entered . Recurrence ensures that every vertex is eventually visited. The collection of first-entrance edges is a spanning tree and has the infinite-volume uniform spanning-tree law.