Integer Programming and Lattice Point Enumeration Seminar - - PowerPoint PPT Presentation

integer programming and lattice point enumeration
SMART_READER_LITE
LIVE PREVIEW

Integer Programming and Lattice Point Enumeration Seminar - - PowerPoint PPT Presentation

Introduction and Definitions LattE and Barvinoks algorithm Calculating the Hilbert basis using 4ti2 Integer Programming and Lattice Point Enumeration Seminar Mathematical Software, Prof. Komei Fukuda Christoph Glanzer November 25,


slide-1
SLIDE 1

Introduction and Definitions LattE and Barvinok’s algorithm Calculating the Hilbert basis using 4ti2

Integer Programming and Lattice Point Enumeration

Seminar ”Mathematical Software”,

  • Prof. Komei Fukuda

Christoph Glanzer November 25, 2014

slide-2
SLIDE 2

Introduction and Definitions LattE and Barvinok’s algorithm Calculating the Hilbert basis using 4ti2

Outline of the Seminar

Goal: Present a computational approach towards solving two common problems in Integer Programming: The enumeration of lattice points of a polyhedron and the calculation of a Hilbert basis. Outline:

  • 1. Introduction and Definitions

1.1 Integer and Linear Programming 1.2 Hilbert Basis

  • 2. LattE and Barvinok’s algorithm

2.1 Introduction to LattE 2.2 Barvinok’s algorithm 2.3 Input file format and examples

  • 3. 4ti2

3.1 Input file format 3.2 Example: Calculating the Hilbert basis

slide-3
SLIDE 3

Introduction and Definitions LattE and Barvinok’s algorithm Calculating the Hilbert basis using 4ti2

Section 1 Introduction and Definitions

slide-4
SLIDE 4

Introduction and Definitions LattE and Barvinok’s algorithm Calculating the Hilbert basis using 4ti2

Basic Definitions

Definition (Half-Space)

For a ∈ Qd, α ∈ Q, {x ∈ Rd | aTx ≤ α} is called a (rational) half-space.

Definition (Polyhedron)

A polyhedron P is an intersection of a finite amount of halfspaces, P = {x ∈ Rd | Ax ≤ b} where the inequality is considered to be element-wise and A ∈ Qm×d.

slide-5
SLIDE 5

Introduction and Definitions LattE and Barvinok’s algorithm Calculating the Hilbert basis using 4ti2

Linear Programming

  • Goal: Maximize an objective function defined by c over a

given polyhedron P.

  • Linear programs can be expressed in the following form:

max

x∈Rd cTx

subject to: Ax ≤ b where x ∈ Rd, A ∈ Rm×d, b ∈ Rm, c ∈ Rd

  • For d = 2, they can easily be solved graphically.
slide-6
SLIDE 6

Introduction and Definitions LattE and Barvinok’s algorithm Calculating the Hilbert basis using 4ti2

Integer Programming

  • Goal: Maximize an objective function defined by c ∈ Qd over a

given polyhedron P, where x ∈ Zd.

  • Integral optimization programs can be expressed in the

following form:

max

x∈Zd cTx

subject to: Ax ≤ b where x ∈ Zd, A ∈ Qm×d, b ∈ Qm, c ∈ Qd

  • LattE only accepts inputs in Qd, which have to be rescaled to

lie in Zd, which is why we restrict the inputs to Qd.

slide-7
SLIDE 7

Introduction and Definitions LattE and Barvinok’s algorithm Calculating the Hilbert basis using 4ti2

Graphical Example

  • By moving the affine subspace x2 = c upwards, we can find

both the linear and integral solution graphically.

slide-8
SLIDE 8

Introduction and Definitions LattE and Barvinok’s algorithm Calculating the Hilbert basis using 4ti2

Hilbert Basis

Definition (Polyhedral Cone)

A polyhedron C is a cone if C := {x ∈ Rd | Ax ≤ 0}.

Lemma (Properties of a cone)

Let C be a polyhedral cone. Then, i) ∀λ ≥ 0, x ∈ C : λx ∈ C, ii) ∀x1, x2 ∈ C : x1 + x2 ∈ C, iii) 0 ∈ C.

Proof.

i) Aλx = λAx ≤ λ0 = 0. ii) A (x1 + x2) = Ax1 + Ax2 ≤ 0 + 0 = 0. iii) A0 = 0 ≤ 0.

slide-9
SLIDE 9

Introduction and Definitions LattE and Barvinok’s algorithm Calculating the Hilbert basis using 4ti2

Hilbert Basis

Definition (Hilbert Basis)

Let C be a polyhedral pointed cone. A set of vectors

{a1, . . . , ak} ⊂ C ∩ Zd is called the (unique) Hilbert basis of the

cone C, where k ≥ d, if i) for every integral vector x ∈ C ∩ Zd, there’s an integral conic combination of the ai equal to x, i.e.

∀x ∈ C ∩ Zd : ∃λ1, . . . , λk ≥ 0, λi ∈ Z : x =

k

  • i=1

λiai

ii) and if the set of vectors {a1, . . . , ak} has minimal cardinality with respect to all subsets of C ∩ Zd for which i) holds.

