Counting independent sets in amenable groups

Abstract Given a locally finite graph 
$\Gamma $
 , an amenable subgroup G of graph automorphisms acting freely and almost transitively on its vertices, and a G-invariant activity function 
$\unicode{x3bb} $
 , consider the free energy 
$f_G(\Gamma ,\unicode{x3bb} )$
 of the hardcore model defined on the set of independent sets in 
$\Gamma $
 weighted by 
$\unicode{x3bb} $
 . Under the assumption that G is finitely generated and its word problem can be solved in exponential time, we define suitable ensembles of hardcore models and prove the following: if 
$\|\unicode{x3bb} \|_\infty < \unicode{x3bb} _c(\Delta )$
 , there exists a randomized 
$\epsilon $
 -additive approximation scheme for 
$f_G(\Gamma ,\unicode{x3bb} )$
 that runs in time 
$\mathrm {poly}((1+\epsilon ^{-1})\lvert \Gamma /G \rvert )$
 , where 
$\unicode{x3bb} _c(\Delta )$
 denotes the critical activity on the 
$\Delta $
 -regular tree. In addition, if G has a finite index linearly ordered subgroup such that its algebraic past can be decided in exponential time, we show that the algorithm can be chosen to be deterministic. However, we observe that if 
$\|\unicode{x3bb} \|_\infty> \unicode{x3bb} _c(\Delta )$
 , there is no efficient approximation scheme, unless 
$\mathrm {NP} = \mathrm {RP}$
 . This recovers the computational phase transition for the partition function of the hardcore model on finite graphs and provides an extension to the infinite setting. As an application in symbolic dynamics, we use these results to develop efficient approximation algorithms for the topological entropy of subshifts of finite type with enough safe symbols, we obtain a representation formula of pressure in terms of random trees of self-avoiding walks, and we provide new conditions for the uniqueness of the measure of maximal entropy based on the connective constant of a particular associated graph.


Introduction
Suppose that we are given a finite simple graph = (V , E) and we are asked to count its number of independent sets. An independent set is a subset I ⊆ V such that (v, v ) / ∈ E (that is, (v, v ) is not an edge) for all v, v ∈ I . For example, if is the 4-cycle C 4 (v 4 , v 1 )}, it can be checked that there are exactly seven different independent sets, namely ∅, {v 1 }, {v 2 }, {v 3 }, {v 4 }, {v 1 , v 3 }, and {v 2 , v 4 }. A common generalization of this question is to ask for the 'number' of weighted independent sets in : given a parameter λ > 0-usually called activity or fugacity-we ask for the value of the summation where X( ) denotes the collection of all independent sets in and |I |, the cardinality of a given independent set I. Notice that we recover the original problem-that is, to compute |X( )|-if we set λ = 1. The sum Z (λ) corresponds to the normalization factor of the probability distribution P ,λ on X( ) that assigns to each I ∈ X( ) a probability proportional to λ |I | , that is, the so-called partition function (also known as the independence polynomial) of the well-known hardcore model from statistical physics.
In general, it is not possible to compute exactly Z (λ) efficiently [31], even for the case λ = 1 [56]; technically, to compute Z (λ) is an NP-hard problem and to compute |X( )| is a #P-complete problem. Therefore, one may attempt to at least find ways to approximate Z (λ) efficiently.
In recent years, there has been a great deal of attention given to the complexity of approximating partition functions of spin systems (e.g., see [4]). Among these systems, the hardcore model, possibly together with the Ising model [47], occupies the most important place. One of the most notable results, due to Weitz [55], and then Sly [48] and Sly and Sun [49], is the existence of a computational phase transition for having a fully polynomial-time approximation scheme (FPTAS) for the approximation of Z (λ). In simple terms, Weitz developed an FPTAS, a particular kind of efficient deterministic approximation algorithm, on the family of finite graphs with bounded degree provided λ < λ c ( ), where λ c ( ) := ( − 1) ( −1) /( − 2) denotes the critical activity for the hardcore model on the -regular tree T . Conversely, a couple of years later, Sly and Sun managed to prove that the existence of even a fully polynomial-time randomized approximation scheme (FPRAS)-which is a probabilistic and therefore weaker version of an FPTAS-for λ > λ c ( ) would imply that NP = RP, the equivalence of two well-known computational complexity classes which are widely believed to be different [2].
The work of Weitz exploited a technique based on trees of self-avoiding walks and a special notion of correlation decay known as strong spatial mixing that, in particular, 6 R. Briceño of invariant random orders, provide a way to develop randomized approximation algorithms for groups that are not necessarily orderable. The paper is organized as follows: in §2, we introduce the basic concepts regarding graphs, homomorphisms, independent sets, group actions, Cayley graphs, and partition functions; in §3, we rigorously define free energy based on the notion of amenability and show some robustness properties of its definition; in §4, we define Gibbs measures and relevant spatial mixing properties; in §5, we develop the formalism based on trees of self-avoiding walks and discuss some of their properties; in §6, we present the formalism of invariant (deterministic and random) orders of a group; in §7, we prove Theorems 7.1, 7.5, and 7.6, which provide a randomized sequential cavity method that allows us to obtain an arboreal representation of free energy; in §8, we prove Theorem 8.5 and establish the algorithmic implications of our results; in §9, we provide reductions that allow us to translate the problem of approximating pressure of a single-site potential and the topological entropy of a subshift into the problem of counting independent sets, and discuss other consequences that are implicit in our results.
2. Preliminaries 2.1. Graphs. A graph will be a pair = (V , E) such that V is a countable set-the vertices-and E ⊆ V × V is a symmetric relation-the edges. Let ↔ be the equivalence relation generated by E, that is, v ↔ v if and only if there exist n ∈ N 0 and {v i } 0≤i≤ such that v = v 0 , v = v n , and (v i , v i+1 ) ∈ E for every 0 ≤ i < n. Denote by n(v, v ) the smallest n with this property. This induces a notion of distance in given by Given a set U ⊆ V , we define its boundary ∂U as the set {v ∈ V : dist (v, U) = 1}, where dist (U , U ) = inf v∈U ,v ∈U dist (v, v ). In addition, given ≥ 0 and v ∈ V , we define the ball centered at v with radius as B (v, ) := {v ∈ V : dist (v, v ) ≤ }.
A graph is: • loopless, if E is anti-reflexive (that is, there is no vertex related to itself); • connected, if v ↔ v for every v, v ∈ V ; and • locally finite, if every vertex is related to only finitely many vertices.
Sometimes we will write V ( ) and E( )-instead of just V and E-to emphasize .

Homomorphisms. Consider graphs 1 and 2 . A graph homomorphism is a map
We denote by Hom( 1 , 2 ) the set of graph homomorphisms from 1 to 2 . A graph isomorphism is a bijective map g : If a map like this exists, we say that 1  A graph automorphism is a graph isomorphism from a graph to itself. We denote by Aut( ) the set of graph automorphisms of . This set is a group when considering composition • as the group operation and the identity map id : V → V as the identity group element 1 Aut( ) . In this case, instead of writing g 1 • g 2 , we will simply write g 1 g 2 to emphasize the group structure.
2.3. Independent sets. Given a subset U ⊆ V , the induced subgraph by U, denoted [U ], is the graph with a set of vertices U and set of edges E ∩ (U × U). A subset I ⊆ V is called an independent set if [I ] has no edges. We can also represent an independent set by its indicator function, that is, by the map x : V → {0, 1} so that In addition, if we consider the finite graph H 0 := ({0, 1}, {(0, 0), (0, 1), (1, 0)}), then x can be also understood as a graph homomorphism from to H 0 (see Figure 1).
We denote by X( ) the set of independent sets of . Notice that X( ) ⊆ {0, 1} V can be identified with the set Hom( , H 0 ) and that the empty independent set 0 V always belongs to X( ). Sometimes we will denote this independent set by 0 .

