CS 473: Algorithms Chandra Chekuri Ruta Mehta University of - - PowerPoint PPT Presentation

cs 473 algorithms
SMART_READER_LITE
LIVE PREVIEW

CS 473: Algorithms Chandra Chekuri Ruta Mehta University of - - PowerPoint PPT Presentation

CS 473: Algorithms Chandra Chekuri Ruta Mehta University of Illinois, Urbana-Champaign Fall 2016 Chandra & Ruta (UIUC) CS473 1 Fall 2016 1 / 39 CS 473: Algorithms, Fall 2016 Simplex and LP Duality Lecture 19 October 28, 2016


slide-1
SLIDE 1

CS 473: Algorithms

Chandra Chekuri Ruta Mehta

University of Illinois, Urbana-Champaign

Fall 2016

Chandra & Ruta (UIUC) CS473 1 Fall 2016 1 / 39

slide-2
SLIDE 2

CS 473: Algorithms, Fall 2016

Simplex and LP Duality

Lecture 19

October 28, 2016

Chandra & Ruta (UIUC) CS473 2 Fall 2016 2 / 39

slide-3
SLIDE 3

Outline

Simplex: Intuition and Implementation Details Computing starting vertex: equivalent to solving an LP! Infeasibility, Unboundedness, and Degeneracy. Duality: Bounding the objective value through weak-duality Strong Duality, Cone view.

Chandra & Ruta (UIUC) CS473 3 Fall 2016 3 / 39

slide-4
SLIDE 4

Part I Recall

Chandra & Ruta (UIUC) CS473 4 Fall 2016 4 / 39

slide-5
SLIDE 5

Feasible Region and Convexity

Canonical Form

Given A ∈ Rn×d, b ∈ Rn×1 and c ∈ R1×d, find x ∈ Rd×1 max : c · x s.t. Ax ≤ b

Chandra & Ruta (UIUC) CS473 5 Fall 2016 5 / 39

slide-6
SLIDE 6

Linear Inequalities Define a Polyhedron

If

j aijxj ≤ bi hold we equality, we say the constraint/hyperplane i

is tight

Chandra & Ruta (UIUC) CS473 6 Fall 2016 6 / 39

slide-7
SLIDE 7

Vertex Solution

Optimizing linear objective over a polyhedron ⇒ Vertex solution

Chandra & Ruta (UIUC) CS473 7 Fall 2016 7 / 39

slide-8
SLIDE 8

Vertex Solution

Optimizing linear objective over a polyhedron ⇒ Vertex solution Basic Feasible Solution: feasible, and d linearly independent tight constraints.

Chandra & Ruta (UIUC) CS473 7 Fall 2016 7 / 39

slide-9
SLIDE 9

Summary

1

Each linear constraint defines a halfspace.

2

Feasible region, which is an intersection of halfspaces, is a convex polyhedron.

3

Optimal value attained at a vertex of the polyhedron.

Chandra & Ruta (UIUC) CS473 8 Fall 2016 8 / 39

slide-10
SLIDE 10

Part II Simplex

Chandra & Ruta (UIUC) CS473 9 Fall 2016 9 / 39

slide-11
SLIDE 11

Simplex Algorithm

Simplex: Vertex hoping algorithm

Chandra & Ruta (UIUC) CS473 10 Fall 2016 10 / 39

slide-12
SLIDE 12

Simplex Algorithm

Simplex: Vertex hoping algorithm Moves from a vertex to its neighboring vertex

Chandra & Ruta (UIUC) CS473 10 Fall 2016 10 / 39

slide-13
SLIDE 13

Simplex Algorithm

Simplex: Vertex hoping algorithm Moves from a vertex to its neighboring vertex

Questions

Which neighbor to move to? When to stop? How much time does it take?

Chandra & Ruta (UIUC) CS473 10 Fall 2016 10 / 39

slide-14
SLIDE 14

Observations

For Simplex

Suppose we are at a non-optimal vertex ˆ x and optimal is x∗, then c · x∗ > c · ˆ x.

Chandra & Ruta (UIUC) CS473 11 Fall 2016 11 / 39

slide-15
SLIDE 15

Observations

For Simplex

Suppose we are at a non-optimal vertex ˆ x and optimal is x∗, then c · x∗ > c · ˆ x. How does (c · x) change as we move from ˆ x to x∗ on the line joining the two?

Chandra & Ruta (UIUC) CS473 11 Fall 2016 11 / 39

