Integer programming, Barvinok s counting algorithm and Gomory relaxations Jean B. Lasserre LAAS-CNRS, Toulouse, France Abstract We propose an algorithm based on Barvinok s counting algorithm for P max{c x Ax b; x Z n }. It runs in time polynomial in the input size of P when n is fixed, and under a condition on c, provides the optimal value of P. We also relate Barvinok s counting formula and Gomory relaxations. Keywords: Integer programming; generating functions. 1 Introduction With A Z m n, c R n, b Q m, we consider the integer program P p := max {c x Ax b; x Z n }. (1) This discrete analogue of linear programming (LP) is a fundamental NP-hard problem with numerous important applications. Solving P remains in general a formidable computational challenge. For a standard reference on integer programming, the reader is referred to the books [10, 11, 13]. The first integer programming algorithm with polynomial time complexity when the dimension n is fixed, is due to H.W. Lenstra and uses lattice reduction technique along with a rounding of a convex body [9]. As underlined in [4, p. 21], this rounding can be quite time-consuming. On the other hand, Barvinok was the first to propose an algorithm to count the integral points of a convex rational polytope Ω(b) := {x R n Ax b}, with polynomial time complexity when the dimension n is fixed. The main step is to produce a compact form of the generating function f : C n C, z f(z) := z x ; (2) x Ω(b) Z n LAAS-CNRS, 7 Avenue du Colonel Roche, 31077 Toulouse Cédex 4, France; email: lasserre@laas.fr 1
see [2] and also [4]. That is, Barvinok s algorithm reduces f(z) to the rational function f(z) = z ai n i I k=1 (1, (3) zb ik ) for some vectors {a i, b ik } in Z n, and I is some index set. In (3), f(z) encodes all the information about the set Ω(b) Z n of integer points in Ω(b). He then suggested that his algorithm, coupled with a standard dichotomy procedure, would yield an alternative to Lenstra s algorithm for integer programming, with no rounding procedure (see the discussion in [4, p. 21]). However, in this scheme, one must redo Barvinok s calculation to obtain the compact form (3) of the new generating function associated with the (new) polyhedron Ω(b ) considered at each step in the dichotomy, which can be also quite time consuming. In this paper : - We provide an upper bound ρ on the optimal value of P by a simple inspection of Barvinok s formula; under some (easy to check) condition on the reward vector c, ρ is also the optimal value of P. - We relate Barvinok s counting formula and Gomory relaxations of integer programs, and provide a simplified procedure for large values of b. Finally, we would like to mention the recent related work [8] in which the authors consider the maximal gap between the optimal values of an integer program and its associated linear program, as the right-hand-side b of Ax = b, ranges over vectors b such that Ax = b has a feasible nonnegative integer solution, and the optimal value is bounded. Combining nicely an algebraic characterization with the use of generating functions (and Barvinok s algorithm for getting their compact form efficiently), they prove that one can obtain this maximal gap value in time polynomial in the input size when the dimension n is fixed. 2 Notation and preliminaries 2.1 Notation and definitions We consider the integer program P p = max {c x Ax b; x Z n }, (4) where A Z m n, c R n, b Q m. With any two vectors z C n, u Z n we use the standard notation z u for the monomial z u := z u1 1 zun n. Also, the usual scalar product of two vectors u, v C m is denoted u v, where u stands for the transpose of u. With the integer program P is associated the convex rational polyhedron Ω(b) := {x R n Ax b} (5) 2
and the generating function f(z) : C n C, given by z f(z) := z x, (6) x Ω(b) Z n for any z C n such that the series converges absolutely. For each vertex v R n of the rational polyhedron Ω(b), denote by C v the rational pointed cone with vertex v, that supports Ω(b), also called the supporting or tangent cone of Ω(b) at v. Let f v : C n C be given by z f v (z) := z x, (7) x C v Z n for any z C n such that the series converges absolutely. 2.2 Barvinok s formula With f, f v as in (6)-(7), Brion proved that f(z) = f v (z); (8) v: vertex of Ω(b) see [5] and also [4, Theor. 3.5, p. 12]. Next, using Brion s formula (8), Barvinok showed that f(z) = z ai n i I k=1 (1, (9) zb ik ) where I is a certain index set, and for all i I, { 1, +1}, a i Z n and {b ik } n k=1 form basis of the lattice Zn. Each i I is associated with a unimodular cone in the decomposition of the tangent cones of Ω(b) (at its vertices), into unimodular cones. From Theorem 4.4 in [4, p. 18], the number I of unimodular cones in such a decomposition, is L O(n) where L is the input size of Ω(b), and the overall computational complexity to obtain the coefficients {a i, b ik } in (9) is also L O(n). Crucial for the latter property is the signed decomposition (triangulation alone into unimodular cones does not guarantee this polynomial time complexity). For more details, the interested reader is referred to [2, 4]. 3 Solving P via Barvinok s algorithm With c R n as in (4) and r N, let z := e rc = (e rc1,..., e rcn ) R n so that with f(z) as in (9), and assuming c b ik 0 for all i I, k = 1,..., n, f(e rc ) = i I (e r ) c a i n k=1 (1. (10) (er ) c b ik) Observe that the property c b ij 0 for all i I, j = 1,..., n is generic as the set of singular points c C n of the generating function f(e c ) is a finite union 3
of hyperplanes (see e.g. [3, 4]). Therefore, whenever c R n is such that the generating function f(e c ) in (6) is well-defined, one may always assume (possibly after some small perturbation of c) that c b ij 0 for all i, j. Next, doing the change of variable u := e r R, (10) reads f(e rc ) = i I u c a i n k=1 (1 uc b ik) = i I u c a i Q i (u) for some functions {Q i } of u. For every i I, let Γ i be the set =: g(u) (11) Γ i := {k {1,..., n} c b ik > 0}, i I, (12) with cardinal Γ i, and define the vector v i Z n by v i := a i k Γ i b ik, i I. (13) If Γ i = then we let Γ i = 0 and v i := a i. Theorem 3.1. Let f(z) be as in (9), and let c R n be such that c b ik 0 for all i I, k = 1,..., n. Assume that P in (4) has a feasible point x Z n and a finite optimal value p. (a) The optimal value p of the integer program P is given by p 1 = lim r r ln 1 f(erc ) = lim r r ln g(er ). (14) (b) With v i as in (13), let S be the set S := {i I c v i = ρ := max j I c v j }. (15) Then ρ p, and ρ = p if i S ( 1) Γi 0. (16) Proof. (a) With z := e rc in the definition of f(z), we have f(e rc ) = e rc x, and thus, x Ω(b) Z n e p = e max{c x x Ω(b) Z n } = max{e c x x Ω(b) Z n } = lim e rc x r x Ω(b) Z n = lim r f(erc ) 1/r, 1/r 4
and by continuity of the logarithm, p = max{c x x Ω(b) Z n 1 } = lim r r ln 1 f(erc ) = lim r r ln g(er ). (b) From (a), one may hope to obtain p by just considering the leading terms (as u ) of the functions u c a i /Q i (u) in (11). If the sum in (11) of the leading terms (with same power of u) does not vanish, then one obtains p by a simple limit argument as u. From (10)-(11) it follows that u c a i a i Q i (u) uc α i u ρi = uc a i ρ i, as u, α i where α i u ρi is the leading term of the function Q i (u) as u. Again from the definition of Q i, its leading term α i u ρi as u is obtained with { ρ i = k Γ i c b ik if Γ i 0 otherwise, and its coefficient α i is 1 if ρ i = 0 and ( 1) Γi otherwise. Remembering the convention that k Γ i c b ik = 0 and ( 1) Γi = 1 if Γ i =, we obtain u c a i Q i (u) ( 1) Γi u c (a i k Γ b ik ) i as u. Therefore, with S and ρ as in (15), if i S ( 1) Γi 0 then g(u) u ρ as u, i S ( 1) Γi so that lim u 1 r ln g(er ) = ρ. This and (14) yields p = ρ, the desired result. From the above analysis it easily follows that if i S ( 1) Γi = 0 then ρ is only an upper bound on p. The interest of Theorem 3.1 is that the value ρ is obtained by simple inspection of (11), which in turn is obtained in time polynomial in the input size of the polyhedron Ω(b) when the dimension n is fixed. When i S ( 1) Γi 0 then it also yields the optimal value p of P in (4). On the other hand, if i S ( 1) Γi = 0, i.e., the sum of the leading terms of the functions u c a i /Q i (u) (with same power of u) cancel, then one needs to examine the next leading terms which requires a further and nontrivial analysis of each function u c a i /Q i (u). An alternative would be to adopt the standard dichotomy trick suggested in [4]. But now, at each step of the dichotomy, one recomputes ρ as in Theorem 3.1 for the new polyhedron considered at this step, until the condition in Theorem 3.1 is met, in which case one stops because the optimal value of P is obtained. Observe that the vectors a i, {b ik } in Barvinok s formula depend only on the polyhedron Ω(b). Therefore, (16) in Theorem 3.1(b) provides a simple (and easy to check) necessary and sufficient condition on the vector c R n, to ensure that the optimal value p of P is equal to ρ in (15), obtained directly from Barvinok s formula. 5
4 The link with Gomory relaxations Let us consider an integer program P in equality form, that is, P p := max{c x Ax = b, x N n }, (17) where A Z m n, b Z m, c R n, with associated polyhedron Ω(b) := max{x R n Ax = b, x 0}. (18) Let L be the linear programming (LP) problem associated with P, that is, L max {c x Ax = b, x 0; x R n }. (19) The Gomory relaxation of P is defined with respect to the optimal basis σ of the LP (19). That is, if A j denote the j-th column of A, and σ = (σ1,..., σm) {1,..., n} m, let A σ = [A σ 1... A σ m ] Z m m be the submatrix of A associated with the optimal basis of the LP (19), and let λ R m be an optimal solution of the LP dual of L. Then the Gomory relaxation is the integer program G σ b λ + max j σ (c j A j λ )x j s.t. A σ x σ + j σ A jx j = b x σ Z m ; x j N, j σ. (20) That is, G σ is obtained from P by relaxing the nonnegativity constraint on the vector x σ Z m. For more details and various extensions of this approach, the interested reader is referred to [1, 7, 12]. If G σ has an optimal solution x = (x σ, {x j }) Z m N n m with x σ 0, then x is an optimal solution of P and the Gomory relaxation is exact. In fact, when b is sufficiently large, the Gomory relaxation is exact (see [7, Theor. 4, Theor. 5, p. 462]). Observe that the criterion in G σ is easily seen to be c x, with x = (x σ, {x j }). Consider the associated counting problem δ σ := { e c x Ax = b; x j Z, j σ ; x j N, j σ }, (21) which sums up e c x over all integral points x Z n of the set C σ := {x R n Ax = b; x j 0 j σ }. (22) Let x(σ ) R n + be the optimal vertex of Ω(b) associated with the optimal basis σ of the LP (19). The set C σ is nothing less than the tangent cone of Ω(b), at the vertex x(σ ). Let be the set of feasible bases σ of the LP (19), and let x(σ) R n + be the corresponding vertex of Ω(b) in (18). For every σ, let C σ be the tangent cone of Ω(b) at the vertex x(σ) (that is, in (22) replace σ with σ). Brion s formula (8) applied to the polyhedron Ω(b) in (18), reads f(z) = f σ (z) = z x. (23) σ σ x C σ Z n 6
The above summation or (18) is formal in the sense that some terms f σ (z) may not be defined for the same values of z C m (see e.g. Example 3.2 in [4, p. 10]). Note that f σ (e c ) = δ σ, where δ σ is as in (21), with σ in lieu of σ. So, C σ Z n is the feasible set of the Gomory relaxation associated with the basis σ (usually defined for σ only). Then, as the Gomory relaxation G σ provides an upper bound on p (and exactly p when b is sufficiently large), we can apply Theorem 3.1 to the integer program G σ in (20), instead of P in (17). So, when the dimension n is fixed, Barvinok s algorithm produces in time polynomial in the input size of C σ, the equivalent compact form of f σ (z), f σ (z) = i I σ z ai n k=1 (1 zb ik ), (24) where the above summation is over the unimodular cones in Barvinok s decomposition of C σ into unimodular cones. There is much less work to do because now, in Brion s formula (23), we have only considered the term f σ relative to the optimal basis σ of the LP (19). When the condition on c in Theorem 3.1(b) (applied to the integer program G σ ) is satisfied, one obtains the optimal value of the Gomory relaxation G σ (and the optimal value of P for sufficiently large b), in time polynomial in the input size of Ω(b) when the dimension n is fixed. Hence, this technique could provide a viable alternative to the dynamic programming based algorithms for solving group relaxations, as discussed in [12]. References [1] K. Aardal, R. Weismantel, L.A. Wolsey. Non-standard approaches to integer programming, Discr. Appl. Math. 123 (2002), 5 74. [2] A.I. Barvinok. A polynomial time algorithm for counting integral points in polyhedra when the dimension is fixed, Math. Oper. Res. 19 (1994), 769 779. [3] A. Barvinok. Computing the volume, counting integral points, and exponential sums, Discr. Comp. Geom. 10 (1993), 123 141. [4] A.I. Barvinok, J.E. Pommersheim. An algorithmic theory of lattice points in polyhedra, in: New Perspectives in Algebraic Combinatorics, MSRI Publications 38 (1999), 91 147. [5] M. Brion. Points entiers dans les polyèdres convexes, Ann. Sci. ENS 21 (1988), 653 663. [6] J. De Loera, R. Hemmecke, J. Tauzer, R. Yoshida. Effective lattice point counting in ratonal convex polytopes, Technical report, Department of Mathematics, University of California, Davis, 2003. 7
[7] R.E. Gomory. Some Polyhedra Related to Combinatorial Problems, Lin. Alg. Appl. 2 (1969), 451 558. [8] S. Hosten and B. Sturmfels. Computing the integer programming gap, arxiv:math.oc/0301266v1, 2003. [9] H.W. Lenstra. Integer programming with a fixed number of variables, Math. Oper. Res. 8 (1983), 538 548. [10] G.L. Nemhauser, L.A. Wolsey. Integer and combinatorial optimization, Wiley, New York, 1988. [11] A. Schrijver. Theory of Linear and Integer Programming, John Wiley & Sons, Chichester, 1986. [12] L.A. Wolsey. Extensions of the group theoretic approach in integer programming, Manag. Sci. 18 (1971), 74 83. [13] L.A. Wolsey. Integer Programming, John Wiley & Sons, Inc., 1998. 8