Group actions.
Let G be a subgroup of Aut( ). Given g ∈ G and v ∈ V , the map (g, v) → g · v := g(v) is a (left) group action, this is to say, 1 G · v = v and (gg ) · v = g · (g · v) for all g ∈ G, where 1 G = 1 Aut( ) . In this case, we say that G acts on and denote this fact by G . The group G also acts on {0, 1} V by precomposition. Given g ∈ G and x ∈ {0, 1} V , consider the map (g, x) → g · x := x • g −1 . A subset X ⊆ {0, 1} V is called G-invariant if g · X = X for all g ∈ G, where g · X := {g · x : x ∈ X}. Clearly, if x ∈ X( ), then g · x and g −1 · x also belong to X( ), since g ∈ Aut( ) and x ∈ Hom( , H 0 ). Therefore, X( ) is G-invariant and the action G X( ) is well defined. We will usually use the letter v to denote vertices in V, the letter g to denote graph automorphisms in G, and the letter x to denote independent sets in X( ). To distinguish the action of G on V from the action of G on X( ), we will write gv instead of g · v, without risk of ambiguity.
The action G is always faithful, that is, for all g ∈ G \ {1 G }, there exists v ∈ V such that gv = v. The G-orbit of a vertex v ∈ V is the set Gv := {gv : g ∈ G}. The set of all G-orbits of , denoted by /G, is a partition of V and it is called the quotient of the action.
We say that a subset ∅ = U ⊆ V is dynamically generating if GU = V , where GF := {gv : g ∈ F , v ∈ U } for any F ⊆ G, and a fundamental domain if it is also minimal, that The G-stabilizer of a vertex v ∈ V is the subgroup Stab G (v) := {g ∈ G : gv = v}. Notice that, since Stab G (gv) = gStab G (v)g −1 for every g ∈ G, we have that |Stab G (v)| = |Stab G (v )| for all v ∈ Gv. If |Stab G (v)| < ∞ for all v, we say that the action is almost free, and if |Stab for all v, we say that the action is free.
A relevant observation is that if we assume that is countable and G is almost transitive and almost free, then G must be a countable group. In this work, we will only consider almost free and almost transitive actions. In this case, there exists a finite fundamental domain U 0 ⊆ V such that |U 0 | = | /G| and, if is locally finite, then must have bounded degree, that is, there is a uniform bound on the number of vertices to which each vertex is related. In this case, we denote by ( ) the maximum degree among all vertices of the graph .
2.5. Transitive case: Cayley graphs. Consider a subset S ⊆ G that we assume to be symmetric, that is, Cayley graphs are a natural construction used to represent groups in a geometric fashion. In this context, it is common to ask that 1 G / ∈ S, S to be finite, and S to be generating, that is, G = S , where S := {s 1 · · · s k : s i ∈ S for all 1 ≤ i ≤ k and k ∈ N}.
Groups that have a set S satisfying these conditions are called finitely generated. Notice that if 1 G / ∈ S, then Cay(G, S) is loopless; if S is finite, then Cay(G, S) has bounded degree; and if S is generating, then Cay(G, S) is connected. Now, suppose that G is transitive (and free). Then, there exists a symmetric set S ⊆ G such that Indeed, it suffices to take S = {g ∈ G : (v, gv) ∈ E}, where v ∈ V is arbitrary (see [42]).
We will be interested in Cayley graphs = Cay(G, S) and their subgroup of automorphisms induced by group multiplication as a special and relevant case: given g ∈ G, we can define f g : → as f g (g ) = g g and it is easy to check that f g ∈ Aut( ). Then G acts (as a group, from the left) on so that g · g = f g −1 (g ) = g g −1 for all g ∈ G and G → Aut( ) by identifying g with f g −1 . In addition, via this identification, G acts transitively on as a subgroup of graph automorphisms. In particular, every Cayley graph is transitive. Counting independent sets in amenable groups 9 2.6. Partition functions. Given a graph = (V , E), let us consider λ : V → R >0 , an activity function. We call the pair ( , λ) a hardcore model. We will say that a hardcore model ( , λ) is finite if is finite. If U ⊆ V is a finite subset, a fact that we denote by U V , and x ∈ X( ) is an independent set, we define the λ-weight of x on U as (v) and the ( , U , λ)-partition function as ∈ U } is the finite set corresponding to the subset of independent sets of supported on U. It is easy to check that there is an identification between X( , U) and X( [U ]). Then, the quantity Z (U , λ) corresponds to the summation of independent sets of [U ] weighted by λ. In the special case λ ≡ 1, we have that Z (U , 1) = |X( , U)| = |X( [U ])|, that is, the partition function is exactly the number of independent sets supported on U. If ( , λ) is finite, we will simply write Z (λ) instead of Z (V , λ).
to this fact, we usually ask λ to be strictly positive and that is loopless.

Free energy
Now, suppose that we have an increasing sequence {U n } n of finite subsets of vertices exhausting , that is, U n ⊆ U n+1 and n U n = V . Tentatively, we would like to define the exponential growth rate of Z (V n , λ) as To guarantee the existence of this limit, we will provide a self-contained argument based on the particular properties of the hardcore model and amenability. The reader that is familiar with this kind of argument may skim over the next part and go then to §4.

Amenability. Let
be the set of finite non-empty subsets of G. Given g ∈ G and K, We  [26,Theorem 4.10]).
Every virtually amenable group is amenable. Moreover, the class of amenable groups contains all finite and all abelian groups, and it is closed under the operations of taking subgroups and forming quotients, extensions, and directed unions (see [12]).

Growth rate of independent sets. Given
From now on, we will assume that λ : V → R >0 is G-invariant, this is to say, In other words, λ is constant along the G-orbits, so it achieves at most | /G| different values. We denote by λ + and λ − the maximum and minimum among these values, respectively. Now, let W be an abstract set, M a finite subset of W, and k ∈ N. We will say that a finite collection K of non-empty finite subsets of W, with possible repetitions, is a k-cover The following lemma is due to Downarowicz, Frej, and Romagnoli. LEMMA 3.1. [14] Let Y be a subset of A n , where A is a finite set and n ∈ N. Let K be a k-cover of the set of coordinates M = {1, . . . , n}. For K ∈ K, let Y K = {y K : y ∈ Y }, where y K is the restriction of y to K. Then, Given ϕ : F(G) → R, we will say that ϕ satisfies Shearer's inequality if for all F ∈ F(G) and for all k-cover K of F with K ⊆ F for all K ∈ K. We have the following theorem.
Notice that Therefore, by Lemma 3.1, and noticing that where we use that {KU 0 : K ∈ K } is a k-cover of F U 0 . Therefore, by G-invariance of λ, so ϕ satisfies Shearer's inequality. However, by G-invariance of X( ) and λ, it follows that ϕ(F g) = ϕ(F ) for all F ∈ F(G) and g ∈ G. Therefore, by Theorem 3.2, we conclude.
for any Følner sequence {F n } n .
Proof. First, suppose that λ only takes rational values, that is, λ : and, after canceling out v∈U 0 q v , we obtain that Now, given a general λ, we can always approximate it by some G-invariantλ : V → Q >0 arbitrarily close in the supremum norm.
and since was arbitrary, we conclude.
To fully characterize lim n (log Z (U n , λ)/|U n |), we have the following lemma. Therefore, which, by Proposition 3.4 and Lemma 3.5, is equal to for any Følner sequence {F n } n and, in particular, for any Følner exhaustion. Notice that, since GU 0 = V , the sequence {U n } n defined as U n = F n U 0 is an exhaustion of V in the sense for which we were looking. Now we will see that f G ( , U 0 , λ) is independent of U 0 . PROPOSITION 3.6. Given two fundamental domains U 0 and U 0 of G , we have that Proof. Since V = GU 0 = GU 0 , there must exist K, K ∈ F(G) such that U 0 ⊆ KU 0 and U 0 ⊆ K U 0 . Then, for every F ∈ F(G), V , we always have that: Finally, since |U 0 | = |U 0 | and |F U 0 | = |F ||U 0 |, it follows by amenability that and by symmetry of the argument, we conclude.
Then, we can consistently define the Gibbs ( , λ)-free energy according to G as where U 0 is an arbitrary fundamental domain of G . In addition, it is easy to see that if G 1 and G 2 act almost transitively on , and the G 1 -orbits and G 2 -orbits coincide, that is, In particular, we have that f G ( , λ) is equal for all G acting transitively on . Then, we can define the Gibbs ( , λ)-free energy as which is a quantity that only depends on the graph and the activity function λ, and satisfies that f ( , λ) = f G ( , λ) for any G ≤ Aut( ) acting transitively on .
The value of f Z ( 2 , 1) corresponds to the topological entropy of the golden mean shift (see [27,Example 4.1.4] and §9).
The main theme of this paper will be to explore our ability to approximate f G ( , λ). From now, and without much loss of generality, we will assume that G is free (see §9.7 for a reduction of the almost free case to the free case).