slide-16
SLIDE 16

Observations

For Simplex

Suppose we are at a non-optimal vertex ˆ x and optimal is x∗, then c · x∗ > c · ˆ x. How does (c · x) change as we move from ˆ x to x∗ on the line joining the two? Strictly increases!

Chandra & Ruta (UIUC) CS473 11 Fall 2016 11 / 39

slide-17
SLIDE 17

Observations

For Simplex

Suppose we are at a non-optimal vertex ˆ x and optimal is x∗, then c · x∗ > c · ˆ x. How does (c · x) change as we move from ˆ x to x∗ on the line joining the two? Strictly increases! d = x∗ − ˆ x is the direction from ˆ x to x∗. (c · d) = (c · x∗) − (c · ˆ x) > 0. In x = ˆ x + δd, as δ goes from 0 to 1, we move from ˆ x to x∗. c · x = c · ˆ x + δ(c · d). Strictly increasing with δ! Due to convexity, all of these are feasible points.

Chandra & Ruta (UIUC) CS473 11 Fall 2016 11 / 39

slide-18
SLIDE 18

Cone

Definition

Given a set of vectors D = {d1, . . . , dk}, the cone spanned by them is just their positive linear combinations, i.e., cone(D) = {d | d =

k

  • i=1

λidi, where λi ≥ 0, ∀i}

  • Chandra & Ruta (UIUC)

CS473 12 Fall 2016 12 / 39

slide-19
SLIDE 19

Cone at a Vertex

Let z1, . . . , zk be the neighboring vertices of ˆ

  • x. And let di = zi − ˆ

x be the direction from ˆ x to zi.

Lemma

Any feasible direction of movement d from ˆ x is in the cone({d1, . . . , dk}).

  • Chandra & Ruta (UIUC)

CS473 13 Fall 2016 13 / 39

slide-20
SLIDE 20

Improving Direction Implies Improving Neighbor

Lemma

If d ∈ cone({d1, . . . , dk}) and (c · d) > 0, then there exists di such that (c · di) > 0.

Chandra & Ruta (UIUC) CS473 14 Fall 2016 14 / 39

slide-21
SLIDE 21

Improving Direction Implies Improving Neighbor

Lemma

If d ∈ cone({d1, . . . , dk}) and (c · d) > 0, then there exists di such that (c · di) > 0.

Proof.

To the contrary suppose (c · di) ≤ 0, ∀i ≤ k. Since d is a positive linear combination of di’s, (c · d) = (c · k

i=1 λidi)

= k

i=1 λi(c · di)

≤ 0 A contradiction!

Chandra & Ruta (UIUC) CS473 14 Fall 2016 14 / 39

slide-22
SLIDE 22

Improving Direction Implies Improving Neighbor

Lemma

If d ∈ cone({d1, . . . , dk}) and (c · d) > 0, then there exists di such that (c · di) > 0.

Proof.

To the contrary suppose (c · di) ≤ 0, ∀i ≤ k. Since d is a positive linear combination of di’s, (c · d) = (c · k

i=1 λidi)

= k

i=1 λi(c · di)

≤ 0 A contradiction!

Theorem

If vertex ˆ x is not optimal then it has a neighbor where cost improves.

Chandra & Ruta (UIUC) CS473 14 Fall 2016 14 / 39

slide-23
SLIDE 23

How Many Neighbors a Vertex Has?

Geometric view...

A ∈ Rn×d (n > d), b ∈ Rn, the constraints are: Ax ≤ b

Faces

Vertex: 0-dimensional face. Edge: 1D face. . . . Hyperplane: (d − 1)D face.

Chandra & Ruta (UIUC) CS473 15 Fall 2016 15 / 39

slide-24
SLIDE 24

How Many Neighbors a Vertex Has?

Geometric view...

A ∈ Rn×d (n > d), b ∈ Rn, the constraints are: Ax ≤ b

Faces

Vertex: 0-dimensional face. Edge: 1D face. . . . Hyperplane: (d − 1)D face. r linearly independent tight hyperplanes forms d − r dimensional face.

Chandra & Ruta (UIUC) CS473 15 Fall 2016 15 / 39

slide-25
SLIDE 25

How Many Neighbors a Vertex Has?

Geometric view...

A ∈ Rn×d (n > d), b ∈ Rn, the constraints are: Ax ≤ b

Faces

