Planning and Optimization E4. Linear & Integer Programming - - PowerPoint PPT Presentation

planning and optimization
SMART_READER_LITE
LIVE PREVIEW

Planning and Optimization E4. Linear & Integer Programming - - PowerPoint PPT Presentation

Planning and Optimization E4. Linear & Integer Programming Malte Helmert and Gabriele R oger Universit at Basel Integer Programs Linear Programs Summary Content of this Course Foundations Logic Classical Heuristics Constraints


slide-1
SLIDE 1

Planning and Optimization

  • E4. Linear & Integer Programming

Malte Helmert and Gabriele R¨

  • ger

Universit¨ at Basel

slide-2
SLIDE 2

Integer Programs Linear Programs Summary

Content of this Course

Planning Classical Foundations Logic Heuristics Constraints Probabilistic Explicit MDPs Factored MDPs

slide-3
SLIDE 3

Integer Programs Linear Programs Summary

Content of this Course: Constraints (Timeline)

Constraints Landmarks Cost Partitioning Network Flows Operator Counting

slide-4
SLIDE 4

Integer Programs Linear Programs Summary

Content of this Course: Constraints (Relevance)

Constraints Landmarks Cost Partitioning Network Flows Operator Counting

slide-5
SLIDE 5

Integer Programs Linear Programs Summary

Content of this Course (Relevance)

Planning Classical Foundations Logic Heuristics Constraints Probabilistic Explicit MDPs Factored MDPs

slide-6
SLIDE 6

Integer Programs Linear Programs Summary

Content of this Course (Relevance)

Computer Science Artifical Intelligence Operations Research Machine Learning Robotics

  • a. . . a
slide-7
SLIDE 7

Integer Programs Linear Programs Summary

Integer Programs

slide-8
SLIDE 8

Integer Programs Linear Programs Summary

Motivation

This goes on beyond Computer Science Active research on IPs and LPs in

Operation Research Mathematics

Many application areas, for instance:

Manufacturing Agriculture Mining Logistics Planning

As an application, we treat LPs / IPs as a blackbox We just look at the fundamentals

slide-9
SLIDE 9

Integer Programs Linear Programs Summary

Motivation

Example (Optimization Problem) Consider the following scenario: A factory produces two products A and B Selling a unit of B yields 5 times the profit of a unit of A. A client places the unusual order to “buy anything that can be produced on that day as long as the units of B do not exceed two plus twice the units of A.” The factory can produce at most 12 products per day. There is only material for 6 units of A (there is enough material to produce any amount of B) How many units of A and B does the client receive if the factory owner aims to maximize her profit?

slide-10
SLIDE 10

Integer Programs Linear Programs Summary

Integer Program: Example

Let XA and XB be the (integer) number of produced A and B Example (Optimization Problem as Integer Program) XA ≥ 0, XB ≥ 0 Example (Optimization Problem)

slide-11
SLIDE 11

Integer Programs Linear Programs Summary

Integer Program: Example

Let XA and XB be the (integer) number of produced A and B Example (Optimization Problem as Integer Program) maximize XA + 5XB subject to XA ≥ 0, XB ≥ 0 Example (Optimization Problem) “a unit of B yields 5 times the profit of a unit of A” “the factory owner aims to maximize her profit”

slide-12
SLIDE 12

Integer Programs Linear Programs Summary

Integer Program: Example

Let XA and XB be the (integer) number of produced A and B Example (Optimization Problem as Integer Program) maximize XA + 5XB subject to 2 + 2XA ≥ XB XA ≥ 0, XB ≥ 0 Example (Optimization Problem) “the units of B may not exceed two plus twice the units of A.”

slide-13
SLIDE 13

Integer Programs Linear Programs Summary

Integer Program: Example

Let XA and XB be the (integer) number of produced A and B Example (Optimization Problem as Integer Program) maximize XA + 5XB subject to 2 + 2XA ≥ XB XA + XB ≤ 12 XA ≥ 0, XB ≥ 0 Example (Optimization Problem) “The factory can produce at most 12 units per day”

slide-14
SLIDE 14

Integer Programs Linear Programs Summary

Integer Program: Example

Let XA and XB be the (integer) number of produced A and B Example (Optimization Problem as Integer Program) maximize XA + 5XB subject to 2 + 2XA ≥ XB XA + XB ≤ 12 XA ≤ 6 XA ≥ 0, XB ≥ 0 Example (Optimization Problem) “There is only material for 6 units of A”

slide-15
SLIDE 15

Integer Programs Linear Programs Summary

Integer Program: Example

Let XA and XB be the (integer) number of produced A and B Example (Optimization Problem as Integer Program) maximize XA + 5XB subject to 2 + 2XA ≥ XB XA + XB ≤ 12 XA ≤ 6 XA ≥ 0, XB ≥ 0 unique optimal solution: produce 4 A (XA = 4) and 8 B (XB = 8) for a profit of 44

