47
Optimization - Lecture 5, Part 1 M. Pawan Kumar http://www.robots.ox.ac.uk/ ~oval/ Slides available online http://mpawankumar.info

Optimization - Lecture 5, Part 1 M. Pawan Kumar Slides available online

Embed Size (px)

DESCRIPTION

Linear Program s.t. A x ≤ b max x c T x

Citation preview

Page 1: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

Optimization - Lecture 5, Part 1

M. Pawan Kumar

http://www.robots.ox.ac.uk/~oval/

Slides available online http://mpawankumar.info

Page 2: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

• Integer Linear Programming

• Duality

• Integer Polyhedron

• Totally Unimodular Matrices

Outline

Page 3: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

Linear Program

s.t. A x ≤ b

maxx cTx

Page 4: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

Integer Linear Program

s.t. A x ≤ b

maxx cTx

x is an integer vector

Every element of x is an integer

Page 5: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

Integer Linear Program

s.t. A x ≤ b

maxx cTx

x ∈ Zn

Every element of x is an integer

Page 6: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

Example

4x1 – x2 ≤ 8

maxx x1 + x2

2x1 + x2 ≤ 10

5x1 - 2x2 ≥ -2

x1 ≥ 0

x2 ≥ 0

s.t.

x ∈ Zn

Page 7: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

Example

x1 ≥ 0

x2 ≥ 0

Page 8: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

Example

4x1 – x2 = 8

x1 ≥ 0

x2 ≥ 0

Page 9: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

Example

4x1 – x2 ≤ 8

x1 ≥ 0

x2 ≥ 0

Page 10: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

Example

4x1 – x2 ≤ 8

2x1 + x2 ≤ 10

x1 ≥ 0

x2 ≥ 0

Page 11: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

Example

4x1 – x2 ≤ 8

2x1 + x2 ≤ 10

5x1 - 2x2 ≥ -2

x1 ≥ 0

x2 ≥ 0

Page 12: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

Example

4x1 – x2 ≤ 8

2x1 + x2 ≤ 10

5x1 - 2x2 ≥ -2

x1 ≥ 0

x2 ≥ 0

x ∈ Zn

maxx cTx

(2,6)

(3,4)

(2,0)(0,0)

(0,1)

Page 13: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

Example

4x1 – x2 ≤ 8

2x1 + x2 ≤ 10

5x1 - 2x2 ≥ -2

x1 ≥ 0

x2 ≥ 0

x ∈ Zn

maxx cTx

(2,6)

(3,4)

(2,0)(0,0)

(0,1)

Why? True in general?

Page 14: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

Example

4x1 – x2 ≤ 8

2x1 + x2 ≤ 10

5x1 - 2x2 ≥ -2

x1 ≥ 0

x2 ≥ 0

x ∈ Zn

maxx cTx

(2,6)

(3,4)

(2,0)(0,0)

(0,1)

Page 15: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

Example

4x1 – x2 ≤ 8

2x1 + x2 ≤ 10

5x1 - 2x2 ≥ -2

x1 ≥ 0.5

x2 ≥ 0

x ∈ Zn

maxx cTx

(2,6)

(3,4)

(2,0)(0,0)

(0,1)

Page 16: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

Example

4x1 – x2 ≤ 8

2x1 + x2 ≤ 10

5x1 - 2x2 ≥ -2

x1 ≥ 0.5

x2 ≥ 0

x ∈ Zn

maxx cTx

(2,6)

(3,4)

(2,0)(0.5,0)

(0.5,2.25)

Page 17: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

ILP are generally NP-hard

Integer Linear Program

Many combinatorial optimization problems

“Easy” ILP = Easy optimization problem

Page 18: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

• Integer Linear Programming

• Duality

• Integer Polyhedron

• Totally Unimodular Matrices

Outline

Page 19: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

s.t. A x ≤ b

maxx cTx

Question

x ∈ Zn

s.t. A x ≤ b

maxx cTx≤≥=

Page 20: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

s.t. A x ≤ b

maxx cTx

Answer

x ∈ Zn

s.t. A x ≤ b

maxx cTx≤

Page 21: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

s.t. A x ≤ b

maxx cTx

Question

x ∈ Zn

s.t. A x ≤ b

maxx cTx≤

s.t. A y = c

miny bTy

≤≥=

Page 22: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

s.t. A x ≤ b

maxx cTx

Answer

x ∈ Zn

s.t. A x ≤ b

maxx cTx≤

s.t. A y = c

miny bTy

=

Page 23: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

s.t. A x ≤ b

maxx cTx

Question

x ∈ Zn

s.t. A x ≤ b

maxx cTx≤

s.t. A y = c

miny bTy

=s.t. A y = c

miny bTy

y ∈ Zm≤ ≥ =

Page 24: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

s.t. A x ≤ b

maxx cTx

Answer

x ∈ Zn

s.t. A x ≤ b

maxx cTx≤

s.t. A y = c

miny bTy