Gibbs measures
Given a graph = (V , E), consider the set {0, 1} V endowed with the product topology and the set X( ), with the subspace topology. The set of independent sets X( ) is a compact and metrizable space. A base for the topology is given by the cylinder sets for U V and x ∈ X( ), where x U denotes the restriction of x from V to U. If U is a singleton {v}, we will omit the brackets and simply write x v and the same convention will hold in analogous instances. Given W ⊆ V , we denote by B W the smallest σ -algebra generated by and by B the Borel σ -algebra, which corresponds to B V .
Let M(X( )) be the set of Borel probability measures P on X( ). We say that P is G-invariant if P(A) = P(g · A) for all A ∈ B and g ∈ G, and G-ergodic if g · A = A for all g ∈ G implies that P(A) ∈ {0, 1}. We will denote by M G (X( )) and M erg G (X( )) the set of G-invariant and the subset of G-invariant measures that are G-ergodic, respectively.
For P ∈ M(X( )), define the support of P as Given ∅ = U V and y ∈ X( ), we define π y U to be the probability distribution on X( , U) given by In other words, to each independent set x supported on U, we associate a probability proportional to its λ-weight over U, v∈U λ(v) x(v) , provided x U is compatible with y U c , in the sense that the element z ∈ {0, 1} V such that z U = x U and z U c = y U c is an independent set. Now, given an activity function λ : V → R >0 , consider the hardcore model ( , λ) and the collection π ,λ = {π y U : U V , y ∈ X( )}. We call π ,λ the Gibbs ( , λ)-specification. A measure P ∈ M(X( )) is called a Gibbs measure (for( , λ)) if for all U V , U ⊆ U , and x ∈ X( ), and P(A|B U ) = E P (1 A |B U ) for A ∈ B . We denote by M Gibbs ( , λ) the set of Gibbs measures for ( , λ).
An important question in statistical physics is whether the set of Gibbs measures is empty or not, and if not, whether there is a unique or multiple Gibbs measures [17].

4.1.
The locally finite case. The model described in [17,Example 4.16] can be understood as an attempt to formalize the idea of a system where there is a single particle 1 (uniformly distributed) or none, that is, 0 everywhere. There, it is proven that this model cannot be represented as a Gibbs measure. This example can be also viewed as a hardcore model in a countable graph that is complete (that is, there is an edge between any pair of different vertices) and, in particular, in a non-locally finite graph. In other words, there exist examples of non-locally finite graphs such that the ( , λ)-specification π ,λ has no Gibbs measure.
From now on, we will always assume that is locally finite. In this case, the existence of Gibbs measures is guaranteed (see [10,13]) and, moreover, every Gibbs measure must be a Markov random field that is fully supported.
Indeed, it can be checked that π ,λ is an example of a Markovian specification (see [17,Example 8.24]). In this case, any Gibbs measure P ∈ M Gibbs ( , λ) satisfies the following local Markov property: for any U V and x ∈ X( ). In other words, P is a Markov random field, so any event supported on a finite set conditioned to a specific value on its boundary is independent of events supported on the complement.
In addition, it can be checked that any Gibbs measure P must be fully supported, that is, supp(P) = X( ). Indeed, it suffices to check that X( ) ⊆ supp(P); the other direction follows directly from the definition of π ,λ and Gibbs measures. Now, given x ∈ X( ) and U V , we would like to check that P([x U ]) > 0. To prove this, observe that given x ∈ X( ), we have that z ∈ {0, 1} V defined as z U = x U , z ∂U ≡ 0, and z W c = y W c always belongs to X( ) for any y ∈ X( ), where W = U ∪ ∂U . In particular, π y W (z) > 0 for any y ∈ X( ). Then, considering that ∂(W c ) is finite, since P is a probability measure and there must exist y * ∈ X( ) such that P([y * ∂W ]) > 0. In other words, X( ) satisfies the property (D*) introduced in [41, 1.14 Remark], which guarantees full support.

4.2.
Spatial mixing and uniqueness. Given a Gibbs ( , λ)-specification π ,λ , we define two spatial mixing properties fundamental to this work. Definition 4.1. We say that a hardcore model ( , λ) exhibits strong spatial mixing (SSM) if there exists a decay rate function δ : N → R ≥0 such that lim →∞ δ( ) = 0 and for all U V , v ∈ U , and y, z ∈ X( ), where [0 v ] denotes the event that the vertex v takes the value 0 and This definition is equivalent (see [35,Lemma 2.3]) to the-a priori-stronger following property: for all U ⊆ U V and x, y, z ∈ X( ), Similarly, we say that ( , λ) exhibits weak spatial mixing (WSM) if for all U ⊆ U V and x, y, z ∈ X( ), Clearly, SSM implies WSM. Moreover, it is well known that, in this context, WSM (and therefore, SSM) implies uniqueness of Gibbs measures [54]. In other words, M Gibbs ( , λ) = {P ,λ }, where P ,λ denotes the unique Gibbs measure for ( , λ). In this case, P ,λ is always Aut( )-invariant.
Given U ⊆ V , we denote by \ U the subgraph induced by V \ U , that is, [V \ U ]. We have the following result due to Gamarnik and Katz.
where P ,λ and P \U ,λ are the unique Gibbs measures for ( , λ) and ( \ U , λ), respectively, and [0 U ] denotes the event that all the vertices in U take the value 0. In particular, since, deterministically, every neighbor of a vertex colored 1 must be 0, so Proposition 4.1 still holds for more general events. We also remark that in [16], it is assumed that λ is a constant function. Here we drop this assumption, but it is direct to check that the same proof of [16, Proposition 1] also applies to the more general non-constant case.

4.3.
Families of hardcore models. We will denote by H the family of hardcore models ( , λ) such that is a countable locally finite graph and λ is any activity function λ :

R. Briceño
Given a countable group G, we will denote by H G the set of hardcore models ( , λ) in H for which G is isomorphic to some subgroup of Aut( ) such that G is free and almost transitive and λ : Given a positive integer , we will denote by H the set of hardcore models ( , λ) in H such that ( ) ≤ . Notice that any hardcore model defined on the -regular (infinite) tree T belongs to H .
We will also combine the notation for these families in the natural way; for example, H G (λ 0 ) will denote the set of hardcore models ( , λ) in H such that G is free and almost transitive, λ is G-invariant, ( ) ≤ , and λ + ≤ λ 0 .

