{'fraction_non_alphanumeric': 0.05636152140991594, 'fraction_numerical': 0.009525272699339376, 'mean_word_length': 3.2181077578226254, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 33, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Perfect simulation for the infinite random cluster model, Ising and Potts models at low or high temperature

In this article we create a new algorithm for the perfect simulation of the infinite Potts model at a sufficiently small or at a sufficiently high temperature, in particular under the transition phase temperature. We study the model for free boundary conditions and we give some consequences for the constant boundary conditions.

Given a countable graph G = (V, E), a positive number q and parameters p = {p e ∈ [0, 1] : e ∈ E}, the random cluster measure is defined on the measurable space (Ω, F ), where Ω = {0, 1} E and F is the σ-algebra generated by finite cylinders. This measure was introduced by Fortuin and Kasteleyn as a way to study the Ising and Potts models (see [FK72]).
In our paper we do not require the parameters p e to be all equal to the same constant; however we limit our attention only on the models with q > 1. This choice has been made both to maintain the article simpler and also because the case q > 1 has important connections with the statistical mechanics and in particular with the models of Ising and Potts.
The aim of this paper is to construct an algorithm which gives a perfect simulation of a random cluster measure on a finite region of an infinite graph. Notice that even if the perfect simulation is obtained only on a finite region, it takes into account the fact that the random field on this region is influenced by the value of the filed on the whole infinite graph. On any finite graph it is possible to define, in an explicit and computable way, the random cluster measure. However, the random cluster measure associated to the finite region in this way, in general, is not the restriction of the measure of the infinite graph on this finite region. Now we briefly explain how this simulation is obtained. As will be recalled in Sections 2 and 3 the random cluster measure is invariant under a markovian dynamics. Introduce a countable number of copies of the graph G and think them as placed at level, 0, −1, −2, etc. Choose also an order of the edges of G: e 1 , e 2 , etc. For a configuration ω ∈ Ω of the graph at level −M create new configurations at level above −M updating the value of ω e k one at the time, according to the conditional probabilities that depends geometrical shape of the configuration. The details of this dynamics are given in Section 3. Let us just recall here that the law used to update the value of ω e k depends on the existence of a connected path of edges e, different from e k , such that ω e = 1, joining the end vertexes of e k . The construction of this dynamics can be seen as a particular case of the Glauber dynamics. In the study of the random cluster measures similar dynamics where already considered, for example by Grimmett in [Gri95].
We now construct a coupling of all the dynamics for each possible initial configuration. We color with black, gray or white, in an independent way, the edges of all the copies of G. The law used to color the edge e at level −ℓ depends only on the parameter p e . The coupling is constructed in such a way that for all possible initial configurations ω, the value of the configuration in e at level −ℓ will be 1 whenever the edge e at level −ℓ is black and 0 whenever it is white. Now fix a finite region F of G. In Theorem 8 in the case of high temperature (which corresponds to p e close to zero), we prove that, for almost all coloring as above, there exists a finite region C b F of the union of all the copies of G that is "surrounded" by white edges and containing the region F at level 0. Finally, in Theorem 5 we prove that, given a coloring, if the region C b F is finite then we can determine a bigger finite regionH such that the output of the dynamics described above at level 0 in the region F does not depend on the choice of ω and on the coloring outside the regionH.
Similar results are proved in Theorems 7 and 4 in the case of low temperature which corresponds to p e close to one. However in this case the meaning of the word "surrounded" is different. To treat this case we have to make some further assumption on the geometry of the graph G. For this reason in Section 4 we introduce the concept of simplicial graph. These are the graphs that can be obtained as the vertexes and edges of a tessellation of an euclidean space. The first example we have in mind is the cubic lattice L d = (Z d , E d ). In Section 4 we prove also the results required in the proof of Theorems 7 and 4.
In Section 7 we summarize these results and we show how to obtain an algorithm for the perfect simulation of the random cluster measure. We give the details only in the case of low temperature which is the most difficult and interesting. The case of high temperature can be treated in a similar way. As a byproduct we also obtain the uniqueness of the random cluster measure at low or high temperature, which, al least in the case of L d is well known (see [Gri95,Gri04]).
In the last section we analyze the connection between the perfect simulation of the random cluster measure and the Potts model. We construct an algorithm to simulate the Potts model with free boundary conditions at low or high temperatures.
We also refer to some literatures on perfect simulation. In [PW96] was introduced the perfect simulation algorithm for Markov chains. If the chain is ergodic with this algorithm it is possible to simulate the unique stationary measure associated with the chain. This paper has started some new research fields. One area of research concerns the Markov fields (see [HS00,DSP08]); a second one concerns the processes with infinite memory (see [CFF02,DSP12,Gal11]). Recently, these two areas of research have been in some sense unified by studying Gibbs measures with infinite interaction range (see [GLO10,DSL12]). Our paper is included in the latter context.

Some notations on graphs
In this section we recall some definitions on graphs that will be used in the sequel. In this paper a graph will be a collection of two sets, V called the set of vertexes and E called the set of edges, and of a map from E to the set of unordered pairs of different elements of V . The pair associated to an edge e are called the end vertexes of e and the two vertexes are said to be adjacent. As it is common in the literature we will denote a graph by (V, E). A path in G joining the vertexes u and v is a sequence e 1 , . . . , e m in E such that e i and e i+1 have a common vertex, u is an end vertex of e 1 and v is an end vertex of e m . The integer m is called the length of the path. Two vertexes are said to be in the same connected component if there is a path joining them. The graph-distance of two vertexes u and v, denote with δ G (u, v), is the length of a minimal path of joining them, and it is infinite if the two vertexes are in different connected components. We denote by B G (v, r) the ball of center v and ray r with respect to this distance.

The random cluster measure
In this section we define the random cluster measure introduced by Fortuin and Kasteleyn as explained in the book of Grimmett [Gri04]. Since our setting will be slightly more general than the one exposed by Grimmett we give the construction of the measure. However all the arguments given in his book easily generalize to our setting, so we refer to [Gri04], Chapter 4, for the details.
2.1. Construction as thermodynamic limit. For our constructions we fix a graph G = (V, E). We further assume that it is countable of finite degree, meaning that V is countable and that every vertex is an end vertex of a finite number of edges.
Set Ω = {0, 1} E and let F be the σ-algebra generated by finite cylinders. If ω ∈ Ω we denote by E(ω) the set of the elements e ∈ E such that ω e = 1. To define a random cluster measure we also fix parameters p = (p e ∈ [0, 1] : e ∈ E), and q ∈ (0, ∞). For simplicity in this paper we will assume q ≥ 1 which is the more significant for the application to statistical mechanics.
There are two ways of defining random cluster measure on G. The first method is as limit on finite subgraph and is called the thermodynamic limit. The second method is by giving the conditional probabilities on finite subgraph and it is called the Dobrushin-Lanford-Ruelle or DLR method. We now explain briefly the construction as thermodynamic limit.
Given ξ ∈ Ω and F ⊂ E a finite set, let Ω ξ F = {ω ∈ Ω : ω e = ξ e for all e ∈ F }. We define the measure φ ξ F,p,q on Ω by: where k(ω, F ) is the number of connected components of the graph (V, E(ω)) that intersects F and Z ξ,F is just the normalizing constant. Following [Gri04] Definition 4.15 we say that a probability φ on (Ω, F ) is a limit random cluster measure if there is a sequence (ξ n , F n ) such that φ is the weak limit of the measures φ ξn Fn,p,q and we denote by W p,q the set of these measures. If we fix ξ n to be constantly equal to 1 (resp. to 0) the limit of the measures φ ξn Fn,p,q exists, and it does not depend on the choice of the sequence F n (see Theorem 4.19 in [Gri04]). This limit will be denoted by φ 1 p,q (resp. φ 0 p,q ). Moreover, for all φ ∈ W p,q , we have where ≤ st is the standard stochastic order as in [Gri04] Section 2.1.
Another important property of these measures is the so called finite energy property. Letp e = p e /(p e + q(1 − p e )), (2) then for all φ ∈ W p,q and e ∈ E, we havê a.s.
where L e = {ω : ω e = 1}, T e is the σ-algebra generated by the finite cylinders with base contained in E \ {e}.

DLR construction.
In the case of a finite graph G = (V, E) the definition given above furnishes a unique measure on (Ω, F ) which is characterized by the conditional probability of ω e = 1 given the values of ω in E \ {e}. In this model these probabilities depend on the existence of a path in E(ω) \ {e} joining the two end vertexes of the edge e. Let K e be the set of configurations ω having this property.
In the case of infinite graph this property can be formalized as follows: A probability φ on (Ω, F ) is a DLR random cluster measure if it satisfies equation (3) for all e ∈ E. We denote by R p,q the set of these measures. In the infinite setting the two definitions of random cluster measure are not always equivalent. However (see [Gri04], Chapter 4, Section 4) it is known that R p,q is not empty, in particular φ 0 p,q and φ 1 p,q are elements of R p,q and for all φ ∈ R p,q one has φ 0 p,q ≤ st φ ≤ st φ 1 p,q . In particular notice that card(W p,q ) = card(R p,q ) = 1 if and only if φ 0 p,q = φ 1 p,q .

Construction of the dynamics
In this paper, following the literature, to give a sample of a measure on (Ω, F ) we introduce families of auxiliary random variables (u e ) e∈E that are independent and uniformly distributed on [0, 1], which in the algorithm we present in Sections 7 and 8 can be thought as the output of a pseudorandom function on a computer.
We now define a stochastic dynamic such that the measures in R p,q are invariant. A similar dynamics was already considered by Grimmett in [Gri95].
Let G = (V, E) be a countable graph of finite degree and we choose an order for its edges so that E = {e 1 , e 2 , . . .}.
For a negative number N we define A N = {(n, k) ∈ Z × Z : −1 ≥ n ≥ N and k ≥ 1} (resp. A = N A N ) and U = [0, 1] A . On U we put the Lebesgue product measure so that the coordinates u n,k are i.i.d. random variables having uniform distribution on [0, 1]. We define alsoÃ N = A N ∪ {(n, 0) : n = N, . . . , 0} and A = NÃ N .
For a fixed N < 0 and for a fixed X N,0 : U −→ Ω let (X n,k : U −→ Ω such that (n, k) ∈Ã N ) be a process with values in Ω constructed in the following way: given if u n,k+1 < p e , e = e k+1 and X n,k (u) ∈ K e , 1 if u n,k+1 <p e , e = e k+1 and X n,k (u) / ∈ K e , 0 otherwise.
Furthermore notice that for all n there exists the limit X n,k for k going to infinity. We construct X n+1,0 as this limit. We call such a process an F K N p,q -process. All DLR random cluster measures are invariant under this process. Indeed if φ ∈ R p,q and X n,k has law φ then X n,k+1 has the same law. Hence, for h > k and m = n, or for m > n, X m,h has law φ.
Finally, for any integer N < 0 and any ω ∈ Ω we denote with X (ω,N ) n,k the F K N p,q -process constructed starting with X N,0 (u) = ω for u ∈ U.
In the main result of this paper, under suitable assumption on the parameters p, q and on the graph G, given a finite F ⊂ E and u ∈ U we will show how to determine a integer N such that (X (ω,N ) 0,0 (u)) e does not depend on ω ∈ Ω for all e ∈ F . Moreover we show how to determine a finite region F ′ ⊃ F such that (X (ω,N ) 0,0 (u)) e does not depend on the values of u n,k for e k / ∈ F ′ .
Since the R p,q -measures are invariant in this way we prove that they are all equal and we give a perfect simulation of them on any finite subset of E. In particular we prove R p,q = W p,q = {φ 0 p,q }.

Simplicial graph
In this section we define the notion of simplicial graph and we prove some geometric properties of these graphs. It is possible that these results are already known, maybe with different notations, however we could not find a reference.
The prototypical graph we have in mind is the graph L d whose vertices's are the elements of Z d and whose edges are the segments of length one joining them. More in general a simplicial graph will be the graph obtained by considering vertices's and segment of a polyhedral tessellation of R d .
Before giving the details we explain roughly the problem we want to consider in the next sections. Let G = (V, E) be a graph and color each edge of G white or back in a random way. Now consider a finite subset F of E. We want to determine a regionH containing F such that for all e ∈ F if there is a path of black edges joining the two end vertexes of e then there is a path contained inH of black edges joining the two end vertexes of e (see Theorem 4). Moreover we wantH to be small as possible so that if the probability of an edge to be black is high then if F is finite thenH is also almost surely finite (see Theorem 7). We construct first a set H by adding inductively to F white edges until its "boundary" is entirely composed by black edges and then we setH to be equal to the union of H with its boundary. The idea is that, in this way, if two points are in the boundary ofH, then they can be connected by a path contained in the boundary and in particular of black edges (for the precise statement see Proposition 3). In this way when a path of black edges has its end vertexes in F can be replaced by a path of black edges with the same end vertexes and contained inH by replacing the pieces outsideH with paths along the boundary. A first try could be to construct H by adding edges to F until there are white edges connected by a vertex to the set. In this way H would be the union of F with the connected components of the subgraph of white edges having non trivial intersection with F . However it is immediate to see that this H has not the required properties. For a simplicial graph we can construct H replacing the condition "to have a vertex in common" with a different condition. We construct H by adding to F white edges until there are white edges in the "boundary" of this set. The correct notion of "boundary" is defined in Section 4.3, now we explain it in the case of the simplicial graph L d . We say that an edge e ′ is in the "boundary" of an edge e if they are different and if there exists a d-dimensional hypercube of side 1 with vertexes in Z d containing both e and e ′ . In this section we prove that this notion of boundary has the required geometrical properties (see Proposition 3).

4.1.
Definitions. Let A be a closed convex subset of R ℓ which is the intersection of a finite number of closed half-spaces. Such a set will be called a convex cell and will be the starting point of our constructions. For such a set we can identify the subset of vertexes, edges and i-dimensional faces and we denote by A i the set of i-dimensional faces of A.
In some constructions will be useful to have a more general notion of cell. If A is a convex cell of dimension m and ϕ : A −→ R d is a piecewise affine continuous injective map we call the image σ of A a cell of R d of dimension m. We define also the collections σ i = {ϕ(B) : B ∈ A i } and the datum of σ 0 , . . . , σ m will be called a polyhedron.
The assumption piecewise affine on ϕ could be highly relaxed, however this assumption makes some of the arguments below more elementary and does not change the generality of our applications.
A polytope P in R d is a collection of cells in R d which intersect properly. More precisely P is the datum of sets P 0 , P 1 , · · · , P m such that i) the elements of P i are i-dimensional cells of R d ; ii) P i is locally finite: this means that for all bounded regions R of R d σ∩R = ∅ for all σ ∈ P i but a finite number; iii) if we denote by P j (σ) = {τ ∈ P j : τ ⊂ σ}, for all σ ∈ P i and all j ≤ i, then the collection is a polyhedron and the set P i (σ) will be called the set of i-faces of σ; iv) for all σ ∈ P i and τ ∈ P j the intersection σ ∩ τ is either empty or a union of faces of σ and τ .
The elements of P i will be called the i-cells of P and in particular we will call P 0 (resp. P 1 ) the set of vertexes (resp. of edges) of P. The union of all the cells of P will be called the support of P and will be denoted by supp (P).
The graph G(P) = (V, E) associated to P is defined as follows: V = P 0 , E = P 1 and the end vertexes of an edge e ∈ E is the pair of vertexes contained in e. Notice that if x and y are two vertexes of P then they are in the same connected component of supp (P) if and only if they are in the same connected component of G(P).
The simplest possible convex cell are the simplexes. The ℓ dimensional standard simplex is the set A ℓ-dimensional convex simplex (resp. an ℓ-dimensional simplex ) is the image of S under an affine (resp. piecewise affine and continuous) injective map. We notice that every cell can be obtained as the support of a polytope whose cells are simplexes.
A refinement of a polytope P is a polytope P ′ such that supp (P) = supp (P ′ ) and each cell of P ′ is contained in a cell of P.