Vertex: 0-dimensional face. Edge: 1D face. . . . Hyperplane: (d − 1)D face. r linearly independent tight hyperplanes forms d − r dimensional face. Vertices being of 0D, d L.I. tight hyperplanes.

Chandra & Ruta (UIUC) CS473 15 Fall 2016 15 / 39

slide-26
SLIDE 26

How Many Neighbors a Vertex Has?

Geometric view...

A ∈ Rn×d (n > d), b ∈ Rn, the constraints are: Ax ≤ b

Faces

Vertex: 0-dimensional face. Edge: 1D face. . . . Hyperplane: (d − 1)D face. r linearly independent tight hyperplanes forms d − r dimensional face. Vertices being of 0D, d L.I. tight hyperplanes. In 2-dimension (d = 2) x2 x1 300 200

Chandra & Ruta (UIUC) CS473 15 Fall 2016 15 / 39

slide-27
SLIDE 27

How Many Neighbors a Vertex Has?

Geometric view...

A ∈ Rn×d (n > d), b ∈ Rn, the constraints are: Ax ≤ b

Faces

Vertex: 0-dimensional face. Edge: 1D face. . . . Hyperplane: (d − 1)D face. r linearly independent tight constraints forms d − r dimensional face. Vertices (Basic feasible solution) has d L.I. tight constraints. In 3-dimension (d = 3)

① ② ③

image source: webpage of Prof. Forbes W. Lewis Chandra & Ruta (UIUC) CS473 16 Fall 2016 16 / 39

slide-28
SLIDE 28

How Many Neighbors a Vertex Has?

Geometry view...

One neighbor per tight hyperplane. Therefore typically d. Suppose x′ is a neighbor of ˆ x, then on the edge joining the two d − 1 constraints are tight. These d − 1 are also tight at both ˆ x and x′. One more constraints, say i, is tight at ˆ

  • x. “Relaxing” i at

ˆ x leads to x′.

① ② ③

x

Chandra & Ruta (UIUC) CS473 17 Fall 2016 17 / 39

slide-29
SLIDE 29

Simplex Algorithm

Simplex: Vertex hoping algorithm Moves from a vertex to its neighboring vertex

Questions + Answers

Which neighbor to move to? One where objective value increases.

Chandra & Ruta (UIUC) CS473 18 Fall 2016 18 / 39

slide-30
SLIDE 30

Simplex Algorithm

Simplex: Vertex hoping algorithm Moves from a vertex to its neighboring vertex

Questions + Answers

Which neighbor to move to? One where objective value increases. When to stop? When no neighbor with better objective value.

Chandra & Ruta (UIUC) CS473 18 Fall 2016 18 / 39

slide-31
SLIDE 31

Simplex Algorithm

Simplex: Vertex hoping algorithm Moves from a vertex to its neighboring vertex

Questions + Answers

Which neighbor to move to? One where objective value increases. When to stop? When no neighbor with better objective value. How much time does it take? At most d neighbors to consider in each step.

Chandra & Ruta (UIUC) CS473 18 Fall 2016 18 / 39

slide-32
SLIDE 32

Simplex in Higher Dimensions

Simplex Algorithm

1

Start at a vertex of the polytope.

2

Compare value of objective function at each of the d “neighbors”.

3

Move to neighbor that improves objective function, and repeat step 2.

4

If no improving neighbor, then stop.

Chandra & Ruta (UIUC) CS473 19 Fall 2016 19 / 39

slide-33
SLIDE 33

Simplex in Higher Dimensions

Simplex Algorithm

1

Start at a vertex of the polytope.

2

Compare value of objective function at each of the d “neighbors”.

3

Move to neighbor that improves objective function, and repeat step 2.

4

If no improving neighbor, then stop. Simplex is a greedy local-improvement algorithm! Works because a local optimum is also a global optimum — convexity of polyhedra.

Chandra & Ruta (UIUC) CS473 19 Fall 2016 19 / 39

slide-34
SLIDE 34

Part III Implementation of the Pivoting Step (Moving to an improving neighbor)

Chandra & Ruta (UIUC) CS473 20 Fall 2016 20 / 39

slide-35
SLIDE 35

Moving to a Neighbor

Fix a vertex ˆ

  • x. Let the d hyperplanes/constraints tight at ˆ

x be,

d

  • j=1

aijxj = bi, 1 ≤ i ≤ d Equivalently, ˆ Ax = ˆ b A neighbor vertex x′ is connected to ˆ x by an edge. d − 1 hyperplanes tight on this edge. To reach x′, one hyperplane has to be relaxed, while maintaining other d − 1 tight.