Trees
Given a graph , a trail w in is a finite sequence w = (v 1 , . . . , v n ) of vertices such that consecutive vertices are adjacent in and the edges (v i , v i+1 ) involved are not repeated. For a fixed vertex v ∈ V ( ), the tree of self-avoiding walks starting from v, denoted by T SAW ( , v), is defined as follows.
(1) Consider the set W 0 of trails starting from v that repeat no vertex and the set W 1 of trails that repeat a single vertex exactly once and then stop (that is, the set of non-backtracking walks that end immediately after performing a cycle).
corresponds to all the pairs (w, w ) such that w is a one-vertex extension of w or vice versa. In simple words, T SAW ( , v) is a rooted tree that represents all self-avoiding walks in that start from v. It is easy to check that the set of leaves of T SAW ( , v) contains W 1 , but they are not necessarily equal (e.g., see vertex b in Figure 2). (2) For u ∈ V ( ), consider an arbitrary ordering ∂{u} = {u 1 , . . . , u d } of its neighbors.
Given w ∈ W 1 , we can represent this walk as a sequence with u i , u j ∈ ∂{u}. Notice that i = j , since we are not repeating edges. Considering this, we condition the 'terminal' trail w to be 1 (occupied) if i < j and to be 0 (unoccupied) if i > j, inducing the corresponding effect of this conditioning in the graph (that is, removing the vertex and its neighbors or just removing the vertex, respectively). Given a hardcore model ( , λ), a vertex v ∈ V ( ), a subset U ⊆ V ( ), and an independent set x ∈ X( ), we are interested in computing the marginal probability that v is unoccupied in given the partial configuration x U , that is, . Notice that if ( , λ) satisfies SSM (which includes the particular but relevant case of being finite), then this probability is always well defined due to Proposition 4.1, even if U is infinite.
To understand better to be the hardcore model where λ(w) = λ(u) for every trail w ending in u. In this context, a condition x U in ( , λ) is translated into the condition x U in T SAW ( , v), whose support is the set W (U) Counting independent sets in amenable groups 19 FIGURE 2. A representation of a graph and its corresponding tree of self-avoiding walks T SAW ( , v) including the conditioning of terminal trails (⊥). Here, the order of each neighborhood is alphabetical and every trail/vertex is represented by the final vertex of the trail in starting from v = a. See also [55] for an explanation of the same picture.
of trails w that end in u for some u ∈ U , and x(w) = x(u) for all these w. We have the following result from [55], that we adapt to the more general non-constant λ case and we include its proof for completeness.
Proof. Instead of probabilities, we work with the ratios .
Given a finite tree T rooted at ρ, let us denote by {ρ 1 , . . . , ρ d } the set of neighbors ∂{ρ} of ρ and by T i , for i = 1, . . . , d, the corresponding subtrees starting from ρ i , that is, where Notice that this gives us a linear recursive procedure for computing R T ,λ (ρ, x U ), and Now, consider an arbitrary hardcore model ( , λ) and v ∈ V ( ) with neighbors ∂{v} = {u 1 , . . . , u d }. We consider the auxiliary hardcore model ( , λ ), where: Therefore, Counting independent sets in amenable groups 21 FIGURE 3. A condition ( ) on and its representation on the tree of self-avoiding walks The only relevant portion of the tree for computing the marginal probability associated to the root is its connected component.
Notice that the previous recursion can increase the original number of vertices, but the number of free vertices always decreases, so the recursion ends. Then, we have that: ). Now we proceed by induction in the number of free vertices. We can consider the base case where there are no free vertices (besides v) and the theorem is trivial. Then, if we know that the theorem is true when we have n free vertices, we prove it for n + 1. Notice that if R ,λ (v, x U ) involves n + 1 free vertices, then R \{v},λ (v i , x U z i ) involves n free vertices, so by the induction hypothesis, Then, noticing that the rooted subtree (T i , ρ i ) and the condition x U z i give exactly the tree of self-avoiding walks of \{v i } starting from u i under the condition x U z i , we are done.
Remark 5.2. The recursions presented in the proof of Theorem 5.1 give us a recursive procedure to compute the marginal probability of the root ρ of a tree T being occupied which requires linear time with respect to the size of the tree. However, if is such that is a subtree of T and its size of T SAW ( , v) can be (at most) exponential in the size of . Since hardcore models are Markov random fields and we are interested in the sensitivity of the root ρ associated to v, we only need to consider the graph obtained after pruning all the subtrees below W (U) (see Figure 3).
Before stating the main results concerning hardcore models and strong spatial mixing, we will establish the following bounds. LEMMA 5.3. Given a finite hardcore model ( , V ) ∈ H and v ∈ V , we have that Proof. Notice that, since a 1 at v forces 0s in ∂{v}, so, considering that P ,λ is a Markov random field and λ/(1 + λ) is increasing in λ > 0, we obtain that However, by Theorem 5.1, without loss of generality, we can suppose that is a tree rooted at v. Then, if i denotes the ith subtree of rooted at v i ∈ ∂{v}, .
We define the critical activity function λ c : We have the following result.
If the inequality is strict, then (T , λ 0 ) exhibits exponential WSM with a decay rate δ involving constants that depend on and λ 0 .
We summarize, in the following theorem, the main results from [55] that relate the correlation decay in (T , λ 0 ) with the correlation decay in H (λ 0 ). Here again, as in Theorem 5.1, the results in [55] are focused on the constant activity case. However, we can also adapt the results to the non-constant case by considering that the main tool used in [55] to prove them is [55,Theorem 4.1], which is based on hardcore models with non-constant activity functions.
Then, combining Proposition 5.4 and Theorem 5.5, we have that if λ 0 ≤ λ c ( ), then every hardcore model ( , λ) ∈ H (λ 0 ) exhibits SSM with the same decay rate δ that would be exponential if the inequality is strict. In addition, observe that if ( , λ) is a hardcore model such that (T SAW ( , v), λ) exhibits SSM with decay rate δ for every v ∈ V ( ), then ( , λ) exhibits SSM with decay rate δ as well. This follows from Theorem 5.1, since SSM is a property that depends on finitely supported events and the probabilities involved can be translated into probabilities defined on finite hardcore models which at the same time can be translated into events on finite subtrees of T SAW ( , v). Considering this, we have the following theorem, which can be understood as a generalization of Theorem 5.1 to the infinite setting.
Proof. Assume that (T SAW ( , v), λ) exhibits SSM with decay rate δ. Then, for every ∈ N, and, similarly, Therefore, since lim →∞ δ( ) = 0, and, by the same argument, Considering this, the Markov random field property, and Proposition 4.1, we have that Notice that Theorem 5.6 requires that (T SAW ( , v), λ) exhibits SSM rather than the graph ( , λ), since SSM on T SAW ( , v) may be a stronger condition than SSM on . A key fact is that if (T , λ 0 ) exhibits SSM, then (T , λ 0 ) exhibits SSM for every subtree T of T . Then, since for every with ( ) ≤ we have that T SAW ( , v) is a subtree of T , it follows that (T SAW ( , v), λ), and therefore ( , λ 0 ), exhibit SSM. Considering this, we have the following corollary.
Since we are ultimately interested in studying the interplay between the SSM property on T SAW ( , v) and , we may wonder whether it is really necessary to have control over the full -regular tree T . In [46], a refinement of this fact was proved by considering the connective constant of the graphs involved.

Connective constant.
Given a graph , a vertex v, and an integer k, let N (v, k) denote the number of self-avoiding walks in of length k starting from v. Following [46], we consider the connective constant μ(G) of a family of finite graphs G. Here, μ(G) is defined as the infimum over all μ > 0 for which there exist a, c > 0 such that for any ∈ G and any v ∈ V ( ), it holds that k=1 N (v, k) ≤ cμ for all ≥ a log|V ( )|. This definition extends the more usual definition of connective constant for a single infinite almost transitive graph , which is given by Indeed, if is almost transitive, then μ( ) = μ(G( )), where G( ) denotes the family of finite subgraphs of . Notice that μ( ) exists due to Fekete's lemma and that, if is connected, then μ( ) = lim →∞ N (v, ) 1/ for arbitrary v. Roughly, the connective constant measures the growth rate of the number of self-avoiding walks according to their length or, equivalently, the branching of T SAW ( , v). In general, it is not an easy task to compute μ( ) (e.g., see [15]).
Considering this, we extend the definition of strong spatial mixing to families of graphs as follows: given a family of graphs G and a family of activity functions = {λ } ∈G with λ : V ( ) → R >0 , we say that (G, ) satisfies strong spatial mixing if there exists a decay rate function δ : N → R ≥0 such that lim →∞ δ( ) = 0 and for all ∈ G, for all U V ( ), v ∈ U , and y, z ∈ X( ), , D U (y, z))), Counting independent sets in amenable groups 25 where π y ,U denotes the specification element corresponding to the hardcore model ( , λ ). We translate into this language the following result from [46]. THEOREM 5.8. [46] Let G be a family of almost transitive locally finite graphs and = {λ } ∈G a set of activity functions such that Then, (G, ) exhibits exponential SSM.

Orders
We have already explored the main combinatorial and measure-theoretical tools that we require to establish the main results. In this section, we present some concepts of a more group-theoretical nature, namely, our ability to order a given group.
6.1. Orderable groups. Let ≺ be a strict total order on G. We say that ≺ is an invariant (right) order if, for all h 1 , h 2 , g ∈ G, We call the pair (G, ≺) a (linearly) ordered group. The associated algebraic past of an ordered group (G, ≺) is the set ≺ := {g ∈ G : g ≺ 1 G } and it is a semigroup which satisfies that Notice that h ≺ g ⇐⇒ hg −1 ∈ ≺ , so ≺ fully determines ≺ and vice versa. The class of orderable groups contains all torsion-free abelian groups and it is closed under the operations of taking subgroups, and forming extensions, arbitrary direct products, and directed unions. R. Briceño f H ( , λ) will be equal and the only effect of passing to a finite-index subgroup will be that the size of the fundamental domain of the action is multiplied by a constant factor (that is, the index of the subgroup [G : H ]). This last point is relevant, since the size of the fundamental domain will play a role later when measuring the computational complexity of some problems.
Given a finitely generated group G, a generating set S, and its corresponding Cayley graph = Cay(G, S), we define the volume growth function as g (n) = |B (1 G , n)|. We say that G has polynomial growth if g (n) ≤ p(n) for some polynomial p. It is well known that groups with polynomial growth are amenable and a classic result due to Gromov asserts that they are virtually nilpotent [19]. Without further detail, from Schreier's lemma, it is also well known that finite index subgroups of finitely generated groups are also finitely generated [32,Proposition 4.2] and finitely generated nilpotent groups have a torsion-free nilpotent subgroup with finite index [43,Proposition 2]. From this, and since torsion-free nilpotent groups are orderable [39, p. 37], it follows that any finitely generated group G with polynomial growth is amenable and virtually orderable. In particular, all our results that apply to amenable and virtually orderable groups will hold for groups of polynomial growth, but they will also hold in groups of super-polynomial-namely, exponential-growth. This includes solvable groups that are not virtually nilpotent [38] and, more concretely, cases like the Baumslag-Solitar groups BS(1, n) that can also be ordered. However, not every amenable group is virtually orderable; for example, the direct sum of countably many non-trivial finite groups always results in a countable group that is amenable but not virtually orderable. To address these cases, we introduce a randomized generalization of invariant orders.

