Generating Random Spanning Trees

advertisement
Generating
More
Random
Quickly
Spanning
than
the
Bruce
Wilson*
dbwilson@mit
.edu
David
Department
Laboratory
Cover
Institute
Cambridge,
Science
of Technology
Massachusetts
real
1. Introduction
02139
numbers.
edges
is widely
ning
trees
how
at
known
FOCS
rithm
[2].
dom
walk
[6],
Start
encountered,
mark
all
edges
algorithm
and
trees
the
with
This
vertex
vertices
has
also has the
On
the
than
nice
running
time
that
it
algorithm
It
too
for
easy
which
algorithm
a factor
algorithm
two),
slower
and
is
(by
usually
It also
●
It yields
pling
works
the
from
for
directed
current
the stationary
of a Markov
abilities
fastest
chain
Additionally,
and
We
the proofs
are
n vertices
*
double
given
with
Supported
as proofs
and NSF grant
edge
directed
weights
that
part by NSA
DMS 9Z063i’4.
grant
in
defining
if
i.e.
the
is
are
graph
G on
nonnegative
MDA904-92-H-3060
vertex
296
and
get
so that
T’, (G).
To
weighted
out degree
then
normalize
since
T(G)
dom
chain.
=
the
weighted
of edges
its
G,
first
add
of each
the
weights.
T(G).
Both
vertex
Markov
chain
bars
refer
refer
to G.
to G, and
using
parameters
a “current
tree”,
which
(see
initially
two
To
weights
get
of its
outdegree
since
is the
until
the
and
uses
use
Figure
consists
~
a sub-
returns
written
=
same,
appropriate
written
is
T.(G)
self-loops
that
the
define
RandomTree
the
is
already
G.
procedures
parameters
RandomTreeWithRoot
G
vertex
RandomSuccessor(u)
successor
it
can
weighted
uses
G
outde-
leaving
on
the
so we
G.
then
we
to
general
be used.
from
@ based
RendomTreeWIJhRoot
of an
reduced
can
we normalize
edges
root)
chain
Otherwise,
G
a
a ran-
algorithms,
is stochastic,
chain.
each
routine
Permissionto make dlgitai/hard copies of all or part of WIS material for
pereoml or classroom use is granted without fee provided that the copies
are not ~de or dktributed for profit or commercial advantage, the c~yright stohce, the Wle of the publication and its date appear, and notice IS
given that copyright is by permission of the ACM, Inc. TOcwy othe~iw,
to fi*, MWWS SP*lfic
to republish, to post on servers or 10 ~lkbute
permission andtor fee.
STOC’96,
Philadelphia
PA,USA
@ 1996 ACM &89791 -71J5-5/96/05. .$3.50
G
is Random-
For more
based
vertex
sim-
r, returns
is easily
of weights
If
graphs
outdirected
for an iden-
r
of the
Sampling
RandomTree
each
sum
1.
at r.
a Markov
for
is a Markov
1.
a weighted
procedure
stochastic
an inequality.
to
and
algorithm
ot.
are random-walk
by
vertex,
are unknown.
goal
root
variation
unrestricted
the
prob-
The
fixed
a vertex
graph
graphs,
G, for
tity
(with
Eulerian
much
distribu-
transition
tree
or
first
rooted
to RandomTreeWithRo
gree,
with
one
given
one call
for sam-
probability
whose
The
tree
spanning
stochastic
algorithm
dis-
(according
generality
than
more
graphs.
trees.
tree
r
probabilities
tree
between
more
which
undirected
These
●
tion
is a tradeoff
spanning
start
of the
spanning
so we give
random
faster.
probability
with
spanning
vertex
is proportional
be the
trees,
at
to T’r(G)).
TreeWithRoot,
works,
with
of the
probability
rooted
of a tree
T(G)
same meta-algorithm.
to
be the
trees
weights
or a random
dom
old
is never
of
to the
There
The new algorithm
the
let
tree,
is the product
T,(G)
spanning
a random
(according
advantages:
for
all
is to sample
T(G)),
generating
and
on
proportional
generates
is simple,
Let
spanning
probability
weight,
tribution
the
This
the
of a spanning
its root,
edges.
on
that
to its
dis-
tree.
of its
plicity,
proofs.
following
new
spanning
proof
a new
trees.
has
graphs
it was
discovered,
up, has small
a nice
ranis first
probabilities.
gives
and
which
are
a random
spanning
up,
from
a vertex
such
weight
towards
distribution
algo-
do a simple
time
edge
the
The
directed
weights
showed
found
and
Each
span-
Broder
too
the
right
paper
random
●
Aldous
is easy to code
random
graph.
the
form
constants,
code
to generate
graph.
When
marked
and
at any
on the
covered.
how
of an undirected
Time
of Mathematics,
for Computer
Massachusetts
It
Trees
a ranMarkov
with
over-
with
tildes
1) maintains
of just
the
RandomTreeWithRoot(r)
fori-l
Theorem
ton
InTree[i]
IVext[r]
mean
-false
+
nil
InTree[r]
+
fori+l
ton
true
not
u
ca!k
to RandomSuccessor.)
EiTj
takes
return
+
to
go from
Figure
(A nice fact,
Next
for
1: Algorithm
with
each
for obtaining
prescribed
root
random
spanning
r.
the
there
algorithm
vertex,
walk
remain
does
erasing
has
been
known
loop-erased
this
for
to the
to make
first
(see e.g.
that
anyone
efficient
the
the
of this
introduction
Suppose
ning
tree
easily
%-random
this
calls
ered
result
and
endpoint
nice
proof.
For
is just
the
the
on ~,
is a random
theorem
“the
graphs
and
steady
then
0(?)
tree
algorithm
distribution
graphs,
since
a free spanning
to pick
efficient
edge,
random
it
r-
often
vertex
tree,
it turns
r to be a random
sample
from
vertex
to be the
T~,
In
and
out
pick
root
time
for
is r.
The
all the
r.
(see
since
In
running
Figure
2)
spanning
the root
to
tree
of a ran-
fi, the
second
a random
sampling
of a random
spanning
root
death
“death”
which
is then
has
Theorem
node
and
running
on
time
it
returns
tree.
average
<
down
original
try
If
tree.
is made.
a spanning
of RandomTree
The
tree,
graph.
RandomTree
22r
by
a nat-
tree.
spanning
is a random
another
spanning
proba-
it makes
the
as
is S, and
are scaled
in the
Attempt
The
a spanning
c is decreased
same
an extra
to death
from
then
RandomSuccessor
graph.
to grow
forest
the
adjoins
is a sink,
deleted
one
it is a random
expected
the
moving
tree,
3 If
it
probabilities
in a rooted
forest
that
to
vertex
the death
from
node
is essentially
times,
tree,
calls
so the
is O(T).
be
to
endpoint
then
the
to connect
is also
yields
except
transition
Otherwise
the
r may
graphs,
in 27 time.
root
according
algorithm
algorithm,
labeled
resulting
%
that
the
of a normal
the
graphs,
on vertices.
any vertex
second
first
with
a
the
of 2T
is fi-random,
that
a random
Note
return
runs
RandomTree
automatically
The
tree.
rediscov-
time.
r as
an average
needed
sample
If G
vertex
the expected
root
is that
[3].)
tree.
ural
a
to
is distributed
1 – e. Since
state
pick
graphs
used
the other
span-
[3]; [6] includes
Eulerian
general
be
procedure:
spanning
most
theory”
be more
of a random
work
need,
edge
reach
to the
dom
If we may
since
to
vertices
within
in
vertex
additional
then
uniform
time
anc)ther
undirected
above
be so small,
first
not
surprising
expected
but
call RandomTreeWithRoot
used to generate
uniformly
root.
from
case of undirected
to
a ~-random
described
remaining
fact
is a random
the
walk
in probability
should
the
bility
we want
result
time
just
the
vertex
undirected
time.
m(j)E~Tj
of a random
cases it is perhaps
[7]),
theorems
we have
will
~j
For
For
a ran-
proofs
i, r =
to RandomSuccessor.
this
returns
random
this
mean
+ Ej Ti, and
vertex
calls
may
walks.
% of the
and
the
expected
makes
is a
See [20] for
subsequent
prescribing
The
of
of steps
j,
cover
RandomTreeWithRoot
from
tree
[23] and
a random
root,
root.
Aldous
what
without
pick
It
are in \3.
that
distribution
and
cycletree.
has used
random
the
path
algorithm.
on loop-erased
proofs
the
spanning
Theorem
1 RandomTreeWithRoot(r)
dom spanning tree rooted at r.
The
the
root,
these
such
until
current
that
walk
time
a provably
background
time
tree,
one
Then
to the
of a random
random
is the
from
tree.
added
some
root
in the
are created,
current
gets
not
walk
as they
the
trajectory
a vertex
a random
cycles
encounters
erased
vertices
the
vertex
so the variation
While
number
is the
a r-random
which
start
a random
root.
tzme
ver-
number
vertex:
is stochastic,
tree
the
j is EiTj
by twice
hittzng
in
at i to reach
i and
by the
a %-random
true
Next[u]
t
between
dominated
r and
expected
started
RandomTreeis gwen
InTree[u]
InTree[u]
u
that
is ltnear
the
walk
mean
random
not
time
denoting
time
The
U+--i
while
running
a random
is always
+- RandomSuccessor(u)
IVezt[u]
+
between
(The
commute
InTree[u]
Ne%t[u]
time
tex.
for
of ttmes
cai!s RandoxnSuccessor
commute
With
U+i
while
2 The number
WithRoot(r)
a
2. Relation
There
random
root.
297
to Previous
is a long
history
spanning
trees
Work
of
from
algorithms
a graph,
to
generate
and
recently
RandomTree
n is the
&+l
edges.
tion
repeat
t
and
Attempt(&)
Nel
tree
return
# Failure
spanning
tree
[10]
trees.
sample
Attempt(&)
random
efalse
dom
walks
+- O
determinant
fori+-l
ton
ers the
random
Broder
argues
while
not
if
Chance(&)
iVect[u]
then
+
nil
true
+
num.roots
nurn_roots
return
+ 1
in the
Failure
random
else
as small
contained
Nezt[u]
u -
+- RandomSuccessor(u)
rithm
fVezt[u]
U+i
degree
while
for
not
InTree[u]
lnTree[u]
Next
takes
Winkler
rithm
to
rian
2: Algorithm
for obtaining
Chsnce(c)
there
has
rithms
returns
been
much
for sampling
of a Markov
mixing
time
tion
we compare
work
from
chain
the
true
with
on
don’t
the results
c.
self-verifying
In
paper
this
Propp
within
18 cover
just
tributed
according
random
All
the
to previous
2.1.
Random
tree generation
The
first
algorithms
for
ning
trees
were
on the
which
ning
thin.
such
allows
trees
based
one
to
by evaluating
8]). Gu.6noche
algorithm
that
random
Matrix
Tree
the
runs
in
Kulkarni
O(n3rn)
span-
walk
Theorem,
number
a determinant
[16] and
steady
(see [5, ch. 2,
the
[19] gave one
timel,
where
used
m < n2 and
stated
the running
time
as
298
out-
Wilson
rangraph
running
which
time
must
be dis-
distribution
within
state
vertex
the mean
of
For
bound
graphs
time
previous
the root
mean
time
to
the
random
it is a sim-
according
graphs
undirected
hitting
bound
of ~
walk
according
the
For
time
random
so RandomTreeWi.thRoot
is the
the
the
% of the
graphs.
within
all the vertices.
Wilson-Propp),
select
work,
run
expected
hitting
for
distributed
distribution
these
to reach
it takes
(except
to
algorithms
G — the
walk
to randomly
algorithms
time
equals
directed
stationary
distribution.
algorithms
Eulerian
algoEule-
time.
of this
walk
time
a single
be applied
the
1 Gu6noche
O(n5).
runs
state
steady
to the
Unger,
for sampling
root,
of the graph
expected
ple matter
of span-
Most
for the random
to reach
generating
compute
the
cover
a general
the
random
time
RandomTree
—
in-degree
but
algo-
walk.
of these
cover
it takes
work.
picking
Broder’s
of a directed
the
out-
is O(Z’C),
Matias,
an algorithm
times.
is spent
of arthe
Aldous-Broder
one in which
is
an algo-
lVhen
graphs,
within
and
references
generation
Kandel,
from
TC of a sim-
time
the
time
0(n3),
graph.
for
cover
described
running
Tree
works
time
also
time.
Matrix
the
random
directed
[26] gave
the
(de-
generat-
see [6] and
a directed
node)
arborescences
of
sec-
Broder
[6] and
algorithm
by
arborescences
(i.e.,
at each
but
random
randomly
cover
[18] extended
sample
be faster,
the
within
log n);
dom
the
knowledge
chain.
of this
algo-
distribution
require
Markov
and
spanning
probability
the stationary
that
of the
random
runs
as O(n
the
oth-
algorithm
The
O(nTC)
graph
degree
The
approximate
best
for
Broder
discussing
is bounded
simple
and
for
walk.
from
general
[6].
walk
[1 1].
the
and
will
to
on ran-
graphs
graphs,
graph
is regular,
rithm
+- true
u 4- ~ext[u]
return
the
borescences
some
random
and
therein.
for
O(n2376)
be faster
Diaconis.
graphs
required
be faster,
most
after
how
time
are based
algorithms
the
trees
with
undirected
often
Neufeld
in the
introduction)
spanning
ple
and
For
de-
showed
currently
for
will
scribed
of the
= 2 then
walk
[2] found
undirected
random
and
will
that
algorithms
Theorem
for
Myrvold,
graph.
Day,
algorithm
algorithms
algorithm
Aldous
ing
~
num.roots
if
walk
InTree[u]
lnTree[u]
trees.
on the
num.roots
‘u+i
Figure
of other
it more
Colbourn,
computing
algorithm,
n x n matrices,
of
spent
arborescences
A number
InTree[i]
O(n3)
Colbourn,
this
to multiply
forit-ltorz
an
to make
[9].
time
number
for the genera-
trees
studies
the
get
simplified
m is the
spanning
Carlo
[8] reduced
to
and
was optimized
random
for Monte
terminants
until
of vertices
algorithm
of many
suitable
E +- &/2
tree
number
This
time
is the
for
the
which
may
graphs
of G, for
maxtmum
Tree
Algorithm
Gu6noche
[16] / Kulkarni
Colbourn,
Day,
Colbourn,
Myrvold,
Aldous
Nel
Matias,
Wilson,
Propp
[19]
O(n3)
Neufeld
M(n)
[10]
[6]
Winkler
[18]
(undirected)
0(~,)
O(F)
This
paper
O(i)
This
paper
M(n)
to multiply
time
hitting
h = maximum
hitting
time
ways
that
= ma~
cover
graph
large
on
cover
mean
hitting
Even
for undirected
be substantially
graph
to a clique
but
maximum
over
hitting
times
most
for
from
i
generating
random
2.2.
all pairs
most
a mixing
time
will
usually
be much
in some
cases the
[6].
time
graphs
random
time
be
will
hitting
of
smaller
difference
than
described
a
has
graph
these
spanning
trees
Self-verifying
of a graph.
sampling
algorithms
an
have
have
can
of
0(1),
their
maximum
these
times
will
cover
time,
and
the
can be quite
there
fective
method
for
and
output
state
will
work
that
chain
state,
the final
is run
for
at determining
Asmussen,
the
problem
the
chain.
given
n and
the Markov
299
state
Glynn,
of not
They
give
a Markov
chain
for
as the
chain
a while,
The
dis-
close
Despite
to
T,
much
enough”
[12]
task.
[4] addressed
to stop
running
procedure,
on n states,
stops
chain
fc)r a long
an arduous
Thorisson
a general
distri-
sample.
is “long
when
ef-
a probability
remains
and
state
chain
enough.
knowing
to
One
Markov
arbitrarily
long
this
and
is to construct
the
from
long
how
m(x).
the
be made
[17] [14] [21] [25] [13],
striking.
run
statis-
We wish
steady
start
be sampled
can
and
sampling
whose
has nu-
and
X of objects,
probability
one may
arbitrary
time,
if the
chain
Then
final
space
random
Markov
objects
science
x on X,
~ c X with
is ~.
some
is a finite
distribution
object
tribution
are expanders
Thus
Usually
sample
in
time
time
in computer
bution
Broder
a cover
of combinatorial
an ergodic
For in-
a cover
sampling
applications
a probability
of size n/3
of @(nz).
Random
merous
tics.
is lin-
times
time.
paths
graphs
@(n).
al-
It is noteworthy
the cover
of two
are
which
graphs
than
random
hitting
Broder
of size n/3
a mean
@(n log n); since
have
starting
of algorithms
of Broder’s
consisting
adjoined
and
i
EiTj
all states
n vertices
time
smaller
of @(n3)
that
from
EiC
time
the
notes
= ma~,j
time.
ear in n.
the
m(i)~(j)EiTj
maximum
the
directed
stance,
= Z,,J
1: Summary
and
less than
exponentially
graph)
j of EiTj.
mean
simple
j starting
to visit
i of G, i.e. the
i and
(any
n x n matrices
to reach
time
time
time
Table
The
(Eulerian)
distribution
time
= expected
cover
two
probability
= expected
r = mean
hitting
(undirected)
of edges
x = stationary
of states
graph)
of vertices
= time
T. =
(any
0(7)
number
EiC
(Eulerian)
O(~c)
[26]
paper
EiTj
= 0(n2376)
O(~c)
Unger,
n = number
time
O(n37n)
This
m =
running
[8]
[2] / Broder
Kandel,
Expected
after
which
simulates
finite
time,
Exact
Asmussen,
Sampling
Glynn,
Aldous
[1]
LOV6SZ,
Winkler
Propp,
Thorisson
bias
[24]
Propp
[26]
(requires
15TC
r = mean
hitting
T= = cover
of
to run.
time,
samples.
Lov6sz
provably
polynomial
unbiased
Markov
pected
time
bution,
O(hT~iXn
takes
the
and
procedure
huge
that
using
unbiased
state
spaces
monotonicit
other
(e.g.
chain
y [24].
exact
to either
samples
sampling
[22]
this
that
same
Markov
given
in
paramchain
as rl ‘2) in
has a certain
method
Fill
on the
A
preliminary
chain
here
imate
sampling
exact
sampling
several
the
[3].)
time,
changes
analysis
chain
suggested
algorithm
should
is
compares
fa-
except
the
having
special
general
the algorithm
0(~/c2)
algorithm
than
input
of Fill’s
that
Aldous’s
in the algorithm
the
of the output
which
suggests
is completely
the
algorithms,
analysis
[15].
pleasant
the root
Markov
procedure
is faster
is new,
is more
O(T)
reverse
determined.
by definition
all the previous
His
the
algorithm
been
Returning
rely
structure.
approx-
that
be
were
an O(r)
possible,
but
necessary,
and
different.
sampling
time
of
the
3.
Proofs
of Theorems
“couplingtechnique
structure
We will
to
may
Markov
r.
this
The
an-
process.
a given
tree
root,
Associate
or
300
a randomized
generation
procedure
a random
be applied
chains
describe
in the random
called
[15] has found
which
general
that
the
yet
parameters.
to simulate
since
takes
with
chain
special
application
stochastic.
structure.
distri-
(The
called
ones
ex-
runs
Because
application,
vorably
an un-
ability
has not
of RandomTree
procedure
optimal
cover
already
from Markov
chains
with
provided
2 M,000,ooo states)
Recently
moderate-sized
Winkler
with
the
sampling
tree
Markov
chains
requires
The
some
Markov
of random”
on the
Markov
the
with
another
the
a technique
used
procedure
algorithm
the
huge
method
an unknown
rule
I/e
background
chain.
stationary
long
See [3] for
time
stopping
is defined
within
They
the Markov
log n).
time
Markov
is the
[26] described
runs
from-the-past”.
obtain
and
Propp
which
walk,
log 1 = O(log
within
running
log n) time.
of how
“get
algorithm
but
the
to
procedure
time
Lov6sz-Winkler
randomize,
random
in
chain
bounds
by observing
T~iX
chain
is a measure
to
Wilson
If
log n) ~ 0(h2n
T~iX
Usually
an
and
randomized
Markov
then
samples
chain.
of any
the
only).
the
from
can be simulated,
the
leaves
chains
exactly
gives
an efficient
time
first
for obtaining
stopping
not
than
the
known
Markov
algorithms.
described
result
0(r/e2)
that
for
distributed
did
c in
found
eter
state
they
and
time
sampling
[1] described
within
chain
Markov
stationary
of exact
a random
Aldous
Markov
bias
expected
a possibility
for sampling
(monotone
threshold;
However,
running
as more
(7 < h < T.)
time
time
2: Summary
on the
analyzed)
time
= optimal
to ir.
chain
hitting
TmiX = mixing
outputs
yet
time
h = maximum
and then
10g n)
of states
of longest
according
log 1)
or O(T~i~n
22T
1 = length
Table
n 10g n)
O(T”,X
monotonicity)
paper
T~,x
time
O(hT~i~
(not
n = number
time
81r/c2
in sample)
[15]
This
running
finite
[4]
[22]
Wilson
Wilson,
Fill
(t
Expected
Algorithm
Then
process
of a tree
that
with
results
a given
root
RandomTreeWithRoot
simulates
we reduce
of finding
to that
the problem
of finding
and
analyze
with
vertex
the
a random
running
r an empty
tree
with
time.
stack,
and
as-
while
G has
Pop
any
return
a cycle
such
tree
it
cycle
left
off the
stacks
must
cycles.
shares
on stacks
have
the
Since
~
no vertices
equal
3: Cycle
popping
procedure
with
random
vertex
vertices
Pr[Su,i
such
each
=
r an infinite
stack
Pr[RandomSuccessor(u)
all the items
many
of
=
in all the stacks
v],
one
are mutually
process
will
The
tops
which
of the stacks
contains
nonempty
edge
and
directed
cycle
that
its
in the
3. If this
that
there
this
But
of colors,
i. Then
the
eventually
colored
to pop
cycle
there
We will
are no more
may
see
the
what
effect
encountered
have.
then
an
mentation
infinite
by the
that
get
many
popped
cycles,
times,
once.
the
result
If
are
irrelevant:
the algorithm
or .2) the
For
never
algorithm
independent
a given
set
terminates
returns
cycle
some
either
colored
1)
Proof
tree
popped,
the
proof
weighted
in the
contain
two
w,
cycles.
w has
But
the
since
same
none
color
successor
of Cl,
in
Ci
Since
may
so
301
r,
sum
of
number
. . . . -Ci - 1
C,
weight,
eventually
the
a tree
algorithm
exists.
the probability
T and
a set C of colored
entries,
depending
alone
the
tree
The
tree.
Consider
T
—
this
on C alone
the
product
weight
of
T.
Even
set
of cycles
being
is distributed
of Theorem
weights
vertex
Proof
vertices
and
the
clude
If Ci and ~ are not equal as cycles, then they share
different
array.
current
nonzero
Thus
and
supposed
according
El
The
then the answer is clearly yes. Otherwise, let Ci be
the first of these cycles that shares a vertex with ~.
has
r and
a particular
resulting
vertex.
to ‘T,.
sum
w which
on
Next
of the stack
and
imple-
of u’s stack
of the
a term
on
weights,
if we condition
popped,
into
depending
cycle
Cl, but inste~d ~. Is it still possible for C to get
popped?
If C shares no vertices with Cl, , , ., C~,
vertex
i.i. d. nature
factors
a term
of the
CI, C?,, C3) . . . , Ck = C that may be popped one
after the other until C is popped. But suppose that
the first colored cycle that the algorithm
pops is not
some
the
a tree
may
the
wasn”t
in the
1.
1:
define
vertices
another
top
1 if such
from
no vertex
at any vertex
probability
it
the
implementation.
item
root
started
of Theorem
By
at
vertices
just
and
this
the
stored
probability
probability
Consider a colored cycle C that can be
i.e. there is a sequence of colored cycles
walk
the stacks
cycles.
of the set of choices.
reads
with
that
again
is
and
the walk
These
in case this
is a tree
a vertex
stacks,
tree,
on
by the top
found,
if we redo
is just
algo-
(initially
updated
start
the
with
tree
current
it gets
r
these
do a walk
is given
of a cycle.
the
gives
and
Proof:
the
then
item;
with
lay-
off
popping
and
has been
then
with
a random
peels
Whenever
a cycle
If the current
to
array
halts
any set of choices,
fized
stack.
then
is part
If there
to pop next
of stacks,
for
vertex’s
may
reachs
of which
vertex
InTree
then
4 The choices
the next
be added
a tree
set of cycles
cycle
so that
to be popped,
is a
tree.
Theorem
of the
vertex,
this
of
u‘s color
define
algorithm
at some
vertex
deletes
every
tree.
RandomSuccessor(u)
stacks
popped
the
number
uniquely
ordered
RandomTreeWithRoot
SU ,i has color
then
The
stacks
The
r) is encountered,
start
be popped,
start
be popped.
root
are
it.
the
current
r and
entry
be
of the
and
a,re a finite
u determines
a partially
re-encountered,
will
probability
be popped
only
the stacks
there
•1
the
of
might
which
be infinitely
vertex
implementation
rithm
we
colored
be popped,
popped.
are
tree.
to find
root
might
cycles
may
An
with
G defined
the
can
r.
top
cycles
in
result
with
ered
is
of each
the
together
on
can
cent aining
resulting
with
there
stack
graph
A cycle
a colored
tree
suppose
and
stack
let us consider
cycle
directed
colored.
root
terminates
first
cycle”
cycles
is a
is summarized
with
and that
is vertex-colored,
but
tree
convenience,
the
of the
process
G,
if u’s stack
is v. If there
terminates,
a spanning
of which
number
item
The
process
exists
choices
are
top
spanning
only
item
by “popping
process
non zero weight.
For
the
cycle.
be a directed
1 iff
(first)
graph
which
~
Ci
cycles
will
If
is eventually
To summarize,
su,t+z, . . . .
can
two
and
. . ..ck=c.
colored
always
which
pop
c%+l,
terminates.
of cycles
in the
To pop
a directed
(u, v) if and
top
we pop
Figure
later
define
in G, then
vertex
the
off the stacks,
off u’s current
stack S ~,t, su,i+l,
.
.
lt with
SU,3+1, SU,i+Z, . . . .
an item
replace
mean
pop items
there
cycles
never
of them
these
independent.
The
colored
number
and
we may
many
then
in the
as cycles,
. . . , Ci - 1, @ and
Hence
are infinitely
algorithm
SU,2, SU,3, . . . such that
SU = S’u,l,
v] =
that
u #
Cl,
C~, Cz, . . . ,ci_l,
can be popped,
sociate
vertex
are equal
cycles.
=Ci,
If there
successor
Ci
with
as colored
CyCleSQ
Figure
same
and
of trees
order
assume
that
of
is the
rooted
2:
that
shows
of colored
result
Theorem
of times
the
of sets
the
1 also
cycles
the
ex-
of the
at r.
What
popping
first
if we
that
reciprocal
is the
RandomSuccessor(u)
cycle
that
expected
is called?
is irrelevant,
trajectory
starts
we
at
u.
It
is a standard
number
of times
turns
and
where
is the
starting
from
[3])
random
reaching
at
the
in Failure
expected
that
at u re-
by m(u)[EUTr
time
number
Thus
i.
the
started
r is given
expected
RandomSuccessor
that
walk
“return”
the
EiTj
(see
the
to u before
ErTU],
j
result
+
number
the
to reach
of
calls
work
to
Let
root
is
n-random,
then
the
to RandonSuccessor
the
The
at least
expected
amount
Thus
probability
z’ additional
the
done
amount
of
is O(T).
(n)
factors
do not
Otherwise
&j be the value
concern
read
the reader,
the
on.
of e the ~th time
RandomTree
procedure.
The
expected
T that
RandomTree
calls
RandomSucces
bounded
times
of work
total
Attempt
times
r
of calls
called
is T2°(iJ.
is done.
calls
❑
the
done
proof
u
If
while
time
If constant
is
~T(u)(EuTr + .E,T.)
number
ith
exponentially.
gets
is 2-nIi2J,
O is included,
of steps
decays
Attempt
number
of
sor
is
by
expected
co
is
i—l
i=l
j=l
u,r
Since the number
least
of calls
n – 1, we get for
to RandomSuccessor
where
is at
&j = s-~.
Let
k be the smallest
1, and let ~ = 2rck;
free
apart
and
using
1/.s < ~ <1:
&j
K/( QT);k-j
=
~ with
2TEj
Breaking
<
the sum
we get
n–1
T>—.
2
This
inequality
ods,
but
pretation
way
of the
Proof
of
graph
Theorem
death
spanning
tiple
then
tree
of the
original
if the
and
the
node.
time
otherwise
number
which
it
returns
before
the expected
and
node
at which
that
do the
death
node,
and
it is the
death
Suppose
that
at this
point
all future
pressed.
The
expected
RandomSucces
This
sor
bound
the
the
by
will
Attempt
occur
of aborting
starts
expected
becomes
wards
Thus
is at most
The
the
bigger
by
at.
min(l,
amount
than
probability
a call
child.
First,
More
by
the
27-s.
a call
answer.
With
two
values
be
of K
s = 2 we get a bound
❑
that
raised
to a random
is 1/s
raised
and
we have
Then
when
the
initial
power
s is chosen
to
be
1/s
between
O and
1. Then
N
power
between
O and
1,
to a random
of which
of
In the course
of finishing
RandomTree
algorithm,
properly
journal
before
by O(r).
to Attempt
s = 2.3 we get
T < 21T.
Note
a
But
probability
done
at these
take
not
will
impor-
27s).
of work
evaluating
and
It should
to
that
is independent
Hence
the same
bound.
up in K, we
1/s,
deaths
probability
is bounded
~ =
1 and
the ex-
of suppressed
the
is concave
K =
is at most
to Attempt
+ 2r.
T is bounded
that
until
calls
is built
expression
at
as an upper
that
Suppose
are sup-
of additional
it
maximum
yields
is a ir-
first
deaths
this
of T < 21.85T.
at a
walk
since
evaluate
surprising
run-
occurs
node’s
tree
1/s
number
2rc.
probability
aborting
that
above
expected
death
the
of steps
is bounded
vertex
may
second
we start
has two consequences.
number
is bounded
number
before
the
random
the
random
second
Now
mul-
a random
bounds
Suppose
location
The
tantly,
Attempt
have
of steps
upper
of Attempt.
r-random
take
The
will
the
expected
death.
2r.
is a random
graph.
node
to
a random
If the death
subtree
death
where
of moving
Sample
at the death
original
node”,
chance
is a sink.
child,
is 2/&,
pected
inter-
tree.
The
ning
an t
rooted
children,
death
which
aborts
spanning
has
one
procedure
meth-
the
a “death
tree
has
by other
combinatorial
Consider
include
node
node,
spanning
to obtain
3:
to
original
node
hard
we get a nice
numerator.
modified
every
the
isn’t
this
1/s
Afterresults
302
analyze
version.
this
but
writeup
had
its performance.
I found
insufficient
Look
a nicer
time
to
for it in the
Acknowledgements
[14] Persi
Diaconis
bounds
The
author
thanks
and
comments.
Jim
Propp
Jim
Propp
Thanks
for
their
for useful
also
to
suggestions
discussions
Henry
Cohn
on the
and
nals o./ Applied
Probabdity,
[15]
James A. Fill,
1995.
[16] A. Gu6noche.
Algorithms,
Aldous.
tionary
On simulating
distribution
are unknown,
[2] David
when
1994.
J. Aldous.
uniform
Journal
transition
chain
[17] Mark
sta-
walk
probabilities
Iabelled
of
Shuffling
trees.
[19] V.
J. Aldous
Markov
Book
and
Chains
[4] S@ren Asmussen,
Thorisson.
Computer
Peter
ACM
[6] Andrei
Glynn,
and
2(2):130-157,
Graph
1979.
An
Broder.
texts
teristics,
trees
entropy
and
spanning
[8] Charles
trees
tilings
[23] Robin
trees.
integer
442-
pages
of a graph.
P.
and
Journal
pling
for spanning
J.
[25] Alistair
and
atiorr
spanning
of Algorithms,
[26] David
[9] Charles
Wendy
J. Colbourn,
Bradley
J. Myrvold.
Estimating
the
polynomial.
reliability
62:217-223,
[10] Charles
gene
borescences.
J. Myrvold,
algorithms
Journai
for
of Algorithms,
and Eu-
unranking
ar-
1995. To ap-
pear.
[11] Don Coppersmith
multiplication
of Symbolic
and Shmuel
Group
ity and Statistics.
tics,
[13] Persi
Matrix
Representations
Institute
in ProbabiL
of Mathematical
Statis-
1988.
Diaconis
we know
posium
Winograd.
via arithmetic
progressions,
Journal
Computation,
9:251–280,
1990.
[12] Persi Diaconis.
about
on
the
and Laurent
the Metropolis
Theory
Saloff-Coste.
algorithm?
OJ Computing,
On the ran-
and
Science,
What
do
In Sympages
IIZ–
129, 1995.
303
chain.
diameter.
In
pages 482-491,
Exact
Electronic
Paper
mixing
in
Journal
of
#R15.
1991.
and David
coupled
Sinclair.
and
chains
Exact
sam-
and applications
Random
Structures
and
To appear.
Algorithms
Counting:
A
for
Random
Chain
Markov
Gener-
Approach.
1993.
B. Wilson
both
B. Wilson.
Markov
mechanics.
1996.
on Discrete
Wendy
Two
with
and sample
graph,
Numeran-
1988.
J. Colbourn,
Neufeld.
Walks.
Pemantle.
Choosing
a spanning
tree for the
The A nnab OJ Probab ilz t y,
lattice uniformly.
get an exact
M. Debroni,
and
the coefficients
of
Congrewms
Simonovits.
2, 1995.
Birkhauser,
10:271-
286, 1989.
tium,
Markov
Algorithms,
1993.
Day,
ranking
combinato-
11 (2):185-207,
of Random
of volume
of Computer
to statistical
transfer-impedances.
Robert
Unranking
Intersections
and Mik16s
[24] James G. Propp
charac-
21(3):1329-1371,
Colbourn,
Nel.
Local
theorems
via
of Probabilit~,
J.
D.
Pemantle.
and limit
domino
The Annals
Louis
and Robin
random
of Algorithms,
complexity
19(4):1559-1574,
Burton
P. Winkler.
Preprint.
1991.
an unknown
in
447, 1989.
[7] Robert
and
1995.
[22] L.%z16 Lov~sz and Peter Winkler.
Introductory
Science,
on Computing,
1992.
Graduate
random
of Computer
R. Unger,
Generating
Combinatorics,
Generating
of
Approximat-
Journal
sequences,
Journal
Foundations
and
#63.
Foundations
Journal
1989.
F. Lawler.
domized
tran-
1992.
Theor~:
tree.
In French.
Sinclair.
SIAM
Kulkarni.
[21] L&sz16 Lov&.z
Hermann
on Modeling
spanning
Y. Matias,
objects.
communication.
1983,
Alist air
biological
[20] Gregory
Graphs.
in the initial
Transcsctions
The An-
1991.
1990.
Reversible
on
and
Birkhauser,
W.
Springer-Verlag,
mathematics,
Fill.
Walks
detection
Simulation,
[5] B61a Bollobi%.
A.
1995.
Stationary
sient problem.
In
James
Random
and
in preparation,
Course.
G.
rial
465, 1990.
[3] David
Jerrum
[18] D. Kandel,
3(4):450-
Mathematics,
Random
4:214-220,
18(6):1149-1178,
construction
trees and uniform
of Discrete
Geometric
chains.
1(1):36–61,
Personal
ing the permanent.
Preprint.
A random
spanning
SIAM
a Markov
Stroock.
of Markov
and
manuscript.
References
[1] David
Daniel
for eigenvalues
and
sample
a random
within
James
from
spanning
the cover
Aigorvthmsj
G,
Propp.
a generic
1996.
tree from
time.
How
M arkov
to
chain
a directed
In Symposium
Download