slide-16
SLIDE 16

Integer Programs Linear Programs Summary

Integer Program Example: Visualization

1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 XA XB

slide-17
SLIDE 17

Integer Programs Linear Programs Summary

Integer Program Example: Visualization

1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9

XA ≥ 0 XB ≥ 0

XA XB

slide-18
SLIDE 18

Integer Programs Linear Programs Summary

Integer Program Example: Visualization

1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9

XA ≥ 0 XB ≥ 0 2 + 2XA ≥ XB

XA XB

slide-19
SLIDE 19

Integer Programs Linear Programs Summary

Integer Program Example: Visualization

1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9

XA ≥ 0 XB ≥ 0 2 + 2XA ≥ XB XA + XB ≤ 12

XA XB

slide-20
SLIDE 20

Integer Programs Linear Programs Summary

Integer Program Example: Visualization

1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9

XA ≥ 0 XB ≥ 0 XA ≤ 6 2 + 2 X

A

≥ X

B

XA + XB ≤ 1 2

XA XB

slide-21
SLIDE 21

Integer Programs Linear Programs Summary

Integer Program Example: Visualization

1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9

XA ≥ 0 XB ≥ 0 XA ≤ 6 2 + 2 X

A

≥ X

B

XA + XB ≤ 1 2

XA XB

slide-22
SLIDE 22

Integer Programs Linear Programs Summary

Integer Program Example: Visualization

1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9

XA ≥ 0 XB ≥ 0 XA ≤ 6 2 + 2 X

A

≥ X

B

XA + XB ≤ 1 2

XA XB

slide-23
SLIDE 23

Integer Programs Linear Programs Summary

Integer Program Example: Visualization

1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9

XA ≥ 0 XB ≥ 0 XA ≤ 6 2 + 2 X

A

≥ X

B

XA + XB ≤ 1 2

XA XB

slide-24
SLIDE 24

Integer Programs Linear Programs Summary

Integer Programs

Integer Program An integer program (IP) consists of: a finite set of integer-valued variables V a finite set of linear inequalities (constraints) over V an objective function, which is a linear combination of V which should be minimized or maximized.

slide-25
SLIDE 25

Integer Programs Linear Programs Summary

Terminology

An integer assignment to all variables in V is feasible if it satisfies the constraints. An integer program is feasible if there is such a feasible

  • assignment. Otherwise it is infeasible.

A feasible maximum (resp. minimum) problem is unbounded if the objective function can assume arbitrarily large positive (resp. negative) values at feasible assignments. Otherwise it is bounded. The objective value of a bounded feasible maximum (resp. minimum) problem is the maximum (resp. minimum) value of the objective function with a feasible assignment.

slide-26
SLIDE 26

Integer Programs Linear Programs Summary

Three classes of IPs

IPs fall into three classes: bounded feasible: IP is solvable and optimal solutions exist unbounded feasible: IP is solvable and arbitrarily good solutions exist infeasible: IP is unsolvable

slide-27
SLIDE 27

Integer Programs Linear Programs Summary

Another Example

Example minimize 3Xo1 + 4Xo2 + 5Xo3 subject to Xo4 ≥ 1 Xo1 + Xo2 ≥ 1 Xo1 + Xo3 ≥ 1 Xo2 + Xo3 ≥ 1 Xo1 ≥ 0, Xo2 ≥ 0, Xo3 ≥ 0, Xo4 ≥ 0 What example from a previous chapter does this IP encode? the minimum hitting set from Chapter E2

slide-28
SLIDE 28

Integer Programs Linear Programs Summary

Another Example

Example minimize 3Xo1 + 4Xo2 + 5Xo3 subject to Xo4 ≥ 1 Xo1 + Xo2 ≥ 1 Xo1 + Xo3 ≥ 1 Xo2 + Xo3 ≥ 1 Xo1 ≥ 0, Xo2 ≥ 0, Xo3 ≥ 0, Xo4 ≥ 0 What example from a previous chapter does this IP encode? the minimum hitting set from Chapter E2

slide-29
SLIDE 29

Integer Programs Linear Programs Summary

Complexity of solving Integer Programs

As an IP can compute an MHS, solving an IP must be at least as complex as computing an MHS Reminder: MHS is a “classical” NP-complete problem Good news: Solving an IP is not harder Finding solutions for IPs is NP-complete. Removing the requirement that solutions must be integer-valued leads to a simpler problem

slide-30
SLIDE 30

Integer Programs Linear Programs Summary

Complexity of solving Integer Programs

As an IP can compute an MHS, solving an IP must be at least as complex as computing an MHS Reminder: MHS is a “classical” NP-complete problem Good news: Solving an IP is not harder Finding solutions for IPs is NP-complete. Removing the requirement that solutions must be integer-valued leads to a simpler problem

slide-31
SLIDE 31

Integer Programs Linear Programs Summary

Linear Programs

slide-32
SLIDE 32