Random orders.
Consider now the set of relations {0, 1} G×G endowed with the product topology and the closed subset Ord(G) of strict total orders ≺ on G. We will consider the action G Ord(G) given by for h 1 , h 2 , g ∈ G and ≺∈ Ord(G). An invariant random order on G is a G-invariant Borel probability measure on Ord(G). Notice that a fixed point for the action G Ord(G) corresponds to a (deterministic) invariant order on G. The space of invariant random orders will be denoted by M G (Ord(G)).
Invariant random orders were introduced in [1] to answer problems about predictability in topological dynamics through what they called the Kieffer-Pinsker formula for the Kolmogorov-Sinai entropy of a group action. Now, as in the deterministic case, we can also define a notion of past for the group. An invariant random past on G is a random function˜ : G → {0, 1} G or, equivalently, a Borel probability measure on ({0, 1} G ) G that satisfies, for almost every instance of˜ , the following properties: (1) for all g ∈ G, the condition g / ∈˜ (g) holds; (2) for all g, h ∈ G, if g ∈˜ (h), then˜ (g) ⊆˜ (h); (3) if g = h, then either g ∈˜ (h) or h ∈˜ (g); and (4) for all g ∈ G, the random subsets˜ (g) and˜ (1 G )g have the same distribution.
Notice that if ≺ is an invariant random order, then the random function g → {h ∈ G : h ≺ g} defines an invariant random past.
In contrast to deterministic invariant orders, every countable group G admits at least one invariant random total order. Namely, consider the random process (χ g ) g∈G of independent random variables such that each χ g has uniform distribution on [0, 1]. This process is invariant and each realization of it induces an order on G almost surely. We call such order the uniform random order.

Counting
From now on, given ( , λ) ∈ H G , we always assume that there is some (or any) fixed fundamental domain U 0 for G and we introduce the auxiliary function φ λ : X( ) → R given by

A pointwise Shannon-McMillan-Breiman-type theorem.
The next theorem establishes a pointwise Shannon-McMillan-Breiman-type theorem for Gibbs measures (related results can be found in [9,20]). To prove it, we use the pointwise ergodic theorem [28], which requires tyhe Følner sequence {F n } n to be tempered, a technical condition that is satisfied by every Følner sequence up to a subsequence and that we will assume without further detail. THEOREM 7.1. Let G be a countable amenable group. For every ( , λ) ∈ H G and every P ∈ M Gibbs ( , λ), for any tempered Følner sequence {F n } n and any Q ∈ M erg G (X( )).
Proof. Consider the sets U n = F n U 0 and M n = U n ∪ ∂U n . Notice that, by amenability, Since is locally finite and the action is free, K is finite. In addition, U n ∪ ∂U n ⊆ F n KU 0 . Therefore, by amenability, , and y ∈ X( ) such that xz i y ∈ X( ) for i = 1, 2. Then, Taking z 2 = 0 and adding over all possible z 1 , we obtain that However, we have that and Z 0 (M n , λ) = Z (M n , λ). In addition, Therefore, |M n \ U n | |U n | log(2 max{1, λ + }) = 0, and we conclude that where we have used that Z (U n , λ) ≤ Z (M n , λ) ≤ (2 max{1, λ + }) |M n \U n | Z (U n , λ). Finally, notice that and by the pointwise ergodic theorem, we obtain that and we conclude the proof.

R. Briceño
We have the following lemma.

7.2.
A randomized sequential cavity method. Suppose now that ( , λ) ∈ H G is such that the Gibbs ( , λ)-specification satisfies SSM and let P be the unique Gibbs measure. Considering this, we define the function I P : X( ) × ({0, 1} G ) G → R given by and {F n } n is any exhaustion of G (not necessarily Følner). Here, ∈ ({0, 1} G ) G should be understood as an instance of a random invariant past and I P,n as a rudimentary information function. In this sense, notice that I P,n (x, ) only depends on the values of x restricted to (1 G ) ∈ {0, 1} G , so carries redundant information. This redundancy will play a role in the next results when taking averages. LEMMA 7.3. If ( , λ) ∈ H G is such that the Gibbs ( , λ)-specification satisfies SSM and P is the unique Gibbs measure, then the function I P is measurable, non-negative, defined everywhere, and bounded. Moreover, Counting independent sets in amenable groups 31 is always a well-defined limit. By Lemma 7.2 and since ( , λ) ∈ H G for some , there exists a constant C > 0 such that for every v ∈ V , U V \ {v}, and x ∈ X( ), Now, combined with the SSM property, this implies that for every v ∈ V , U ⊆ V , and x ∈ X( ), we have that Therefore, by conditioning and iterating, we obtain that Following [1], given an invariant random past˜ : for f ∈ L 1 (ν). Now, since I P is measurable, non-negative, and bounded, we have that for every Q ∈ M G (X( )), the function I P is integrable with respect to Q ×ν and by Tonelli's theorem, the function E˜ I P : X( ) → R is integrable, defined Q-almost everywhere, and satisfies that We call E˜ I P the random P-information function (with respect to˜ ).

R. Briceño
However, by Lemma 7.2 and the discussion after it, for every g ∈ G and U ⊆ V , Therefore, by the mean value theorem, Notice that Now, given > 0, there exists and n 0 such that for every n ≥ n 0 , By G-invariance of P, Integrating againstν, we obtain that, for Q-almost every x, and since˜ (g) has the same distribution as˜ (1 G )g, we get that and since is arbitrary and the limit exists Q-almost surely, we conclude.
We have the following representation theorem for free energy, which can be regarded as a randomized generalization of the results in [9,16,36] tailored for the specific case of the hardcore model. Notice that, in contrast with [9,16,36], the representation holds in every amenable group and not just virtually orderable groups. THEOREM 7.5. Let ( , λ) ∈ H G such that the Gibbs ( , λ)-specification satisfies SSM and P is the unique Gibbs measure. Then, for any Q ∈ M G (X( )) and for any invariant random past˜ of G. In particular, Proof. First, notice that if the statement holds for every Q ∈ M erg G (X( )), then it holds for every Q ∈ M G (X( )) by the ergodic decomposition theorem. Then, without loss of generality, we can assume that Q is G-ergodic. Considering this, by Theorem 7.1, for Q-almost every x, By Lemma 7.4, for Q-almost every x,

R. Briceño
Therefore, for Q-almost every x, Integrating against Q, we obtain that where the first equality is due to the dominated convergence theorem, the second and last equalities are due to Tonelli's theorem, and the third equality is due to the G-invariance of Q. We conclude that In particular, if Q = δ 0 ∈ M G (X( )), the Dirac measure supported on 0 , then 3. An arboreal representation of free energy. The following theorem tell us that, under some special conditions, f G ( , λ) can be expressed using | /G| terms depending on the probability that the roots of some particular trees are unoccupied. Roughly, the trees involved are the trees of self-avoiding walks that are rooted at the vertices of a given fundamental domain and explore the graph without entering to the 'past graph' induced by an invariant random past.  where ρ i denotes the root of T SAW( i ( ),v i ) . In particular, if ≺ is a deterministic invariant order of G, Proof. By Theorem 7.5, we know that By iterating conditional probabilities, linearity of expectation, and Proposition 4.1 (see Figure 4), Finally, by Theorem 5.6, we obtain In particular, if ≺ is a deterministic invariant order on G (see Figure 5), we have that

A computational phase transition in the thermodynamic limit
Given an amenable countable group G, we are interested in having an algorithm to efficiently approximate f G ( , λ) in some uniform way over H G . Let M ⊆ H G be a family of hardcore models. We will say that M admits an additive fully polynomial-time randomized approximation scheme (additive FPRAS) for f G ( , λ) if there is a probabilistic algorithm such that given an input ( , λ) ∈ M and > 0, outputŝ f with in polynomial time in | , λ | and −1 , where | , λ | denotes the length of any reasonable representation , λ of ( , λ). Similarly, we will say that M admits an additive fully polynomial-time approximation scheme (additive FPTAS) for f G ( , λ) if there is a deterministic additive FPRAS with null failure probability.
An additive FPRAS and an additive FPTAS will be what we will regard as an efficient and uniform approximation algorithm for f G ( , λ), random and deterministic, respectively.
Remark 8.1. The constant 3 4 in the definition of additive FPRAS is the standard choice for minimum success probability but it can be replaced by any constant bounded away from 1 2 without any sensible change in the definition. To not have to deal with numerical details about the representation of λ, we will always implicitly assume that the values taken by λ have a bounded number of digits uniformly on M.