4.2.
Internal and external part of codimension one smooth polytopes. We say that a polytope C in R d is smooth if its support is smooth as a topological variety. In this case this means that for every x ∈ supp (C) there exists a natural number j, a neighborhood W of x in R d an open ball W ′ of R d and a piecewise affine continuous map ψ : W −→ W ′ which defines an homeomorphism between W and W ′ , such that ψ(x) = 0 and ψ(W ∩ supp (C)) = {(t 1 , . . . , t n ) ∈ W ′ : t 1 = · · · = t j = 0}. If, moreover all the connected components of supp (C) have dimension n − 1 we say that it is a smooth polytope of codimension one. Notice that if C is smooth of codimension one in R d then for all x in supp (C) there exists a neighborhood W of x in R d which is divided by supp (C) into two open connected components. Now we give a more global construction of these components.
Let C be a codimension one smooth polytope in R d with a finite number of vertexes and let U be the complement of supp (C). For all x ∈ U we consider the set S x (C) of half-lines ℓ starting in x and whose intersection with supp (C) is generic. More precisely we require that for all cells σ of C if ℓ ∩ σ = ∅ then σ ∈ P d−1 and ℓ ∩ σ is a finite set and moreover this intersection is contained in the set of points of σ that are linearly smooth: for all y ∈ ℓ ∩ σ there exists a neighborhood U of y and an hyperplane such that σ ∩ U = U ∩ H. Then the parity of the cardinality of ℓ ∩ supp (C) does not depend on ℓ ∈ S x (C). Moreover this parity is locally constant on x ∈ U .
Hence we define the internal part of C, that we will denote by Int C as the set of points x ∈ U such that this cardinality is odd and the external part, that we will denote by Est C as the set of point such that this cardinality is even. Notice that Int C and Est C are two open subsets of R d with boundary equal to supp (C). In particular for all path joining an element of Int C with an element of Est C the intersection of γ with supp (C) is not empty. Finally notice that Int C is bounded.
Notice that for all x ∈ supp (C) if W is a neighborhood of x as in the beginning of this section, then the two connected components of W \supp (C) are the intersection of W with Int C and Est C. We say that a path γ cross C in x if γ(t 0 ) = x for some t 0 and there exists sequences {t n } and {s n } going to t 0 such that γ(s n ) ∈ Est C and γ(t n ) ∈ Int C for all n.
Lemma 1. Let C be a codimension one smooth polytope in R d with a finite number of vertexes. Then for all x, y ∈ supp (C) such that there exists a path in Int C joining x and y, and a path in Est C joining x and y, then x and y are in the same connected component of supp (C). In particular if x, y are vertexes then they are in the same connected component of G(C).
Proof. Let α (resp. β) be a path joining x and y in Int C (resp. Est C). Consider the connected component D of supp (C) containing x and let D be the polytope whose cells are the cells of C contained in D. D is a connected codimension one smooth polytope with a finite number of vertexes. Notice that, by what noticed above, in a small neighborhood W of D we have that W \ D has two connected components W 1 and W 2 and we have W 1 = W ∩ Int C and W 2 = W ∩ Est C. Similarly W 1 and W 2 must be the intersection with Int D and Est D, and both the possibilities can occur. Since α and β do never cross C they also never cross D and we have that α is contained in IntD and β is contained in EstD or the opposite. Hence the final point y of α and β belongs to Int D ∩ Est D hence it is in D.