=s.t. A y = c

miny bTy

y ∈ Zm≥

Page 25: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

s.t. A x ≤ b

maxx cTx

Duality Relationship

x ∈ Zn

s.t. A x ≤ b

maxx cTx≤

s.t. A y = c

miny bTy

=s.t. A y = c

miny bTy

y ∈ Zm≥

Page 26: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

s.t. A x ≤ b

maxx cTx

Duality Relationship

x ∈ Zn

s.t. A x ≤ b

maxx cTx≤

s.t. A y = c

miny bTy

=s.t. A y = c

miny bTy

y ∈ Zm≥

≤ Strict inequality for some problems

Page 27: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

• Integer Linear Programming

• Duality

• Integer Polyhedron

• Totally Unimodular Matrices

Outline

Page 28: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

4x1 – x2 ≤ 8

2x1 + x2 ≤ 10

5x1 - 2x2 ≥ -2

x1 ≥ 0

x2 ≥ 0(2,6)

(3,4)

(2,0)(0,0)

(0,1)

All the vertices of P are integer vectors

P

Integer Polyhedron

Integer polytope is a bounded integer polyhedron

Page 29: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

4x1 – x2 ≤ 8

2x1 + x2 ≤ 10

5x1 - 2x2 ≥ -2

x1 ≥ 0

x2 ≥ 0(2,6)

(3,4)

(2,0)(0,0)

(0,1)

P

Integer Polyhedron

Integer polyhedron need not be bounded

All the vertices of P are integer vectors

Page 30: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

4x1 – x2 ≤ 8

5x1 - 2x2 ≥ -2

x1 ≥ 0

x2 ≥ 0(2,6)

(3,4)

(2,0)(0,0)

(0,1)

P

Integer Polyhedron

Integer polyhedron need not be bounded

All the vertices of P are integer vectors

Page 31: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

4x1 – x2 ≤ 8

5x1 - 2x2 ≥ -2

x1 ≥ 0

x2 ≥ 0

Integer polyhedron need not be bounded

P

Integer Polyhedron

(2,0)(0,0)

(0,1)

All the vertices of P are integer vectors

Page 32: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

4x1 – x2 ≤ 8

5x1 - 2x2 ≥ -2

x1 ≥ 0

x2 ≥ 0

Are all polyhedra integer polyhedra?

P

Question

(2,0)(0,0)

(0,1)

All the vertices of P are integer vectors

NO

Page 33: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

4x1 – x2 ≤ 8

5x1 - 2x2 ≥ -2

x1 ≥ 0.5

x2 ≥ 0

Are all polyhedra integer polyhedra?

P

Question

(2,0)(0,0)

(0,1)

All the vertices of P are integer vectors

NO

Page 34: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

4x1 – x2 ≤ 8

5x1 - 2x2 ≥ -2

x1 ≥ 0.5

x2 ≥ 0

Are all polyhedra integer polyhedra?

Question

(2,0)

All the vertices of P are integer vectors

NO

(0.5,0)

(0.5,2.25) P

Page 35: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

Integer polyhedra are very useful

ILP over Integer polyhedron is easy

Integer Polyhedron

Drop the integrality constraints, solve LP

But how can we identify integer polyhedra?

Page 36: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

• Integer Linear Programming

• Duality

• Integer Polyhedron

• Totally Unimodular Matrices

Outline

Page 37: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

Totally Unimodular Matrix

A is a TUM

For all square submatrix A’ of A

det(A’) is 0, +1 or -1

Page 38: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

Question

0

0

2

-1

Is this a TUM?

All elements must be 0, +1 or -1

NO

Page 39: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

Question

1

1

1

-1

Is this a TUM?

Determinant of the matrix = -2

NO

Page 40: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

Question

1

1

-1

-1

Is this a TUM?

YES.

Page 41: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

Question

1

-1

-1

1

Is this a TUM?

YES.

Page 42: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

Property

A is a TUM

b is an integer vector, b Z∈ n

Polyhedron P = {x | Ax ≤ b}

P is an integer polyhedron Proof?

Page 43: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

Proof Sketch

Let v be a vertex of P.

A’ is a full-rank square submatrix of A

b’ is the corresponding subvector of b

A’v = b’ Why?

Page 44: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

Proof Sketch

Let v be a vertex of P.

A’ is a full-rank square submatrix of A

b’ is the corresponding subvector of b

A’v = b’ v = adj(A’)b’/det(A’)

v is integer

Integer +1 or -1

Page 45: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

Totally Unimodular Matrix

How can we identify if A is TUM?

O((m+n)3) algorithm. K. Truemper, 1990

We don’t want to identify easy problem instances

We want to identify easy problems

Page 46: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

Totally Unimodular Matrix

Some types of matrices are TUM

Easy to prove that they are TUM

Corresponding problems are provably “easy”

We will see that min-cut is one such problem

Page 47: Optimization - Lecture 5, Part 1 M. Pawan Kumar  Slides available online

Questions?