① ② ③

x

Chandra & Ruta (UIUC) CS473 21 Fall 2016 21 / 39

slide-36
SLIDE 36

Moving to a Neighbor (Contd.)

−ˆ A

−1 =

   . . . . . . d1 . . . dd . . . . . .   

Lemma

Moving in direction di from ˆ x, all except constraint i remain tight.

Proof.

For a small ǫ > 0, let y = ˆ x + ǫ(di), then ˆ Ay = ˆ A(ˆ x + ǫdi) = ˆ Aˆ x + ǫˆ A(−ˆ A

−1)(.,i)

Chandra & Ruta (UIUC) CS473 22 Fall 2016 22 / 39

slide-37
SLIDE 37

Moving to a Neighbor (Contd.)

−ˆ A

−1 =

   . . . . . . d1 . . . dd . . . . . .   

Lemma

Moving in direction di from ˆ x, all except constraint i remain tight.

Proof.

For a small ǫ > 0, let y = ˆ x + ǫ(di), then ˆ Ay = ˆ A(ˆ x + ǫdi) = ˆ Aˆ x + ǫˆ A(−ˆ A

−1)(.,i)

= ˆ b + ǫ[0, . . . , −1, . . . , 0]T Clearly,

j akjyj = bk, ∀k = i, and j aijyj = bi − ǫ < bi.

Thus, di is the direction on the edge obtained by relaxing hyperplane

Chandra & Ruta (UIUC) CS473 22 Fall 2016 22 / 39

slide-38
SLIDE 38

Computing the Neighbor

Move in di direction from ˆ x, i.e., ˆ x + ǫdi, and STOP when hit a new hyperplane! Need to ensure feasibility. Above lemma implies inequalities 1 through d will be satisfied. For any k > d, where Ak is kth row of A, Ak · (ˆ x + ǫdi) ≤ bk ⇒ (Ak · ˆ x) + ǫ(Ak · di) ≤ bk ⇒ ǫ(Ak · di) ≤ bk − (Ak · ˆ x)

Chandra & Ruta (UIUC) CS473 23 Fall 2016 23 / 39

slide-39
SLIDE 39

Computing the Neighbor

Move in di direction from ˆ x, i.e., ˆ x + ǫdi, and STOP when hit a new hyperplane! Need to ensure feasibility. Above lemma implies inequalities 1 through d will be satisfied. For any k > d, where Ak is kth row of A, Ak · (ˆ x + ǫdi) ≤ bk ⇒ (Ak · ˆ x) + ǫ(Ak · di) ≤ bk ⇒ ǫ(Ak · di) ≤ bk − (Ak · ˆ x) (If (Ak · di) > 0) ⇒ ǫ ≤ bk−(Ak·ˆ x)

Ak·di

Chandra & Ruta (UIUC) CS473 23 Fall 2016 23 / 39

slide-40
SLIDE 40

Computing the Neighbor

Move in di direction from ˆ x, i.e., ˆ x + ǫdi, and STOP when hit a new hyperplane! Need to ensure feasibility. Above lemma implies inequalities 1 through d will be satisfied. For any k > d, where Ak is kth row of A, Ak · (ˆ x + ǫdi) ≤ bk ⇒ (Ak · ˆ x) + ǫ(Ak · di) ≤ bk ⇒ ǫ(Ak · di) ≤ bk − (Ak · ˆ x) (If (Ak · di) > 0) ⇒ ǫ ≤ bk−(Ak·ˆ x)

Ak·di

(positive) If moving towards hyperplane k

Chandra & Ruta (UIUC) CS473 23 Fall 2016 23 / 39

slide-41
SLIDE 41

Computing the Neighbor

Move in di direction from ˆ x, i.e., ˆ x + ǫdi, and STOP when hit a new hyperplane! Need to ensure feasibility. Above lemma implies inequalities 1 through d will be satisfied. For any k > d, where Ak is kth row of A, Ak · (ˆ x + ǫdi) ≤ bk ⇒ (Ak · ˆ x) + ǫ(Ak · di) ≤ bk ⇒ ǫ(Ak · di) ≤ bk − (Ak · ˆ x) (If (Ak · di) > 0) ⇒ ǫ ≤ bk−(Ak·ˆ x)

Ak·di