Integer Programs Linear Programs Summary

Linear Programs

Linear Program A linear program (LP) consists of: a finite set of real-valued variables V a finite set of linear inequalities (constraints) over V an objective function, which is a linear combination of V which should be minimized or maximized. We use the introduced IP terminology also for LPs. Mixed IPs (MIPs) generalize IPs and LPs: some variables are integer-values, some are real-valued.

slide-33
SLIDE 33

Integer Programs Linear Programs Summary

Linear Program: Example

Let XA and XB be the (real-valued) number of produced A and B Example (Optimization Problem as Linear Program) maximize XA + 5XB subject to 2 + 2XA ≥ XB XA + XB ≤ 12 XA ≤ 6 XA ≥ 0, XB ≥ 0 unique optimal solution: XA = 31

3 and XB = 82 3 with objective value 46 2 3

slide-34
SLIDE 34

Integer Programs Linear Programs Summary

Linear Program: Example

Let XA and XB be the (real-valued) number of produced A and B Example (Optimization Problem as Linear Program) maximize XA + 5XB subject to 2 + 2XA ≥ XB XA + XB ≤ 12 XA ≤ 6 XA ≥ 0, XB ≥ 0 unique optimal solution: XA = 31

3 and XB = 82 3 with objective value 46 2 3

slide-35
SLIDE 35

Integer Programs Linear Programs Summary

Linear Program Example: Visualization

1 2 3 4 5 6 2 4 6 8

XA ≥ 0 XB ≥ 0 XA ≤ 6 2 + 2 X

A

≥ X

B

XA + XB ≤ 12

XA XB

slide-36
SLIDE 36

Integer Programs Linear Programs Summary

Solving Linear Programs

Observation: For an maximization problem, the objective value of the LP is not lower than the one of the IP. Complexity: LP solving is a polynomial-time problem. Common idea: Approximate IP objective value with corresponding LP (LP relaxation).

slide-37
SLIDE 37

Integer Programs Linear Programs Summary

Solving Linear Programs

Observation: For an maximization problem, the objective value of the LP is not lower than the one of the IP. Complexity: LP solving is a polynomial-time problem. Common idea: Approximate IP objective value with corresponding LP (LP relaxation).

slide-38
SLIDE 38

Integer Programs Linear Programs Summary

Solving Linear Programs

Observation: For an maximization problem, the objective value of the LP is not lower than the one of the IP. Complexity: LP solving is a polynomial-time problem. Common idea: Approximate IP objective value with corresponding LP (LP relaxation).

slide-39
SLIDE 39

Integer Programs Linear Programs Summary

LP Relaxation

Theorem (LP Relaxation) The LP relaxation of an integer program is the problem that arises by removing the requirement that variables are integer-valued. For a maximization (resp. minimization) problem, the objective value of the LP relaxation is an upper (resp. lower) bound on the value of the IP. Proof idea. Every feasible assignment for the IP is also feasible for the LP.

slide-40
SLIDE 40

Integer Programs Linear Programs Summary

LP Relaxation of MHS heuristic

Example (Minimum Hitting Set) minimize 3Xo1 + 4Xo2 + 5Xo3 subject to Xo4 ≥ 1 Xo1 + Xo2 ≥ 1 Xo1 + Xo3 ≥ 1 Xo2 + Xo3 ≥ 1 Xo1 ≥ 0, Xo2 ≥ 0, Xo3 ≥ 0, Xo4 ≥ 0

  • ptimal solution of LP relaxation:

Xo4 = 1 and Xo1 = Xo2 = Xo3 = 0.5 with objective value 6 LP relaxation of MHS heuristic is admissible and can be computed in polynomial time

slide-41
SLIDE 41

Integer Programs Linear Programs Summary

Some LP Theory: Duality

Every LP has an alternative view (its dual LP). roughly: variables and constraints swap roles roughly: objective coefficients and bounds swap roles dual of maximization LP is minimization LP and vice versa dual of dual: original LP

slide-42
SLIDE 42

Integer Programs Linear Programs Summary

Duality Theorem

Theorem (Duality Theorem) If a linear program is bounded feasible, then so is its dual, and their objective values are equal. (Proof omitted.) The dual provides a different perspective on a problem.

slide-43
SLIDE 43

Integer Programs Linear Programs Summary

Summary

slide-44
SLIDE 44

Integer Programs Linear Programs Summary

Summary

Linear (and integer) programs consist of an objective function that should be maximized or minimized subject to a set of given linear constraints. Finding solutions for integer programs is NP-complete. LP solving is a polynomial time problem. The dual of a maximization LP is a minimization LP and vice versa. The dual of a bounded feasible LP has the same objective value.

slide-45
SLIDE 45

Integer Programs Linear Programs Summary

Further Reading

The slides in this chapter are based on the following excellent tutorial on LP solving: Thomas S. Ferguson. Linear Programming – A Concise Introduction. UCLA, unpublished document available online.