4.3.
Polyhedral tessellation and simplicial graph. We say that a polytope P is a polyhedral tessellation of R d if supp (P) = R d . In this case we say that G = G(P) is a simplicial graph.
If A ⊂ P 0 we define the boundary ∆ P (A) of A as the set of vertexes v ∈ P 0 \ A for which there exists, w ∈ A and a cell σ of P, such that v, w ∈ σ and we define G(A) as the graph whose set of vertexes is equal to A and whose edges are given by the element in P 1 joining two elements of A. Notice also that if x ∈ A and y ∈ P 0 \ A any path in G(P) joining x and y intersects ∆ P (A).
Proposition 2. Let P be a polyhedral tessellation of R d and let V be its set of vertexes. Let A be a finite subset of V and set B = V \ A. Let x, y ∈ A adjacent respectively to x ′ , y ′ ∈ B. Assume now that x, y are connected in G(A) and that x ′ , y ′ are connected in G(B). Then x ′ , y ′ are connected in G(∆ P (A)).
Proof. The proof follows exactly the same lines in the case of a tessellation using convex cells and in the case of a general tessellation. However in the first case all construction are more intuitive and direct. For this reason we give first the proof in the case of a tessellation made of convex cells and then we briefly explain how to change the proof in the general case.
In the first step of the proof we assume also that all cells are convex simplexes. We construct a smooth polytope C of codimension one that separate A and B in the following way.
We define the set of vertexes C 0 of C as the set of middle points of edges joining an element of A and an element of B. For all i dimensional simplexes σ of C which contain an element of C 0 the convex envelope of σ ∩ C 0 is a i − 1 cell. Let C i−1 be the collection of these cells and let C be the polytope whose i dimensional cells are given by C i for i = 0, . . . , n − 1. By construction C is a smooth polytope of codimension one with a finite number of vertexes. Notice also that a path in G(A) or in G(B) will never cross supp (C).
Let now u, v ∈ C 0 be the middle points of the edges joining x, x ′ and y and y ′ respectively. By Proposition 1 u and v are in the same connected component of G(C). Hence there exists a sequence of vertexes w 0 = u, w 1 , . . . , w m = v in C 0 determining the path connecting u and v in G(C). Furthermore let t i ∈ A and t ′ i ∈ B be such that w i is the middle point of the edge joining t i and t ′ i . Then . . , t ′ m = y ′ determine a path in ∆ P (A) joining x ′ and y ′ . Let now P be any tessellation with convex cells. We construct a sequence P (i) of refinements of P and of finite subsets A (i) of the vertexes of P (i) .
• P (2) is the tessellation obtained by adding a vertex v σ in the barycentre of all 2-dimensional faces σ ∈ P 2 which are not a simplex and adding the edges joining v σ with the vertexes of σ. Finally we set A (2) = A∪{v σ : σ∩A = ∅}. • more generally given P (i−1) , P (i) will be the tessellation obtained adding a vertex v σ in the barycentre of every i-dimensional cell σ of C (i−1) which is not a simplex and adding all the j-dimensional cells obtained by joining this vertex with the j − 1 cells contained in σ. Finally we set Set P ′ = P (d) and A ′ = A (d) , and B ′ is the complement of A ′ in the set of vertexes of P ′ . Notice that all cells of C ′ are convex simplexes and that ∆ P (A) = ∆ P ′ (A ′ ). Hence we can apply to this situation what we have already proved.
In the case of a tessellation whose cells are not convex some of the constructions we have described have to be modified. Indeed it does not make sense to consider the middle point of an edge or the convex envelope of the middle points in the first part of the proof or the barycentre in the second part of the proof. As an example we show which changes are necessary in the construction of the sequence P (i) .
Suppose we have already constructed P (i−1) and that all j-dimensional cells of P (i−1) are simplexes for j ≤ i − 1. Now consider a i-dimensional cell σ of P (i−1) which is not a simplex. Let ϕ : A −→ σ be the piecewise affine map which parametrise σ where A is a convex cells. Notice that by induction all faces of A are convex simplexes. Now let v be the barycentre of A and that we can divide A into simplexes A τ joining v with the faces of A. We obtain the new tessellation by considering the restriction of ϕ to the simplexes A τ .
The result we will use in the next section is a variation of Proposition 2 where the set of vertexes A is replaced by a set of edges.
If H ⊂ P 1 we define the boundary ∆ P (H) of H as the set of edges e ∈ P 1 \ H for which there exists, d ∈ H and σ ∈ P n such that e, d ⊂ σ. Let also V H = {v ∈ P 0 : v ∈ e for some e ∈ H} and let G(H) be the subgraph (V H , H) of G(P).
Proposition 3. Let P be a polyhedral tessellation of R d and H ⊂ P 1 be a finite set. Let x, y ∈ V H be connected in G(H) and in G (P 1 \ H). Then x and y are connected in G(∆ P (H)).
Proof. Let e 1 , . . . , e m be a path in H which join x and y and let f 1 , . . . , f n be a path in P 1 \ H which joins x and y. Let x = u 0 , . . . , u m = y and x = v 0 , . . . , v n = y be the sequences of adjacent vertexes determined respectively by the path in H and in P 1 \ H. Dividing the path into smaller pieces we can assume that u i = v j for 1 ≤ i ≤ m − 1 and 1 ≤ j ≤ n − 1.
We construct a refinement Q of P replacing each vertex w with a small convex cell so that we will be able to apply Proposition 2 to this situation.
More precisely for each vertex w we consider a "small" ball B w with centre w which is "far" from every cell of P not containing w. We set also D w to be the intersection of the boundary of B w with the edges in P 1 containing w and A w to be the intersection of the boundary of B w with the edges in H containing w. We set We now describe the higher dimensional cells of Q. Let F w be convex envelope of the set D w and let M n be its boundary and N w its open part. If B w is small enough for every i-dimensional cell σ of P containing w the intersections σ w = σ ∩ F w and σ ∂ w = σ ∩ M w are respectively an i-dimensional cell and an (i − 1)-dimensional cell. Finally for all i-dimensional cells σ of P the setσ = σ \ w N w is also an i-dimensional cell. The tessellation Q is the collection of the cellsσ, σ w and σ ∂ w for σ a cell of P and w ∈ P 0 .