(positive) If moving towards hyperplane k (If (Ak · di) < 0) ⇒ ǫ ≥ bk−(Ak·ˆ x)

Ak·di

(negative) If moving away from hyperplane k. No upper bound, and -ve lower bound!

Chandra & Ruta (UIUC) CS473 23 Fall 2016 23 / 39

slide-42
SLIDE 42

Computing the Neighbor

Algorithm

NextVertex(ˆ x, di) Set ǫ ← ∞. For k = d + 1 . . . n ǫ′ ← bk−(Ak·ˆ x)

Ak·di

If ǫ′ > 0 and ǫ′ < ǫ then set ǫ ← ǫ′ If ǫ < ∞ then return ˆ x + ǫdi. Else return null. If (c · di) > 0 then the algorithm returns an improving neighbor.

Chandra & Ruta (UIUC) CS473 24 Fall 2016 24 / 39

slide-43
SLIDE 43

Factory Example

max : x1 + 6x2 s.t. 0 ≤ x1 ≤ 200 0 ≤ x2 ≤ 300 x1 + x2 ≤ 400 ˆ x = (0, 0)

Chandra & Ruta (UIUC) CS473 25 Fall 2016 25 / 39

slide-44
SLIDE 44

Factory Example

max : x1 + 6x2 s.t. 0 ≤ x1 ≤ 200 0 ≤ x2 ≤ 300 x1 + x2 ≤ 400 ˆ x = (0, 0) ˆ A = −1 −1

  • −ˆ

A

−1 =

1 1

  • = [d1 d2]

Chandra & Ruta (UIUC) CS473 25 Fall 2016 25 / 39

slide-45
SLIDE 45

Factory Example

max : x1 + 6x2 s.t. 0 ≤ x1 ≤ 200 0 ≤ x2 ≤ 300 x1 + x2 ≤ 400 ˆ x = (0, 0) ˆ A = −1 −1

  • −ˆ

A

−1 =

1 1

  • = [d1 d2]

Moving in direction d1 gives (200, 0)

Chandra & Ruta (UIUC) CS473 25 Fall 2016 25 / 39

slide-46
SLIDE 46

Factory Example

max : x1 + 6x2 s.t. 0 ≤ x1 ≤ 200 0 ≤ x2 ≤ 300 x1 + x2 ≤ 400 ˆ x = (0, 0) ˆ A = −1 −1

  • −ˆ

A

−1 =

1 1

  • = [d1 d2]

Moving in direction d1 gives (200, 0) Moving in direction d2 gives (0, 300).

Chandra & Ruta (UIUC) CS473 25 Fall 2016 25 / 39

slide-47
SLIDE 47

Computing Starting Vertex

Equivalent to solving another LP!

Find an x such that Ax ≤ b. If b ≥ 0 then trivial!

Chandra & Ruta (UIUC) CS473 26 Fall 2016 26 / 39

slide-48
SLIDE 48

Computing Starting Vertex

Equivalent to solving another LP!

Find an x such that Ax ≤ b. If b ≥ 0 then trivial! x = 0. Otherwise.

Chandra & Ruta (UIUC) CS473 26 Fall 2016 26 / 39

slide-49
SLIDE 49

Computing Starting Vertex

Equivalent to solving another LP!

Find an x such that Ax ≤ b. If b ≥ 0 then trivial! x = 0. Otherwise. min : s s.t.

  • j aijxj − s ≤ bi,

∀i s ≥ 0 Trivial feasible solution:

Chandra & Ruta (UIUC) CS473 26 Fall 2016 26 / 39

slide-50
SLIDE 50

Computing Starting Vertex

Equivalent to solving another LP!

Find an x such that Ax ≤ b. If b ≥ 0 then trivial! x = 0. Otherwise. min : s s.t.

  • j aijxj − s ≤ bi,

∀i s ≥ 0 Trivial feasible solution: x = 0, s = | mini bi|.

Chandra & Ruta (UIUC) CS473 26 Fall 2016 26 / 39

slide-51
SLIDE 51

Computing Starting Vertex

Equivalent to solving another LP!

Find an x such that Ax ≤ b. If b ≥ 0 then trivial! x = 0. Otherwise. min : s s.t.

  • j aijxj − s ≤ bi,

∀i s ≥ 0 Trivial feasible solution: x = 0, s = | mini bi|. If Ax ≤ b feasible then optimal value of the above LP is s = 0.

Chandra & Ruta (UIUC) CS473 26 Fall 2016 26 / 39

