58 COUPLING FROM THE PAST
X
1
,X
2
,...,X
T
to produce f
T
(X
1
,...,X
T
) ∼
π
is interruptible if f
T
(X
1
,...,X
T
) and
T are independent. Otherwise T is noninterruptible.
As an example, consider generating a geometric random variable by letting
B
1
,B
2
,... be iid Bern(p) random variables, then setting T = inf{t : B
t
= 1}
and f
T
(B
1
,...,B
T
)=T .ThenT ∼ Geo(p). Of course, in this instance, T and
f
T
(B
1
,...,B
T
) are not independent, they have the same value. Hence this algorithm
is noninterruptible.
Now consider this from the perspective of a sim ulator. Perhaps the simulator
wishes to generate a geometric random variable, and intends to run the above al-
gorithm exactly as written. But lurking in the subconscious of the simulator is an
ultimatum: if the algorithm actually takes longer than five million steps, the simula-
tor will become impatient and abort the algorithm.
This unacknowledged piece of the algorithm means that the simulator does not
obtain samples drawn exactly from Geo(p), but rather from Geo(p) conditioned to
lie in {1,...,5 ·10
6
}. In this case, it is a minor point: unless p is very small, the
algorithm is very unlikely to reach such high values of T . But the potential is there,
and the willingness of the simulator to possibly interrupt the algorithm if the running
time is too long makes this no longer a perfect simulation algorithm.
Next consider the acceptance/rejection algorithm that draws from measure
ν
over
A given the ability to draw from
ν
over B such that A is contained in B.
Lemma 3.5. Suppose that
ν
is a finite measure over B, and A ⊆ B has
ν
(A) > 0.For
iid X
1
,X
2
,...∼
ν
(B) and T = inf{t : X
t
∈B} it holds that T and X
T
are independent
random variables. That is, AR is an interruptible algorithm.
Proof. Let C be a measurable subset of A and i ∈{1,2,...}.Then
P(X
T
∈C,T = i)=P(X
1
,...,X
i−1
/∈C,X
i
∈C)
=(1 −
ν
(A)/
ν
(B))
i−1
(
ν
(C)/
ν
(B))
=(1 −
ν
(A)/
ν
(B))
i−1
(
ν
(A)/
ν
(B))(
ν
(C)/
ν
(A))
= P(X
1
,...,X
i=1
/∈C,X
i
∈ A)P(X
T
∈C)
= P(T = i)P(X
T
∈C),
where the fact that P(X
T
∈ A)=
ν
(A)/
ν
(B) is just Theorem 2.1.
The advantage of an interruptible perfect simulation algorithm is that a user can
interrupt the algorithm as any moment and restart the algorithm without changing
the output. Another way to say this is follows: even if the use intends to abort the al-
gorithm after a fixed number of steps, then conditioned on the algorithm succeeding,
the distribution of the outp ut is unaffected.
Lemma 3.6. Suppose that T is a stopping time with respect to X
1
,X
2
,... and the
family {f
t
}
∞
t=1
satisfies f
T
(X
1
,...,X
T
) ∼
π
, where T and f
T
(X
1
,...,X
T
) are inde-
pendent. Then for a fixed time t
stop
, [ f
T
(X
1
,...,X
T
)|T ≤t
stop
] ∼
π
.