Coupling of the random cluster measure at low or high temperatures
In this section we fix a polyhedral tessellation P in R d and we denote by G = (V, E) the underlying simplicial graph. We introduce a new graph G * = (V * , E * ) where V * = Z × V and E * = Z × E ∪ Z × V where if x, y are the end vertexes of e ∈ E then (n, x), (n, y) are the end vertexes of (n, e) ∈ E * and if v ∈ V and n ∈ Z then we denote with e n,v the corresponding element in E * and its end vertexes are (n, v), (n + 1, v) ∈ V * . Notice that G * is the simplicial graph of a polyhedral tessellation P * of R d+1 = R × R d whose i-dimensional cells are the collection of the cells of the form {n} × σ where σ is an i-dimensional cell of P and n ∈ Z and of the cells of the form [n, n + 1] × τ and τ is an (i − 1)-dimensional cell of P and n ∈ Z. We consider G as the subgraph G × {−1} of G * .
Fix u ∈ U. We define the following coloring of the edges E * of G * : W = W (u) = {(n, e k ) ∈ E * : (n, k) ∈ A and p e k ≤ u n,k ≤ 1}, M = M (u) = {(n, e k ) ∈ E * : (n, k) ∈ A andp e k ≤ u n,k < p e k }, We define also B n = {e ∈ E : (n, e) ∈ B}. We say that the elements of B are black, the elements of M are gray and the elements of W are white. Given a subset F of M (u) ∪ W (u) we define the cluster of white or gray edges C w F = C w F (u) as the minimum subset H of E * containing F such that if e ∈ E * and e ∈ ∆ P * (H) then e ∈ B(u).
inductively by adding the white or gray edges "near" to F as follows.
Notice that as the numbers p e grow the probability that C w F is finite increase. As we will see in the last section in the Ising model the p e 's are related to a parameter called temperature and when this parameter is small the p e are closer to 1. For this reason we refer to the case in which C w F is finite as the situation at low temperature. Assume now that C w F is finite. In this case we define N w (u, F ) as the biggest and we setH w n (u, F ) = H w n ∪ ∆ P (H w n ) and finallyH w (u, F ) = n {n} ×H w n . Theorem 4. Fix u ∈ U such that C w F (u) is finite and an integer N ≤ N w (u, F ). Let u ′ ∈ U N such that u ′ n,k = u n,k for all (n, e k ) ∈H w (u, F ). Then for all ω, ω ′ ∈ Ω we have X for all e ∈H w −1 (u, F ).
Proof. Let η n,k = X (ω,N ) n,k (u) and η ′ n,k = X (ω ′ ,N ) n,k (u ′ ). Let also C = C w F and C n = {e ∈ E : (n, e) ∈ C}, H n = C n ∪ C n−1 andH n = H n ∪ ∆ P (H n ). We notice first that ∆ P (H n ) ⊂ B n ∩ B n−1 . Indeed let e ∈ ∆ P (H n ), then there exists e ′ ∈ H n and a cell σ in P such that e and e ′ are contained in σ. If e / ∈ B n then by the definition of C and of the cells of P * we have that (n, e) ∈ C, hence e ∈ C n which is in contradiction with e ∈ ∆ P (H n ). Similarly we get an absurd if e / ∈ B n−1 . By the definition of a F K N p,q -process this implies that for all m > N and h ≥ 0. We will prove that η m,h e = η ′ m,h e for all (m, h) ∈Ã N and for all e ∈H m . We prove this by induction starting with m = N and h = 0. For m ≤ N w (u, F ) and for all h the equality (7) is trivially satisfied since C m = ∅. Now we prove that if equation (7) holds for m = N, . . . , n − 1 and for all h and for m = n and h = 0, 1, . . . , k then it holds also m = n and h = k + 1. Let e ∈H n . If e = e k+1 then by induction and definition of F K N p,q -process we get η n,k+1 e = η n,k e = η ′ n,k e = η ′ n,k+1 e proving the claim. If e = e k+1 and e ∈H n we compute η n,k+1 e k+1 . If u n,k+1 ≥ p e k+1 then we have η n,k+1 e k+1 = 0 and similarly for η ′ . If u n,k+1 <p e k+1 then we have η n,k+1 e k+1 = 1 and similarly for η ′ . Ifp e k+1 < u n,k+1 ≤ p e k+1 we need to prove that η n,k ∈ K e k+1 iff η ′ n,k ∈ K e k+1 .
(8) Let x and y be the end vertexes of e k+1 and assume that there is a path γ : ε 1 , . . . , ε m in E(η n,k ) \ {e k+1 } joining x and y.
If the path is contained inH n = C n ∪ C n−1 ∪ ∆ P (H n ) then we prove that the same path is contained in E(η ′ n,k ) \ {e k+1 }. Let e r be an edge of the path. By induction (η n,k ) er = (η ′ n,k ) er hence e r ∈ E(η ′ n,k ). If γ is not contained inH n we show there is another path joining x and y contained inH n . By (6) and the fact thatp e k+1 < u n,k+1 ≤ p e k+1 we have e k+1 ∈ H n . Let D be the connected component of H n containing e k+1 . Let ε 1 , . . . , ε i−1 ∈ D, ε i , . . . , ε j / ∈ D and ε j+1 ∈ D. Let x ′ be the vertex common to ε i−1 and ε i and y ′ the vertex common to ε j and ε j+1 . We can apply Proposition 3 and we construct a path β in ∆ P (D) ⊂ ∆ P (H n ) joining x ′ and y ′ . Since ∆ P (H n ) ⊂ E(η n,k ) ∩ E(η ′ n,k ) we can replace γ with the path γ ′ : ε 1 , . . . , ε i−1 , β, ε j+1 , . . . , ε m . Repeating this process we see that we can substitute the path γ with a path entirely contained in D ∪ ∆ P (D) ⊂H n as claimed. Hence we are reduced to the previous case.
Finally we prove that if (7) holds for a fixed m and all h ≥ 1 then it holds also for m + 1, 0. Let e ∈ C m+1 . If e ∈H m this follows by definition of the F K N p,q -process. If e = e r ∈H m+1 \ C m then e ∈ B m otherwise e would be an element of C m ). Then (η m+1,0 ) er = (η m,r ) er = 1 = (η ′ m,r ) er = (η m+1,0 ) er proving the claim. 5.1. Coupling at high temperatures. We give now a similar result corresponding, in the Ising model, to high temperatures.
Let G = (V, E) be a countable graph (in this case we do not assume simplicial). DefineḠ as the graph with set of vertexesV = Z <0 × V and edgesV = Z <0 × E where if e ∈ E has end vertexes x, y then the edge (n, e) has end vertexes (n, x) and (n, y). We consider G as the subgraph G × {−1} of G * . For all u ∈ U define M (u), W (u) as in the previous section.
For a subset H of E we denote by Γ(H) the set of edges which are not in H and which have a vertex in common with an edge in H.
Fix u ∈ U and a subset F of E * . If F ⊂ M (u) we define the cluster of black or gray edges C b F = C b F (u) as the smallest set C ofĒ containing F and such that for all (n, e) ∈Ē \ C if either (n − 1, e) or (n, e) or (n + 1, e) have a vertex in common with an edge in C then (n, e) ∈ W (u). If F is not necessarily contained in M (u) Theorem 5. Fix u ∈ U such that C b F (u) is finite and an integer N ≤ N b (u, F ). If ω, ω ′ ∈ Ω and u ′ ∈ U N is such that u ′ n,k = u n,k for all (e k , n) ∈H b (u, F ) then Proof. The proof follows exactly the same strategy of the proof of Theorem 4. However in this case it is simpler since we do not have to use the result of Section 4. We give here only the main lines. Indeed an argument analogous to proof of equation (6) gives Then we prove the equality (7) by induction as in the proof of Theorem 4. Also in this case we are reduced easily to prove the equivalence (8). This equivalence is easier in this case, since, by (9), we have that E(η n,h ) ⊂ H b n for all n > N and similarly for η ′ so we can assume that the path joining the extremal point of e k+1 is contained in H b n without using any further result, while in the proof of Theorem 4 we need Proposition 3. The remaining argument are completely similar to the proof of Theorem 4.