slide-52
SLIDE 52

Solving Linear Programming in Practice

1

Na¨ ıve implementation of Simplex algorithm can be very inefficient

Chandra & Ruta (UIUC) CS473 27 Fall 2016 27 / 39

slide-53
SLIDE 53

Solving Linear Programming in Practice

1

Na¨ ıve implementation of Simplex algorithm can be very inefficient – Exponential number of steps!

Chandra & Ruta (UIUC) CS473 27 Fall 2016 27 / 39

slide-54
SLIDE 54

Solving Linear Programming in Practice

1

Na¨ ıve implementation of Simplex algorithm can be very inefficient

1

Choosing which neighbor to move to can significantly affect running time

2

Very efficient Simplex-based algorithms exist

3

Simplex algorithm takes exponential time in the worst case but works extremely well in practice with many improvements over the years

2

Non Simplex based methods like interior point methods work well for large problems.

Chandra & Ruta (UIUC) CS473 28 Fall 2016 28 / 39

slide-55
SLIDE 55

Polynomial time Algorithm for Linear Programming

Major open problem for many years: is there a polynomial time algorithm for linear programming?

Chandra & Ruta (UIUC) CS473 29 Fall 2016 29 / 39

slide-56
SLIDE 56

Polynomial time Algorithm for Linear Programming

Major open problem for many years: is there a polynomial time algorithm for linear programming? Leonid Khachiyan in 1979 gave the first polynomial time algorithm using the Ellipsoid method.

1

major theoretical advance

2

highly impractical algorithm, not used at all in practice

3

routinely used in theoretical proofs.

Chandra & Ruta (UIUC) CS473 29 Fall 2016 29 / 39

slide-57
SLIDE 57

Polynomial time Algorithm for Linear Programming

Major open problem for many years: is there a polynomial time algorithm for linear programming? Leonid Khachiyan in 1979 gave the first polynomial time algorithm using the Ellipsoid method.

1

major theoretical advance

2

highly impractical algorithm, not used at all in practice

3

routinely used in theoretical proofs. Narendra Karmarkar in 1984 developed another polynomial time algorithm, the interior point method.

1

very practical for some large problems and beats simplex

2

also revolutionized theory of interior point methods

Chandra & Ruta (UIUC) CS473 29 Fall 2016 29 / 39

slide-58
SLIDE 58

Polynomial time Algorithm for Linear Programming

Major open problem for many years: is there a polynomial time algorithm for linear programming? Leonid Khachiyan in 1979 gave the first polynomial time algorithm using the Ellipsoid method.

1

major theoretical advance

2

highly impractical algorithm, not used at all in practice

3

routinely used in theoretical proofs. Narendra Karmarkar in 1984 developed another polynomial time algorithm, the interior point method.

1

very practical for some large problems and beats simplex

2

also revolutionized theory of interior point methods Following interior point method success, Simplex has been improved enormously and is the method of choice.

Chandra & Ruta (UIUC) CS473 29 Fall 2016 29 / 39

slide-59
SLIDE 59

Degeneracy

1

The linear program could be infeasible: No points satisfy the constraints.

2

The linear program could be unbounded: Polygon unbounded in the direction of the objective function.

3

More than d hyperplanes could be tight at a vertex, forming more than d neighbors.

Chandra & Ruta (UIUC) CS473 30 Fall 2016 30 / 39

slide-60
SLIDE 60

Infeasibility: Example

maximize x1 + 6x2 subject to x1 ≤ 2 x2 ≤ 1 x1 + x2 ≥ 4 x1, x2 ≥ 0 Infeasibility has to do only with constraints.

Chandra & Ruta (UIUC) CS473 31 Fall 2016 31 / 39

slide-61
SLIDE 61

Infeasibility: Example

maximize x1 + 6x2 subject to x1 ≤ 2 x2 ≤ 1 x1 + x2 ≥ 4 x1, x2 ≥ 0 Infeasibility has to do only with constraints. No starting vertex for Simplex. How to detect this?

Chandra & Ruta (UIUC) CS473 31 Fall 2016 31 / 39

slide-62
SLIDE 62

Infeasibility: Example

maximize x1 + 6x2 subject to x1 ≤ 2 x2 ≤ 1 x1 + x2 ≥ 4 x1, x2 ≥ 0 Infeasibility has to do only with constraints. No starting vertex for Simplex. How to detect this? LP min : s s.t.

  • j aijxj − s ≤ bi,