Weitz's algorithm and a computational phase transition.
Observe that if G is the trivial group {1}, then H {1} is exactly the family of finite hardcore models. In this case, we have that and we can translate an approximation of Z (λ) into an approximation of f G ( , λ) and vice versa.
In this finite context, it is common to consider a fully polynomial-time approximation scheme. Given a family M ⊆ H {1} of finite hardcore models, we will say that M admits an FPTAS for Z (λ) if there is an algorithm such that, given an input ( , λ) ∈ M and > 0, outputsẐ with Z (λ)e − ≤Ẑ ≤ Z (λ)e in polynomial time in |V ( )| and −1 . An FPTAS is regarded as an efficient and uniform approximation algorithm for Z (λ).
If we take logarithms and divide by |V ( )| in the previous equation, we obtain that wheref = logẐ/|V ( )|, so an FTPAS for Z (λ) is equivalent to an additive FPTAS for f G ( , λ), since a polynomial in |V ( )| and −1 is also a polynomial in | , λ | and |V ( )| −1 and vice versa. The same correspondence holds between the natural randomized counterparts (FPRAS and additive FPRAS, respectively). We will fix a positive integer and λ 0 > 0. Given these parameters, we aim to develop a fully polynomial-time additive approximation on M = H G (λ 0 ).
The main theorem in [55] was the development of an FPTAS for Z (λ 0 ) on H {1} (λ 0 ) for λ 0 < λ c ( ). It is not difficult to see that the theorem extends to non-constant activity functions λ. Then, and also translated into the language of free energy, we have the following result. This theorem was subsequently refined in [46] by considering connective constants instead of maximum degree . A very interesting fact is that when classifying graphs according to their maximum degree, then Theorem 8.2 is in some sense optimal due to the following theorem.  The combination of Theorems 8.2 and 8.3 is what is regarded as a computational phase transition. We aim to extend these theorems to the infinite setting. A theoretical advantage about considering f G ( , λ) instead of Z (λ) is that the free energy still makes sense in infinite graphs and, at the same time, recovers the theory for Z (λ) in the finite case.

An extension of Weitz's algorithm to the infinite setting.
For algorithmic purposes, in this section, we only consider finitely generated groups G with a fixed symmetric set of generators S. In this case, if ( , λ) ∈ H G , then it suffices to know [U 0 ] for some fundamental domain U 0 and L = {(v 1 , s, v 2 ) ∈ U 0 × S × U 0 : (v 1 , sv 2 ) ∈ E( )} to fully reconstruct the graph . In particular, the size of the necessary information to reconstruct is bounded by a polynomial in and | /G|. In addition, given a G-invariant activity function λ : V ( ) → Q >0 (that is, that only takes positive rational values), we only need to know λ| U 0 to recover λ, that is, just | /G| many rational numbers. Therefore, in this context, the length | , λ | of the representation , λ of a hardcore model ( , λ) will be polynomial in and | /G|.
First, we are interested in being able to generate in an effective way balls of arbitrary radius in Cay(G, S). Given an input word w ∈ S * , we will assume that we can decide whether e(w) = 1 G or not in time exp(O(|w|)), where |w| denotes the length of w, e : S * → G is the usual evaluation map, and the O-notation regards |S| and as constants.
In other words, we will assume that the word problem of G can be solved in exponential time. By problems that can be solved in exponential time, we mean the set of decision problems that can be solved by a deterministic Turing machine in time exp(O(n)). This complexity class is sometimes known as E; it contains P and it is strictly contained in EXP. Now, if the word problem can be solved in exponential time, then Cay(G, S) is constructible in time exp(O( )) as well (see [37,Theorem 5.10]); this is to say, given In the ordered case, we will also consider the situation where the algebraic past of (G, ≺) can be decided in exponential time, that is, given an input word w ∈ S * , we will consider that we can decide whether e(w) ∈ ≺ or not in time exp(O(|w|)). Notice that this implies that the word problem can be solved in time exp(O(|w|)), since e(w) = 1 G if and only if e(w) / ∈ ≺ and e(w −1 ) / ∈ ≺ . In particular, and since |B Cay(G,S) (1 G , )| ≤ |S| , by identifying and removing all the copies [gU 0 ] with g ∈ ≺ in [B Cay(G,S) (1 G , )U 0 ], we can construct [(B Cay(G,S) (1 G , ) \ ≺ )U 0 ] in time O(poly(| /G|) exp(O( ))). Recall that we are not losing generality if we assume G to be ordered instead of just virtually ordered.
Considering all this, we have the following key theorem. THEOREM 8.5. Let G be a finitely generated amenable group such that its word problem can be solved in exponential time. Then, for every ∈ N and 0 < λ 0 < λ c ( ), there exists an additive FPRAS on H G (λ 0 ) for f G ( , λ). If, in addition, G is orderable and has an algebraic past that can be decided in exponential time, then the algorithm can be chosen to be deterministic, that is, an additive FPTAS.
Proof. Pick ( , λ) as in the statement and enumerate as U 0 = {v 1 , . . . , v n } the fundamental domain of G . Denote n = | /G|. Then, by Theorem 7.5, Counting independent sets in amenable groups . Given > 0, our goal is to generate numbersf i such thatf for every i = 1, . . . , n. If we manage to obtain these approximations, we have that sof := n i=1f i will be the required approximation. By SSM in , we have that, for every > 0, and, again by SSM but now on the tree of self-avoiding walks, where C is a constant that depends on and λ 0 . Notice that To conclude, it suffices to definef i as E˜ log P T SAW ( i (˜ ),v i )∩B(ρ i , ),λ ([0 ρ i ]) with so that 2C exp(−α ) ≤ n and show that each approximationf i can be efficiently computed. Notice that we can pick to be * = 1/α log(2Cn −1 ) .
Let us first assume that˜ is a (deterministic) algebraic past ≺ of G that can be decided in exponential time. The general probabilistic case will be a slight variation of this case. To computef i , first generate the ball [B Cay(G,S) (1 G , * )U 0 ], which takes time poly(n) exp(O( * )) = poly((1 + −1 )n). Notice that B (v i , ) ⊆ B Cay(G,S) (1 G , * )U 0 . Next, remove the vertices that are at a distance greater than * to v i and those which belong to ≺ U 0 ∪ {v 1 , . . . , v i−1 }. This procedure also takes time poly(n) exp(O( * )), since ≺ can be decided in exponential time. Having this, construct the tree of self-avoiding walks which is a subtree of the tree of self-avoiding walks of i ( ≺ )). Using the recursive procedure, compute P T i ,λ ([0 ρ i ]) and then compute its logarithm. For every i = 1, . . . , n, which is also a bound for the order of time required for computingf i , because T i is a tree (see Figure 5). Finally, since we require to do this procedure n times for each i = 1, . . . , n, we have that the total order of the algorithm is still poly((1 + −1 )n), that is, a polynomial in n and −1 , where the constants involved depend only on , λ 0 , and |S|. This gives the desired additive FPTAS in the ordered case.