slide-10
SLIDE 10

Introduction and Definitions LattE and Barvinok’s algorithm Calculating the Hilbert basis using 4ti2

Hilbert Basis - Example

  • A cone generated by (2, 2)T and (2, 0)T. The Hilbert basis is

given by {(1, 1)T, (1, 0)T}.

slide-11
SLIDE 11

Introduction and Definitions LattE and Barvinok’s algorithm Calculating the Hilbert basis using 4ti2

Section 2

LattE and Barvinok’s algorithm

slide-12
SLIDE 12

Introduction and Definitions LattE and Barvinok’s algorithm Calculating the Hilbert basis using 4ti2

Introduction to LattE

  • Short for Lattice Point Enumeration.
  • Development started in 2001; current project supervisors:
  • Prof. Matthias K¨
  • ppe and Prof. Jes´

us A. De Loera.

  • While the initial program’s only purpose was to count lattice

points, the newer versions, LattE macchiato and LattE

integrale, offer a variety of features connected to polyhedra.

  • Important: LattE cannot compute with irrational numbers!
slide-13
SLIDE 13

Introduction and Definitions LattE and Barvinok’s algorithm Calculating the Hilbert basis using 4ti2

Barvinok’s Algorithm

  • LattE uses Barvinok’s algorithm to count the amount of

lattice points in a given polyhedron.

  • Main idea: Represent the polyhedron’s lattice points as a

multivariate polynomial:

Definition (Generating Function)

Let P be a (rational) polyhedron. We define the multivariate generating function as f(P) :=

  • a∈P∩Zd

za, where we use the notation that za = za1

1 . . . zad d .

slide-14
SLIDE 14

Introduction and Definitions LattE and Barvinok’s algorithm Calculating the Hilbert basis using 4ti2

Generating Function - Example

  • For a simple square, the multivariate generating function is

equal to f(P) = z0

1z0 2 + z1 1z0 2 + z0 1z1 2 + z1 1z1 2 = 1 + z1 + z2 + z1z2

  • Main Idea: Evaluate f(P) at z = (1, 1, . . . , 1)T to get the

amount of lattice points in the polyhedron.

slide-15
SLIDE 15

Introduction and Definitions LattE and Barvinok’s algorithm Calculating the Hilbert basis using 4ti2

Brion’s Theorem

  • We need to make the computation of f(P) as easy and fast as

possible.

Definition (supporting cone)

Let P be a polyhedron and v be a vertex of P . Then, the supporting cone of P at v is defined as K(P, v) := v + {u ∈ Rd | ∃δ > 0 s.t. v + ǫu ∈ P ∀ǫ ∈ [0, δ)}

slide-16
SLIDE 16

Introduction and Definitions LattE and Barvinok’s algorithm Calculating the Hilbert basis using 4ti2

Brion’s Theorem

Figure: The supporting cone of the square at v = (0, 1)T

slide-17
SLIDE 17

Introduction and Definitions LattE and Barvinok’s algorithm Calculating the Hilbert basis using 4ti2

Brion’s Theorem

Theorem (Brion’s Theorem)

Let P be a polyhedron and V(P) be the vertex set of P . Then, f(P) =

  • v∈V(P)

f(K(P, v)).

  • As an example, we use Brion’s Theorem to calculate the

generating function f(P) = 1 + z1 + z2 + z1z2 of the square (→ Blackboard).

slide-18
SLIDE 18

Introduction and Definitions LattE and Barvinok’s algorithm Calculating the Hilbert basis using 4ti2

Further Simplifications

  • There’s another Theorem that will simplify the calculation of

the generating function.

Definition (Simplicial cone)

Let C be a rational cone. C is simplicial if and only if it’s generated by a set of at most d (linear independent) vectors.

⇒ All cones in R2 are simplicial. However, there are

counterexamples in R3 (→ Blackboard).

slide-19
SLIDE 19

Introduction and Definitions LattE and Barvinok’s algorithm Calculating the Hilbert basis using 4ti2

Further Simplifications

Theorem

Let C be a simplicial cone generated by {u1, u2, . . . , uk}. Consider the fundamental parallelepiped S defined by S = {

k

  • i=1

λiui, 0 ≤ λi < 1, i = 1, . . . , k}.

Then, the generating function for the lattice points in C is

  • a∈C∩Zd

za =

       

  • τ∈S∩Zd

       

k

  • i=1

1 1 − zui .

  • This is what we’ve witnessed when we’ve calculated the

generating function of the square.

slide-20
SLIDE 20

Introduction and Definitions LattE and Barvinok’s algorithm Calculating the Hilbert basis using 4ti2

Further Simplifications

  • We have crafted the following algorithm:
  • 1. Calculate the supporting cone at every vertex of the

polyhedron.

  • 2. Decompose the supporting cones into simplicial cones.
  • 3. Apply the Theorem to calculate the generating function of P.
  • 4. Plug in 1 = (1, 1, . . . , 1)T to receive the amount of lattice points

in P.

Problem: Especially in higher dimensions, the fundamental parallelepiped tends to contain many lattice points, which makes the calculation quite expensive.