Assumptions for the finiteness of clusters
In this section, given a graph G, we present some conditions on it and on the parameters p such that the cluster C w F of Theorem 4 is almost surely finite or such that the cluster C b F of Theorem 5 is almost surely finite. We start by recalling a general Lemma. Let G = (V, E) be a graph and let π = (π v ) v∈V be an element of [0, 1] V . Consider the product measure on the space Lemma 6. Let G and π be as above. For each vertex v ∈ V let A v be the set of vertexes adjacent to v and set n , in particular the sequence {Z v,n } n is a supermartingale. Hence the mean value E(Z v,n ) is less or equal to g n . By Markov inequality the claim follows.
6.1. Assumptions for the finiteness of clusters at low temperatures. Now we give conditions on G and p such that the cluster C w F (u) defined in Section 5 is finite for almost all u ∈ U. We fix a polyhedral tessellation P of R d . Let G = (V, E) be the associated simplicial graph and let P * and G * = (V * , E * ) be defined as in Section 5.
For the proof of our next Theorem we introduce a new graph G = (V, E) defined as follows: V = E * and two elements e, e ′ ∈ V are joined by an edge in E if and only if there exist a cell in P * which contains e and e ′ .
If H ⊂ E * and u ∈ U we define also the subgraph G(H, u) = (V(H, u), E(H, u)) of G whose set of vertexes are equal to V(H, u) = H \B(u) and whose edges E(H, u) are all the edges of E joining two vertexes in V(H, u).
For e ∈ E defineĝ e = 2(1 −p e ) + 3 wherep e is defined in (2). Then for all e ∈ E the cluster C w e (u) is finite for almost all u ∈ U. Proof. First we do a preliminary remark: the event I = ∪ e∈E {u ∈ U : card C w e (u) = ∞}, is in the tail σ-algebra. Therefore, by Kolmogorov 0-1 law, this event has probability zero or one, in particular to prove our claim it is enough to prove that P (I) < 1.
Choose ℓ 0 such that 3 card(F ) 1−g g ℓ0 < 1 2 and, for ℓ ≥ ℓ 0 + 1, define the events We notice that the probability P 0 = P (W ℓ ) does not depend on ℓ and it is a positive constant beingp e > 0 for any e ∈ E. We notice also that X ℓ ⊂ X ℓ+1 and that their union is equal to I. Therefore We also define the events Finally define Z ℓ,1 =Z ℓ,1 and Z ℓ,i =Z ℓ,i \Z ℓ,i−1 for i > 1. It is clear that . Now we notice that the events W ℓ is decreasing meaning that if u ∈ X ℓ and u ′ ∈ U is such that u ′ n,h ≤ u n,h for all n, h then u ′ ∈ W ℓ . With a similar definition the events Y ℓ and Z ℓ,i are increasing. Hence, by the FKG inequality we obtain P (Y ℓ |W ℓ ) ≤ P (Y ℓ ) and P (Z ℓ,i |W ℓ ) ≤ P (Z ℓ,i ) (see [Gri99], Chapter 2). Hence, noticing that P (Z ℓ,i |W ℓ ) = 0 for i < ℓ 0 , we get P (X ℓ |W ℓ ) ≤ P (Y ℓ )+ i=ℓ0 P (Z ℓ,i ). Now we estimate P (Y ℓ ) and P (Z ℓ,i ) using Lemma 6. We start with Y ℓ . Consider the random graph G(F c , u) and set π e = 1 −p e . Notice that Y ℓ ⊂ e∈Λ ℓ {u ∈ U : V(F c , u) e,S ℓ = ∅} hence using Lemma 6 we get for ℓ large enough. For Z ℓ.i we proceed in a similar way. Consider again the random graph G(F c , u). Notice that in the sequence e 1 , . . . , e m which appears in the definition ofZ ℓ,i the subsequence e 2 . . . , e m−1 is inF c and e 2 ∈F ℓ,i := V(F c , u) e,i = ∅} and using Lemma 6 we get Recall that P 0 = P (W ℓ ) does not depend on ℓ, hence we have Finally notice that lim ℓ→∞ S ℓ g S ℓ = 0. Hence then for all e ∈ E the set C b e (u) is finite for almost all u ∈ U. The proof follows exactly the same lines of the proof of Theorem 7, however we do not need any result from Section 4. 7. Perfect simulation of the random cluster measure at low or high temperature As an application of the previous results we now explain how to prove uniqueness of the random cluster measure and how to obtain a perfect simulation of the random cluster measure using the results of the previous sections. We explain these results in the case of low temperatures. The case of high temperatures can be obtained in a similar way. In this section, from now on we assume that G is a simplicial graph, that p e > 0 for all e ∈ E and that lim Λ↑E sup e ∈Λĝe < 1. The uniqueness proved in the following Corollary is well known at least in the case of L d .
Corollary 9. Assuming the hypotheses above the random cluster measure on G is unique.
To prove that φ and φ ′ are equal we prove that for each finite subset F of E the projections φ F and φ ′ F of φ and φ ′ onto {0, 1} F are equal. We denote also by X Let ω be a random variable with law φ and ω ′ a random variable with law φ ′ . By Theorem 4 we have that where the lefthandterm is the total variation distance between the law of X . Recall now that as noticed in Section 3 the DLR random cluster measures are invariant under a F K N p,q -process. Hence, since ω has law φ, the random variable X (N,ω) F has law φ F and X Finally by Theorem 7, C w F (u) is finite for almost all u ∈ U. Hence P (u ∈ U : N w (u, F ) ≤ N ) goes to zero as N goes to infinity. Hence φ and φ ′ are equal. Now, under the same assumptions, given a finite subset F of E we briefly describe an algorithm which furnishes a sampling of the random cluster measure on F .
Let be given a generator of independent random numbers u n,k . The algorithm takes F as an input, a suitable description of the tessellation P, and gives as output subsets C,H of E * , a subsetH −1 of E and a configuration Y ∈ {0, 1}H −1 . It uses also local variables D, D ′ , F ′ , L and generates u n,k for (n, e k ) ∈H. We uses also the notation of B(u), M (u), W (u) for black, gray and white edges introduced at the beginning of Section 5. We describe the algorithm with the following pseudocode.
Step 1: generate the random numbers u n,k for n = −1 and e k ∈ F and set F ′ = {−1} × F ; Step 2: set D = F ′ \ B(u)); Step 3: set L = D∪∆ P * (D) and generates the random numbers u n,k for (n, e k ) ∈ L \ (D ∪ F ′ ); Step 4: set D ′ = D ∪ (L \ B(u)) as in the construction of the sets D i at the beginning of Section 5; Step 5: if D ′ = D assigning to D the value given by D ′ and goes to step 3; Step 6: if D ′ = D then C = D ∪ F ′ and compute N = N w (u, F ) as in Section 5; Step 7: use the formula (5) to compute the sets H w n and defineH = −1 n=N {n} × H n whereH n = H w n ∪ ∆ P (H w n ) as in Section 5; Step 8: generate the random numbers u n,k for (n, e k ) ∈H \ C; Step 9: e ∈H −1 use the process described in Section 3 to compute the value Y e = X where ω e = 0 for all e ∈H N . As explained in the proof of Theorem 4, by Proposition 3, for this computation it is enough to know the value of u only inside the regionH. Notice that under our assumption, almost surely, this algorithm will end in a finite number of steps. Notice also that the output C is the set C w F (u, F ),H is the setH w (u, F ). Finally as explained in proof of uniqueness above Y has law φ F where φ F is the projection onto {0, 1} F of the unique random cluster measure on {0, 1} E .
In the case sup e∈Eĝe < 1 it can be easily proved that the average complexity of this algorithm goes linearly with the cardinality of F .