R. Briceño
Now, in the general not necessarily ordered case, we consider the following variation of the previous algorithm. Let˜ unif be the uniform random order in G. Then, . Due to Lemma 5.3, we have that In particular, Now, let {X 1 , . . . , X N } be a random sample of size N of the variable X and define the sample and Var(X N ) = 1/NVar(X) ≤ V (λ, )/N. Therefore, by Chebyshev's inequality, for any δ > 0, We are interested in having |X N − E[X]| ≤ /n with probability greater than 3 4 . To guarantee this, we need to take a number of samples N so that and δ such that 1 − δ ≥ 3 4 , that is, it suffices to take N ≥ 4V (λ, )(n −1 ) 2 . Notice that we need to take a number of samples polynomial in n and −1 , and that each sample can be computed in polynomial time, exactly as in the ordered case. This gives the desired additive FPRAS in the general case.
Remark 8.6. Notice that Theorem 8.5 holds for groups of exponential growth, despite it involving a polynomial time algorithm. In addition, in virtue of Theorem 5.8, the families of graphs in Theorem 8.5 could be parameterized according to their connective constant instead of the maximum degree.
Next, we reduce the problem of approximating the partition function of a finite hardcore model to the problem of approximating the free energy of a hardcore model in H G . Z (λ 0 ), contradicting Theorem 8.3. Indeed, given the input ( , λ) ∈ H {1} (λ 0 ), it suffices to consider the graph G made out of copies { g } g∈G of indexed by g ∈ G, where v g denotes the copy in g of the vertex v in . Then, there is a natural action G G consisting of just translating copies of vertices, that is, gv h = v hg , and a fundamental domain of the action is U 0 = V ( 1 G ). Therefore, since | G /G| = |V ( )|, if we could -approximate in an additive way f G ( , λ 0 ) in polynomial time in | G /G| and −1 , then we would be able to -approximate in a multiplicative way Z (λ 0 ) in polynomial time in |V ( )| and −1 , because but this contradicts Theorem 8.3.
Considering Theorem 8.5 and Proposition 8.7, we have the following corollary. To ask that the word problem can be solved in exponential time seems to be a natural requirement for having an efficient algorithm for approximating f G ( , λ) and, fortunately, there are several classes of finitely generated groups which satisfy this condition. Example 8.10. Lipton and Zalcstein [29] proved that every linear group over a field of characteristic zero has a word problem that can be solved in logarithmic space. This result was extended by Simon [45] to linear groups over a field of prime characteristic. In particular, the word problem of all finitely generated amenable linear groups-which by the Tits alternative [52] must be virtually solvable-can be solved in logarithmic space, and therefore polynomial time.
Due to a result from Mal'tsev [33], all solvable subgroups of the integer general linear group GL d (Z) are polycyclic (that is, solvable groups in which every subgroup is finitely generated) and virtually polycyclic groups coincide with the class of polycyclic-by-finite groups, which are always finitely presented, residually finite, and have many other desirable algorithmic properties (see [5]). However, Auslander [3] and Swan [51] proved that any polycyclic group is a subgroup of the integer general linear group. This shows that the class of polycyclic groups is a general and natural setup for the application of our results, since they are amenable, finitely generated, and their word problem can be solved in polynomial time. Examples of polycyclic groups include all finitely generated abelian groups and all finitely generated nilpotent groups.
To understand how to guarantee the existence of an algebraic past that can be decided in exponential time, we start by observing two basic facts: (1) the group of integers Z is orderable with the natural order and its algebraic past can be decided in linear time and (2) the following lemma. LEMMA 8.11. Let (H 1 , ≺ 1 ) and (H 2 , ≺ 2 ) be two ordered groups and let G be a finitely generated group which is an extension of H 2 by H 1 , that is, there is a short exact sequence Then, G can be ordered by considering the algebraic past := ι( 1 ) ∪ π −1 ( 2 ), where i denotes the algebraic past of H i for i = 1, 2. In particular, if ι( 1 ) and π −1 ( 2 ) can be decided in exponential time, then can be decided in exponential time as well.
The previous lemma can be used as a tool for constructing algebraic pasts that can be decided in exponential time in new groups out of simpler ones. We have the following example.
Example 8.12. By the fundamental theorem of finitely generated abelian groups, every finitely generated abelian group G is isomorphic to a group of the form Z d ⊕ Z q 1 ⊕ · · · ⊕ Z q t , where d ≥ 0 is the rank and q 1 , . . . , q t are powers of prime numbers. In particular, [G : Z d ] is finite, so Z d is a finite index subgroup of G. However, Z d is an orderable group. A canonical presentation of Z d is given by where < is the usual order in Z. It is easy to see that it can be decided in polynomial time whether a i 1 1 · · · a i d d ≺ a 0 1 · · · a 0 d or not. An alternative way to see this is through Lemma 8.11, by observing that Z d is an extension of Z d−1 by Z and proceed inductively until reaching the base case Z 1 = Z.
Another illustrative example is the discrete Heisenberg group: The group H 3 (Z) is a non-abelian nilpotent (and therefore amenable with polynomial growth) finitely generated group. A presentation of H 3 (Z) is given by where we identify a, b, and c with ⎛ It is not difficult to check that given a word w ∈ {a ±1 , b ±1 , c ±1 } * in its normal form and a generator s ∈ {a ±1 , b ±1 , c ±1 }, it takes linear time to write sw in its normal form.
Observe that it is enough to measure how much time it takes this particular operation and then proceed inductively. Now, it is known that H 3 (Z) is an extension of Z 2 by Z, that is, with ι : Z −→ H 3 (Z) and π : H 3 (Z) −→ Z 2 given by ι(k) = c k and π(b j c z a i ) = (i, j), respectively. Considering Lemma 8.11 and that Z and Z 2 have algebraic pasts Z and Z 2 , respectively, such that ι( Z ) and π −1 ( Z 2 ) can be decided in exponential time, we conclude that H 3 (Z) also has an algebraic past that can be decided in exponential time. More concretely, this algebraic past H 3 (Z) is defined by declaring that b j c k a i ∈ H 3 (Z) if and only if (1) i < 0 or (2) i = 0 and j < 0 or (3) i = j = 0 and k < 0, which takes linear time to decide. Finally, one other example is the case of the Baumslag-Solitar group BS (1,2). A presentation of BS(1, 2) is given by a, b | bab −1 a −2 , where we identify a and b with the linear functions x → 2x and x → x + 1 in Homeo(R), respectively. The group BS(1, 2) is a non-nilpotent solvable (and therefore amenable with exponential growth) finitely generated group. A normal form for BS (1,2) is given by {a −j b 2k+1 a j +i : i, j , k ∈ Z} ∪ {a i : i ∈ Z} and it can also be checked that given a word w ∈ {a ±1 , b ±1 } * in its normal form and a generator s ∈ {a ±1 , b ±1 }, it takes polynomial time to write sw in its normal form. It is known that BS (1,2) is an extension of Z by Z[ 1 2 ], the group of dyadic rationals, that is, (1,2) and π : BS(1, 2) −→ Z given by ι((2k + 1)/2 j ) = a −j b 2k+1 a j , and π(a −j b 2k+1 a j +i ) = i and π(a i ) = i, respectively. Then, due to Lemma 8.11 and the fact that Z[ 1 2 ] and Z have algebraic pasts Z[1/2] and Z , respectively, such that ι( Z [1/2] ) and π −1 ( Z ) can be decided in exponential time, we conclude that BS (1,2) also has an algebraic past BS (1,2) that can be decided in exponential time. More concretely, this algebraic past is defined by declaring that a −j b 2k+1 a j +i ∈ BS (1,2) if and only if (1) i < 0 or (2) i = 0 and k < 0, which takes linear time to decide. This construction can be easily generalized to the group BS (1, n) given by the presentation a, b | bab −1 a −n .