∀i s ≥ 0 to find a feasible point will have positive optimal.

Chandra & Ruta (UIUC) CS473 31 Fall 2016 31 / 39

slide-63
SLIDE 63

Unboundedness: Example

maximize x2 x1 + x2 ≥ 2 x1, x2 ≥ Unboundedness depends on both constraints and the objective function.

Chandra & Ruta (UIUC) CS473 32 Fall 2016 32 / 39

slide-64
SLIDE 64

Unboundedness: Example

maximize x2 x1 + x2 ≥ 2 x1, x2 ≥ Unboundedness depends on both constraints and the objective function. If unbounded in the direction of objective function, then NextVertex will eventually return null

Chandra & Ruta (UIUC) CS473 32 Fall 2016 32 / 39

slide-65
SLIDE 65

Degeneracy and Cycling

More than d constraints are tight at vertex ˆ

  • x. Say d + 1.

Suppose, we pick first d to form ˆ A, and compute directions d1, . . . , dd.

Chandra & Ruta (UIUC) CS473 33 Fall 2016 33 / 39

slide-66
SLIDE 66

Degeneracy and Cycling

More than d constraints are tight at vertex ˆ

  • x. Say d + 1.

Suppose, we pick first d to form ˆ A, and compute directions d1, . . . , dd. Then NextVertex(ˆ x, di) will encounter (d + 1)th constraint with ǫ = 0 as an upper bound. Hence it will return ˆ x again.

Chandra & Ruta (UIUC) CS473 33 Fall 2016 33 / 39

slide-67
SLIDE 67

Degeneracy and Cycling

More than d constraints are tight at vertex ˆ

  • x. Say d + 1.

Suppose, we pick first d to form ˆ A, and compute directions d1, . . . , dd. Then NextVertex(ˆ x, di) will encounter (d + 1)th constraint with ǫ = 0 as an upper bound. Hence it will return ˆ x again. Same phenomenon will repeat!

Chandra & Ruta (UIUC) CS473 33 Fall 2016 33 / 39

slide-68
SLIDE 68

Degeneracy and Cycling

More than d constraints are tight at vertex ˆ

  • x. Say d + 1.

Suppose, we pick first d to form ˆ A, and compute directions d1, . . . , dd. Then NextVertex(ˆ x, di) will encounter (d + 1)th constraint with ǫ = 0 as an upper bound. Hence it will return ˆ x again. Same phenomenon will repeat! This can be avoided by adding small random perturbation to bis.

Chandra & Ruta (UIUC) CS473 33 Fall 2016 33 / 39

slide-69
SLIDE 69

Feasible Solutions and Lower Bounds

Consider the program maximize 4x1+ 2x2 subject to x1+ 3x2 ≤ 5 2x1− 4x2 ≤ 10 x1+ x2 ≤ 7 x1 ≤ 5

Chandra & Ruta (UIUC) CS473 34 Fall 2016 34 / 39

slide-70
SLIDE 70

Feasible Solutions and Lower Bounds

Consider the program maximize 4x1+ 2x2 subject to x1+ 3x2 ≤ 5 2x1− 4x2 ≤ 10 x1+ x2 ≤ 7 x1 ≤ 5

1

(0, 1) satisfies all the constraints and gives value 2 for the

  • bjective function.

Chandra & Ruta (UIUC) CS473 34 Fall 2016 34 / 39

slide-71
SLIDE 71

Feasible Solutions and Lower Bounds

Consider the program maximize 4x1+ 2x2 subject to x1+ 3x2 ≤ 5 2x1− 4x2 ≤ 10 x1+ x2 ≤ 7 x1 ≤ 5

1

(0, 1) satisfies all the constraints and gives value 2 for the

  • bjective function.

2

Thus, optimal value σ∗ is at least 4.

Chandra & Ruta (UIUC) CS473 34 Fall 2016 34 / 39

slide-72
SLIDE 72

Feasible Solutions and Lower Bounds

Consider the program maximize 4x1+ 2x2 subject to x1+ 3x2 ≤ 5 2x1− 4x2 ≤ 10 x1+ x2 ≤ 7 x1 ≤ 5

1

(0, 1) satisfies all the constraints and gives value 2 for the

  • bjective function.

2

Thus, optimal value σ∗ is at least 4.

3

(2, 0) also feasible, and gives a better bound of 8.

Chandra & Ruta (UIUC) CS473 34 Fall 2016 34 / 39