⇒ Barvinok’s idea is to further decompose the simplicial cones.

slide-21
SLIDE 21

Introduction and Definitions LattE and Barvinok’s algorithm Calculating the Hilbert basis using 4ti2

Barvinok’s idea

Definition (Unimodular Cone)

A simplicial cone C is said to be unimodular, if its fundamental parallelepiped only contains one point.

Lemma

Let C be an unimodular cone. Then, its generating function is given by zβ k

i=1 1 1−zui , where β is the unique point in the

fundamental parallelepiped of C.

slide-22
SLIDE 22

Introduction and Definitions LattE and Barvinok’s algorithm Calculating the Hilbert basis using 4ti2

Example of an unimodular cone

Figure: The cone on the left is unimodular while the one on the right isn’t.

⇒ More details on the decomposition algorithm can be found in

the final report.

slide-23
SLIDE 23

Introduction and Definitions LattE and Barvinok’s algorithm Calculating the Hilbert basis using 4ti2

One final problem

  • We cannot simply evaluate our generating function at

z = 1 = (1, 1, . . . , 1)T as the geometric series is not defined in this case.

  • So far, we considered the polynomial to be a formal Laurent

series, which is why this was possible.

  • LattE solves this by substituting zi → tλi for a certain choice
  • f λ = (λ1, . . . , λd)T and by using a Taylor expansion of the

resulting univariate polynomial.

  • Details can be found in the LattE documentation.
slide-24
SLIDE 24

Introduction and Definitions LattE and Barvinok’s algorithm Calculating the Hilbert basis using 4ti2

LattE’s input file format

  • LattE only accepts inputs in integral form (→ rescale

equations).

  • Inputs in h-representation, v-representation and CDD input files

are accepted.

  • Polytopes in a v-representation need to have homogeneous

coordinates (→ talk by Sonja Meier and Heidi Pang)

slide-25
SLIDE 25

Introduction and Definitions LattE and Barvinok’s algorithm Calculating the Hilbert basis using 4ti2

LattE’s input file format

  • LattE input file in h-representation:

m d + 1 b −A

  • To add additional constraints, the following lines can be

added:

nonnegative d x1 x2 . . . xd linearity m a1 a2 . . . am

  • To use LattE’s optimization features, a filename.cost file

has to be created containing the cost vector:

1 d c1 c2 . . .

slide-26
SLIDE 26

Introduction and Definitions LattE and Barvinok’s algorithm Calculating the Hilbert basis using 4ti2

Section 3 Calculating the Hilbert basis using 4ti2

slide-27
SLIDE 27

Introduction and Definitions LattE and Barvinok’s algorithm Calculating the Hilbert basis using 4ti2

4ti2

  • 4ti2 (”Fortytwo” or ”For tea, too”) is a software package

similar to LattE.

  • Main developers: R. Hemmecke, M. K¨
  • ppe, P

. Malkin and M. Walter.

  • It offers a variety of features but is particularly well-known for

the fast computation of Hilbert bases.

  • 4ti2 implements R. Hemmecke’s project-and-lift algorithm to

calculate the Hilbert basis of a rational cone. Details can be found on the 4ti2 homepage.

slide-28
SLIDE 28

Introduction and Definitions LattE and Barvinok’s algorithm Calculating the Hilbert basis using 4ti2

4ti2’s input file format

  • The polyhedron’s data has to be stored in four files, namely

filename.mat, filename.rel, filename.rhs and filename.sign.

  • filename.mat:

m d A

  • filename.rel:

1 m r1 r2 r3 . . . rm

Each of the ri is either <, = or >.

slide-29
SLIDE 29

Introduction and Definitions LattE and Barvinok’s algorithm Calculating the Hilbert basis using 4ti2

4ti2’s input file format

  • filename.rhs describes our right hand side b. The input

format is the same as for filename.mat.

  • filename.sign stores constraints on the variables x1, . . . , xd:

1 d s1 s2 s3 . . . sd

Each of the si is either −1, 0, 1 or 2.

  • 0: The variable xi is free
  • 1: xi ≥ 0
  • −1: xi ≤ 0
  • 2: The result is calculated separately for xi ≤ 0 and xi ≥ 0 and

the results are united lateron.

slide-30
SLIDE 30

Introduction and Definitions LattE and Barvinok’s algorithm Calculating the Hilbert basis using 4ti2

Sample calculation

  • As an example, consider

A =

  • 1

−5 −2 −1

  • b =
slide-31
SLIDE 31

Introduction and Definitions LattE and Barvinok’s algorithm Calculating the Hilbert basis using 4ti2

References

◮ LattE homepage:

https://www.math.ucdavis.edu/˜latte/software.php

◮ 4ti2 homepage: http://www.4ti2.de/ ◮ De Loera, J.A., Hemmecke, R., Tauzer, J. and Yoshida, R.

Effective Lattice Point Counting in Rational Convex Polytopes (2003).

◮ Barvinok, A.I. Integer Points in Polyhedra (2008). ◮ Barvinok, A.I. and Pommersheim, J. An algorithmic theory of

lattice points in polyhedra.

◮ Hemmecke, R. On the Computation of Hilbert Bases of Cones.