Applications to the Ising and Potts Model at low or high temperatures
We apply the results obtained in the previous sections for the random cluster measure to the construction of a perfect simulation of the Ising and of the Potts model with free boundary condition.
Let G = (V, E) be a countable graph of finite degree. We briefly recall how the Ising model with free boundary conditions can be obtained from the random cluster measure with q = 2, see the original paper by Fortuin and Kasteleyn [FK72], the book of Grimmett [Gri04], Chapter 1 or the book of Newman [New97], Chapter 3 for the details. Let β ∈ (0, ∞) be the parameter of the Ising model called the inverse of the temperature and let J e for e ∈ E be the positive parameters defining the Ising model called the interactions. In the random cluster measure choose q = 2 and p e = 1 − e −βJe for all e ∈ E. Now we color, with + or −, each vertex of G using the following rule. Consider the subgraph G(ω) = (V, E(ω)) of G where ω is selected using the random cluster measure φ 0 p,2 and E(ω) is defined as in Section 2. Color the connected components of G(ω) with + or − with an independent and uniform probability 1/2. Finally color each vertex with the same color of the connected component containing the vertex. A similar construction can be used to obtain the Potts model with free boundary conditions with the only difference that there are n colors, and we have to use the random cluster measure φ 0 p,n . Obviously the Ising model is a particular case of the Potts model so that we will study this second one in what follows.
We explain how to obtain a perfect simulation of the Potts model with free boundary condition in the case of low temperature. The case of high temperature is completely analogous. So assume that the hypotheses of Theorems 4 and 7 are satisfied: G is a simplicial graph associated to the tessellation P, p e > 0 for all e ∈ E and lim Λ↑E sup e ∈Λĝe < 1. Given a finite subset W of V we briefly describe an algorithm which furnishes a sampling of the Potts model on W .
Let F ′ be the set of edges having at least one end vertex in W and let F be a connected set of edges containing F ′ . Now we use the algorithm explained in the previous section to obtain a sampling of the random cluster measure. In particular given u we produce a set H = H w −1 (u, F ) and a configuration Y = X (ω,N ) 0,0 (see Theorem 4 for the explanation of this notation). Define also K as the connected component of H containing F andK as K ∪ ∆ P (K). Let VK be the set of end vertexes of the edges inK. Let also GK(Y ) be the subgraph of G(Y ) having as vertexes the set VK and as edges the setK ∩ E(Y ). Notice that, as in the proof of Theorem 4, if e ∈ ∆ P (H) then Y e = 1. Hence, by Proposition 3, if x, y ∈ VK then they are in the same connected component of the graph G(Y ) if and only if they are in same connected component of the graph GK(Y ) which under our assumption, by Theorem 7 is almost surely a finite graph. We determine the connected components of GK(Y ) and we color each connected component as prescribed by the Potts model. Finally we color each vertex in W with the same color of the connected component containing it.
It is easy to translate this description of this algorithm in an actual pseudocode as we have done in the previous section.