slide-73
SLIDE 73

Feasible Solutions and Lower Bounds

Consider the program maximize 4x1+ 2x2 subject to x1+ 3x2 ≤ 5 2x1− 4x2 ≤ 10 x1+ x2 ≤ 7 x1 ≤ 5

1

(0, 1) satisfies all the constraints and gives value 2 for the

  • bjective function.

2

Thus, optimal value σ∗ is at least 4.

3

(2, 0) also feasible, and gives a better bound of 8.

4

How good is 8 when compared with σ∗?

Chandra & Ruta (UIUC) CS473 34 Fall 2016 34 / 39

slide-74
SLIDE 74

Obtaining Upper Bounds

1

Let us multiply the first constraint by 2 and the and add it to second constraint 2( x1+ 3x2 ) ≤ 2(5) +1( 2x1− 4x2 ) ≤ 1(10) 4x1+ 2x2 ≤ 20

2

Thus, 20 is an upper bound on the optimum value!

Chandra & Ruta (UIUC) CS473 35 Fall 2016 35 / 39

slide-75
SLIDE 75

Generalizing . . .

1

Multiply first equation by y1, second by y2, third by y3 and fourth by y4 (both y1, y2, y3, y4 being positive) and add y1( x1+ 3x2 ) ≤ y1(5) +y2( 2x1− 4x2 ) ≤ y2(10) +y3( x1+ x2 ) ≤ y3(7) +y4( x1 ) ≤ y4(5) (y1 + 2y2 + y3 + y4)x1 + (3y1 − 4y2 + y3)x2 ≤ . . .

2

5y1 + 10y2 + 7y3 + 5y4 is an upper bound, provided coefficients of xi are same as in the objective function, i.e., y1 + 2y2 + y3 + y4 = 4 3y1 − 4y2 + y3 = 2

3

The best upper bound is when 5y1 + 10y2 + 7y3 + 5y4 is minimized!

Chandra & Ruta (UIUC) CS473 36 Fall 2016 36 / 39

slide-76
SLIDE 76

Dual LP: Example

Thus, the optimum value of program maximize 4x1 + 2x2 subject to x1 + 3x2 ≤ 5 2x1 − 4x2 ≤ 10 x1 + x2 ≤ 7 x1 ≤ 5 is upper bounded by the optimal value of the program minimize 5y1 + 10y2 + 7y3 + 5y4 subject to y1 + 2y2 + y3 + y4 = 4 3y1 − 4y2 + y3 = 2 y1, y2 ≥ 0

Chandra & Ruta (UIUC) CS473 37 Fall 2016 37 / 39

slide-77
SLIDE 77

Dual Linear Program

Given a linear program Π in canonical form maximize d

j=1 cjxj

subject to d

j=1 aijxj ≤ bi

i = 1, 2, . . . n the dual Dual(Π) is given by minimize n

i=1 biyi

subject to n

i=1 yiaij = cj

j = 1, 2, . . . d yi ≥ 0 i = 1, 2, . . . n

Chandra & Ruta (UIUC) CS473 38 Fall 2016 38 / 39

slide-78
SLIDE 78

Dual Linear Program

Given a linear program Π in canonical form maximize d

j=1 cjxj

subject to d

j=1 aijxj ≤ bi

i = 1, 2, . . . n the dual Dual(Π) is given by minimize n

i=1 biyi

subject to n

i=1 yiaij = cj

j = 1, 2, . . . d yi ≥ 0 i = 1, 2, . . . n

Proposition

Dual(Dual(Π)) is equivalent to Π

Chandra & Ruta (UIUC) CS473 38 Fall 2016 38 / 39

slide-79
SLIDE 79

Duality Theorem

Theorem (Weak Duality)

If x is a feasible solution to Π and y is a feasible solution to Dual(Π) then c · x ≤ y · b.

Chandra & Ruta (UIUC) CS473 39 Fall 2016 39 / 39

slide-80
SLIDE 80

Duality Theorem

Theorem (Weak Duality)

If x is a feasible solution to Π and y is a feasible solution to Dual(Π) then c · x ≤ y · b.

Theorem (Strong Duality)

If x∗ is an optimal solution to Π and y∗ is an optimal solution to Dual(Π) then c · x∗ = y∗ · b. Many applications! Maxflow-Mincut theorem can be deduced from duality.

Chandra & Ruta (UIUC) CS473 39 Fall 2016 39 / 39