Reductions
In this section, we provide a set of reductions which exploit the combinatorial properties of independent sets and relate the results already obtained for hardcore models with other systems.
9.1. G-subshifts and conjugacies. Given a countable group G and a finite set endowed with the discrete topology, the full shift is the set G of maps ω : G → endowed with the product topology. We define the G-shift as the group action G × G → G given by Given two G-subshifts 1 and 2 , we say that a map ϕ : 1 → 2 is a conjugacy if it is bijective, continuous, and G-equivariant, that is, g · ϕ(x) = ϕ(g · x) for every ω ∈ 1 and g ∈ G. In this context, these maps are characterized as sliding block codes (e.g., see [12,27]) and provide a notion of isomorphism between G-subshifts.
Any G-subshift is characterized by the existence of a family of forbidden patterns If the family F can be chosen to be finite, we say that is a G-subshift of finite type (G-SFT). Given a finite set S ⊆ G, we can consider a family of | | × | | binary matrices M = {M s } s∈S with rows and columns indexed by the elements of , and define the set The set M is a special kind of G-SFT known as nearest neighbor (n.n.) G-SFT. It is known that for every G-SFT there exists a conjugacy to an n.n. G-SFT, so we are not losing much generality by considering n.n. G-SFTs instead of general G-SFTs.
We say that an n.n. G-SFT M has a safe symbol if there exists a ∈ such that a can be adjacent to any other symbol b ∈ . Formally, this means that for all s ∈ S and b ∈ , M s (a, b) = M s (b, a) = 1. 9.2. Entropy and potentials. Given a G-subshift , we define its topological entropy as where {F n } n is a Følner sequence and F = {ω F : ω ∈ } is the set of restrictions of points in to the set F ⊆ G. It is known that the definition of h G ( ) is independent of the choice of Følner sequence and is also a conjugacy invariant, that is, if ϕ : 1 → 2 is a conjugacy, then h G ( 1 ) = h G ( 2 ). A potential is any continuous function φ : → R. Given a potential, we define the pressure as A single-site potential is any potential that only depends on the value of ω at 1 G , that is, ω 1 G . In other words, and without risk of ambiguity, we can think that a single-site potential is just a function φ : → R. In this case, Z F n (φ) has the following simpler expression: In this context, we will say that a symbol a ∈ is a vacuum state if a is a safe symbol and φ(a) = 0. Then, there is a natural identification between M ⊆ G and X( ). In particular, the symbol 0 U 0 ∈ X( [U 0 ]) plays the role of a safe symbol in M . Moreover, we can define the single-site potential φ λ : M → R given by φ λ (ω) = v∈U 0 ω 1 G (v) log λ(v). Then, for every F ∈ F(G), Therefore, p G ( , φ λ ) = f G ( , λ). In the language of dynamics, for every almost transitive and locally finite graph , there exists an n.n. G-SFT with a safe symbol such that G X( ) and G are conjugated. Moreover, this gives us a way to identify any hardcore model ( , λ) ∈ H G with the corresponding G-SFT and the single-site potential φ λ . 9.4. From an n.n. G-SFT with a vacuum state to a hardcore model. Conversely, given an n.n. G-SFT and a potential with a vacuum state, we can translate this scenario into a hardcore model. Indeed, consider the graph defined as follows: • for every g ∈ G, consider a finite graph g isomorphic to K | | , the complete graph with | | vertices. In other words, for each g ∈ G and for each a ∈ , there will be a vertex v g,a ∈ V ( g ) and for every a = b, the edge (v g,a , v g,b ) will belong to E( g ); • the graph will be the union of all the finite graphs g plus some extra edges; • for every s ∈ S and a, b ∈ , we add the edge (v 1 G ,a , v s,b ) if and only if M s (a, b) = 0; • we define λ φ : → R >0 as λ φ (v g,a ) = exp(φ(a)) for every g ∈ G and a ∈ .
Then, G acts on in the natural way and V ( 1 G ) corresponds to a fundamental domain of the action G . In the language of dynamics, for every n.n. G-SFT with a safe symbol , there exists an almost transitive and locally finite graph such that G and G X( ) are conjugated. Moreover, it is clear that so in particular, all the representation and approximation theorems for free energy of hardcore models can be used to represent and approximate the pressure of n.n. G-SFTs and potentials φ with a vacuum state, provided ( , λ φ ) satisfies the corresponding hypotheses. Relevant cases like the Widom-Rowlinson model [18] and graph homomorphisms from to any finite graph with some vertex (which plays the role of a safe symbol) connected to every other vertex fall into this category. 9.5. Topological entropy and constraintedness of n.n. G-SFTs with safe symbols. Let ⊆ G be an n.n. G-SFT with | | = n s + n u , where n s denotes the number of safe symbols in and n u denotes the number of symbols that are not safe symbols (unsafe). Consider the n.n. G-SFT n u ⊆ G n u obtained after collapsing all the safe symbols in into a single one, so that the | n u | = 1 + n u , and construct the graph nu . Then, given F ∈ F(G), we have that = n u (log n s + f G ( nu , 1/n s )).
Therefore, to understand and approximate h G ( ) reduces to study the hardcore model on ,n s with constant activity 1/n s . In particular, if 1 n s < λ c (μ( nu )), the hardcore model ( ,n s , 1/n s ) satisfies exponential SSM and the theory developed in the previous sections applies. This motivates the definition of the constraintedness of an n.n. G-SFT as the connective constant of nu , that is, which can be regarded as a measure of how constrained is (the higher μ( ), the more constrained it is). Notice that if 1 n s < λ c (μ( ) + 1), then ( nu , 1/n s ) satisfies exponential SSM. In particular, n u has a unique measure of maximal entropy and therefore, also has unique measure of maximal entropy, namely, the pushforward measure (see [11,21]). Moreover, the topological entropy of n u has an arboreal representation and can be approximated efficiently. Since μ( ) ≤ ( nu ) − 1, we have that it suffices that 1 n s < λ c ( ( nu )), For example, the n.n. G-SFT represented in Figure 6 satisfies that ( nu ) = 6 and λ c (6) = 5 5 /4 6 = 3125/4096; then, if n s > 4096/3125 = 1.31072, we see that it suffices to have two copies of the safe symbol 0 to have exponential SSM.
In general, since each vertex of the fundamental domain is connected to n u − 1 vertices in the clique and to at most n u vertices for each element s in the generating set S, we see that each vertex in nu is connected to at most (n u − 1) + |S|n u other vertices. Then, we can estimate that Remark 9.1. It may be the case that an n.n. G-SFT ⊆ G with a safe symbol could be represented by a graph which is better in terms of connectedness or maximum degree  compared with the canonical representation , since we could encode using other fundamental domains, with a lower connectivity than the complete graph. For example, the n.n. Z 2 -SFT corresponding to the graph on the left in Figure 7 has seven symbols (the seven independent sets of the 4-cycle), including a safe one. However, the canonical graph representation of , that is, the graph , has a fundamental domain consisting of a clique with six vertices, without considering extra connections. In particular, we see that both and represent , but ( ) = 3 < 6 ≤ ( ). This motivates a finer notion of constraintedness, namely, μ( ) = inf{μ( ) : represents n u }, and the aforementioned results would still hold if we replace μ( ) byμ( ). Notice that a fundamental domain U 0 has at least |U 0 | + 1 independent sets (the empty one and all the singletons). In particular, this implies thatμ( ) is a minimum, since we only need to optimize over graphs with a fundamental domain U 0 such that X( [U 0 ]) = | n u |. 9.6. The monomer-dimer model and line graphs. Given a graph = (V , E), we say that two different edges e 1 , e 2 ∈ E are incident if they have one vertex in common. A matching in is a subset M of E without incident edges. In a total parallel with the hardcore model case, we can represent a matching with an indicator function m : E → {0, 1}, denote the set of matchings of by X e ( ), and define the associated partition function for some activity function λ : E → R >0 as Z e (λ) = m∈X e ( ) e∈E λ(e) m(e) .
The pair ( , λ) is called the monomer-dimer model and, as for the case of the hardcore model, we can define its associated free energy and Gibbs measures for a Gibbs specification adapted to this case.
An important feature of the monomer-dimer model is that, despite all its similarities with the hardcore model, it exhibits the SSM property for all values of λ [7] and, in particular, there is no phase transition [22].
Considering this, most of the results presented in this paper, in particular those related to representation and approximation, can be adapted to counting matchings (see [16] for a particular case), and there will not be a phase transition. One way to see this is through the line graph L( ) of the given graph . Indeed, if we define L( ) as the graph with the set of vertices E and the set of edges containing all the adjacent edges in E, it is direct to see that there is a correspondence between matchings in and independent sets in L( ), that is, Z e (λ) = Z L( ) (λ).
In particular, this tell us that all the results in our paper that involve some restriction on λ apply to every graph that can be obtained as a line graph of another one without restriction on λ. For example, the graph represented on the right in Figure 7 corresponds to the line graph of the Cayley graph of Z 2 with canonical generators, that is, = L(Cay(Z 2 , {±(1, 0), ±(0, 1)})).
Then, this observation implies that we can represent and approximate f Z 2 ( , λ) for every Z 2 -invariant activity function λ on . 9.7. From almost free to free. Suppose that G * is almost free, that is, |Stab G (v)| < ∞ for all v. We proceed to show how to reduce the computation of f G ( , λ) to the computation of f G ( * , λ * ) for some free action G * , where * and λ * are some suitable auxiliary graph and activity function, respectively. We consider this as another example of the versatility of independent sets for representing many phenomena. In simple words, for each v in V ( ), there are |Stab G (v)| copies of v in V ( * ) such that: (1) the |Stab G (v)| copies of v form a clique in * ; (2) for (v, v ) ∈ E( ), each copy of v is connected to all copies of v in * .
Next, consider the activity function λ * : V ( * ) → R >0 given by Notice that for every U V ( ), we have that where U * V ( * ) denotes the set of all copies of vertices in U. Indeed, notice that each independent set in * [U * ] can be naturally identified with a unique independent set in [U ]: for x ∈ X( * ), we can define x ∈ X( ) as x(v) = 1 if and only if there exists s ∈ Stab G (v) so that x ((v, s)) = 1. Conversely, if is finite, each independent set x ∈ X( ) can be identified with v∈ |Stab G (v)| x(v) copies in X( * ). Therefore, Now, pick a fundamental domain U 0 ⊆ V of G and, for each v ∈ U 0 , consider the set of left cosets {gStab G (v) : g ∈ G} with a fixed set of representatives R(v), that is, G = g∈R(v) gStab G (v) for each v ∈ U 0 . Without loss of generality, 1 G ∈ R(v) for every v. Next, given v ∈ U 0 and h ∈ G, define t v,h as the unique element in Stab G (v) such that ht −1 v,h ∈ R(v). In addition, given another element r ∈ G, define ψ v h→r := ht −1 v,h t v,r h −1 . Notice that if t ∈ Stab G (v), then t v,ht = t v,h t and ψ v ht→rt = ψ v h→r . Next, consider the action of G on * that, given a vertex (u, s) ∈ V ( * ) and h ∈ G, it is defined as h · (u, s) = (hu, hsψ v g→hg h −1 ),
and, since Z (F n U 0 , λ) = Z * ((F n U 0 ) * , λ * ) = Z * (F n (U 0 ) * , λ * ), applying logarithms, dividing by |F n U 0 |, and taking the limit in n, we obtain that where we have used that {F n K} n is a Følner sequence, lim n |F n K|/|F n | = 1, and |F n (U 0 × {1 G })| = |F n U 0 | = |F n ||U 0 |. 9.8. Spectral radius of matrices and occupation probabilities on trees. A curious consequence of the hardcore model representation of an n.n. G-SFT with a safe symbol This gives us an arboreal representation and a method to compute the spectral radius of any matrix M satisfying the conditions described above that we believe could be of independent interest.