• No results found

Enumerating non-parametric polytopes

Chapter 2 Theoretical Methods

2.4 Barvinok’s algorithm

2.4.3 Enumerating non-parametric polytopes

We can, now, outline the algorithm for counting the integer points inside our polytopes. This procedure works for non-parametric polytopes, i.e., polytopes whereAandcdo not depend on any parameters. It uses proposition (2.39) to reduce the problem of enumerating the integer points to calculating a function over the set of vertices of a polytope.

The simplest way to count the integer points inside a polytope might appear to be to use c = 0 at equation (2.39). This does not quite work: for all functions σ(Kv, c), the point c = 0 is singular, which invalidates the

proposition. We are able to implement a similar approach, though. First, a parameter t is introduced. Now, c can be any generic point in Rd, that is, a

regular point for all functions σ(Kv, c). Now, we will want to calculate the

constant term of the Taylor expansion for X

x∈Zd∩P

exp{t.hc, xi} (2.40)

aroundt= 0. Proposition (2.39) allows us to do so by computing the constant termsR(Kv, v, c) of the Laurent expansion of the functions

exp{t.hc, vi}.σ(Kv, t.c) (2.41)

for VertP. As long as we can obtain these terms R(Kv, v, c) easily, we will be

able to achieve our target of having an efficient algorithm for counting integer points inside a polyhedron, allowing us to easily compute the entropy in our systems.

In fact, it is possible to define a class of cones for whichR(Kv, v, c) is a

straightforward computation. We will define a subset of simple rational cones as primitive; a primitive cone K is one where

K = co{u1, . . . , uk} (2.42)

whereu1, . . . , ukis a basis of a lattice Λ = Zd∩LinK, where LinK is the linear

hull of K. The vectors u1, . . . , uk are, then, called the primitive generators of

The termR(Kv, v, c), it turns out, has an explicit formula for primitive

conesKv. The polynomialpK is simply equal to 1 for primitive cones, making

the function σ(K, c) very simple to compute.

With that problem solved, we now need an efficient way of decomposing any simple rational cone K into a combination of primitive cones. When the dimension of our polytopedis fixed, this procedure can be done in polynomial time and the number of primitive cones is bounded. This decomposition is the central part of the algorithm; this is what makes a polynomial-time algorithm for counting integer points in a polytope possible.

We can, then, rewrite equation (2.36) in the cases where K ⊂ Rd is a

primitive cone: σ(K, c) = k Y l=1 1 1−exp{hc, uli} (2.43) whereu1, . . . , uk are the primitive generators ofK. Again, we will present this

without proof; it follows from Eq. (2.36), and the derivation can be found in [Barvinok, 1994].

From this result, it can be shown that,for anyk∈N, there exists a poly- nomial Qk(x1, . . . , xk, y) of degree not more than k, with rational coefficients

such that R(K, v, c) =Qk(x1, . . . , xk, y). k Y l=1 x−l 1 (2.44)

whereR(K, v, c) is the constant term of the Laurent expansion of the generic version of function (2.40) for any primitive coneKaroundt= 0 for anyv ∈Zd,

any primitive k-dimensional cone K ⊂ Rd with its usual primitive generators

and for any c ∈ Rd that is a regular point of σ(K, c). For those points, we

definey =hc, vi and xl=hc, uli for i= 1, . . . , k.

The derivation can be found at [Barvinok, 1994]. In fact, it can also be proven that calculating the terms R(K, v, c) for primitive cones can be achieved by an algorithm that runs in polynomial time. Therefore, as long as cone decomposition into primitive cones can be done in polynomial time, the overall counting algorithm is polynomial time. This is essential for efficient computation of the number of accessible microstates, and for the calculation of entropies in our system.

the concept of index of a cone. This is essentially a natural number measuring how far a cone is from being primitive; IndK = 1 is only true for primitive cones. It is, conversely, a measure of how complex the polynomial pK is. Its

precise definition is the number of integer points in Π, defined as

Π ={x=

k

X

l=1

αl.ul : 0≤αl<1} (2.45)

As usual,u1, . . . , uk are the linearly independent generators of the cone K.

In his work in 1993, Barvinok’s central finding was precisely that this cone decomposition can be achieved in polynomial time [Barvinok, 1994]. His proof is presented inductively: his first step is to show that, for fixed d ∈ N, there is a polynomial-time algorithm that constructs at most 2dsimple rational conesKi ⊂Rd for any given cone K ⊂Rd. It also computes integral numbers

i ∈ −1,1. The relationship between the constructed conesKi and the original

cone K is such that

Ind Ki ≤(IndK)(d−1)/d, ∀i (2.46) K =X i∈I i.Ki and σ(K, c) = X i∈I i.σ(Ki, c) (2.47)

We can see that the index of the constructed cones are smaller than that of the original one. Barvinok shows that there is a finite number of steps from an original simple rational cone K to a family of cones Ki that are rational

primitive cones. If we combine this with Equation (2.39) and a choice ofcthat is never a singular point for the function σ(Ki, c) (that can also be calculated

in polynomial time), we arrive at the expression #(P ∩Zd) = X

v∈VertP

X

i∈Ii

i.R(Ki, v, c) (2.48)

where the symbol # denotes the cardinality of a set, and we have completed the calculation of the number of integer points in our polyhedron P. This means that we can calculate the number of accessible microstates quickly from a set of constraints defined by filaments and cross-linkers, and therefore the computation of entropy in our system is efficient.