180 ADVANCED ACCEPTANCE/REJECTION
square lattice with n = k
2
nodes and m = 2k(k − 1) edges. From a result of
Chung [24], the number of spanning trees of this graph is at most n
−1
4
n−1
e
−
α
(n−16)
,
where
α
≈ 0.2200507. The number of subsets is m choose (k − 1 )
2
,whichis
bounded above by 2(k −1)
2
choose (k − 1)
2
, a central binomial coefficient. Us-
ing (k −1)
2
= n −2
√
n together with lower bounds on central binomial coefficients
gives that the number of subsets is at least 4
n−2
√
n+1
/[2
n −2
√
n + 1]. Therefore,
the proba bility of acceptance is at most e
16
α
4
2
√
n−1
exp(−
α
n), which declines expo-
nentially fast in n.
Broder [16] and Aldous [2] independently developed the following perfect sim-
ulation algorithm for this problem. Fix any v
0
∈ V . Run a simple random-walk
Markov chain V
0
= v
0
,V
1
,V
2
,... on the nodes of the graph. In such a walk, given
the current node v, the next node is a neighbor of v chosen uniformly at random. So
P(V
t+1
= w|V
t
= v)=1/deg(v). Then for each node v = v
0
,lett(v)=inf{t : V
t
= v}.
Since the graph is finite and connected, each t(v) will be finite with probability
1. Then let T = ∪
v=v
0
{V
t(v)−1
,V
t(v)
}. This will be a tree because it consists of those
edges taken in the simple random walk that reach a node for the first time. So there
cannot be any cycles.
Definition 9.6. Let T (v
0
)=inf
v=v
0
{t(v)} be the number of steps needed for the
simple random walk on the g raph to reach all the other vertices of the graph. Then
T (v
0
) is the cover time of the graph.
The Broder method requires a number of steps equal to the cover time of the
graph. Wilson [128] m anaged to improve upon this method, developing a perfect
simulation algorithm whose worst-case running time was the cover time of a graph,
and whose best-case running time is much faster.
To accomplish this, Wilson created an extension of AR called popping. It is actu-
ally easier to describe with a slightly different pr oblem.
Definition 9.7. A directed tree isatreeT whereeachedge{i, j}∈Tisoriented
either (i, j) or ( j,i). If there is a vertex r such that for all v = r, there is a directed
path from v to r, then call r the root of the tree.
Suppose a node r is fixed to b e the root. Then each undirected tree corresponds
to exactly one directed tree rooted at r. Therefore the problem of sampling uniformly
from the spanning trees is equivalent to sampling uniformly from the set of directed
trees rooted at r.
Refer to edge (i, j ) as outgoing from i. In a rooted directed tree, the root r will
have no outgoing edges, and every other node has exactly 1 outgoing edge.
Therefore, the basic AR algorithm is: for each node i = r, uniformly select from
the neighbors of i.If j is selected, add the oriented edge (i, j) to the tree. If the result is
a rooted d irected tree, accept, otherwise reject an d start over. Since the probability of
drawing a particular oriented tree in this fashion is
∏
i= j
deg(i)
−1
, and so independent
of the tree drawn, the result is uniform over the set of trees.
Another way to view this basic AR algorithm is to envision each node i having a
sequence of iid draws uniformly from the neighbors. Following the notation of [128],
call the choices for node i, S
i,1
,S
i,2
,..., and label this whole sequence S
i
. This can be