216 APPLICATIONS AND LIMITATIONS OF PERFECT SIMULATION
imate the partition fu nction of the distribution to any desired degree of accuracy in
polynomial time.
When it is not possible to perfectly sample, but only approximate sampling is
available, then it is still possible to use TPA and PPE, although the fact that samples
are not coming exactly from the correct distribution has the be taken into account.
Now consider the opposite problem of sampling g iven the ability to compute the
partition function. For instance, for the Ising m odel on planar graphs, it is possible to
compute Z in O(n
3
) time using the Pfaffian approach [78, 79, 80]. Consider a node v.
If the partition function when x(v)=1 (call it Z
1
)andwhenx(v)=−1 (call it Z
2
)are
computed, then P(X(v)=1)=Z
1
/[Z
1
+ Z
2
]. So it is possible to draw x(v) exactly
from its marginal distribution.
Conditioned on the draw for x(v),thevalueofx(w) could then be drawn for
some w = v. Continue until all the labels have been decided. The point is that given a
polynomial time method for computing the partition function, there is a polynomial
time method for generating perfect samples.
An approximate method for computing the partition functio n will only yield an
approximate sampling method. The result is that it is possible to approximate the
partition function in polynomial time for these types of problems if and only if it is
possible to approximately sample from the associated distribution.
If it is possible to perfectly sample from the distribution in polynomial time it is
possible to approximate the partition function in polynomial time. However, given
the ability to approximate the partition function, it is not necessarily possible to per-
fect simulate from the distribution.
11.8 Limits on perfect simulation
Perfect simulation algorithms have been found for a wide variety of distributions,
but not all. Moreover, as more and more algorithms have been discovered, a pattern
has emerged. Distributions where the label of a node only depends on immediate
neighbors, and where there is a chance of being able to ignore the neighbors, are the
most easily handled by perfect simulation protocols. Such high noise models have
long been used to get approximate sampling methods using Markov chain Monte
Carlo. Today these same models can be sampled from exactly.
Statistical models in particular tend to fall into this category, as they often do not
wish to restrict the outcome too severely, instead giving the data a chance to show
where the model is incomplete or incorrect.
However, in statistical physics, a different story emerges. Here models (such as
the Ising model) exhibit phase transitions, where the character of the distribution
changes sharply at a particular value of the parameters for the model. It is not sur-
prising, then, that the perfect simulation algorithms also display these types of phase
transitions, provably running in polynomial time only for restricted values of the
parameters.
Recent work such as that of Sly and Sun [118] has made this comparison with
the pha se transition explicit. Consider the hard-core gas model from Definition 1.20.