Linear Programming II Lecture 19 October 30, 2013 Sariel (UIUC) - - PowerPoint PPT Presentation

linear programming ii
SMART_READER_LITE
LIVE PREVIEW

Linear Programming II Lecture 19 October 30, 2013 Sariel (UIUC) - - PowerPoint PPT Presentation

CS 573: Algorithms, Fall 2013 Linear Programming II Lecture 19 October 30, 2013 Sariel (UIUC) CS573 1 Fall 2013 1 / 43 Simplex algorithm Simplex ( L a LP ) Transform L into slack form. Let L be the resulting slack form. L


slide-1
SLIDE 1

CS 573: Algorithms, Fall 2013

Linear Programming II

Lecture 19

October 30, 2013

Sariel (UIUC) CS573 1 Fall 2013 1 / 43

slide-2
SLIDE 2

Simplex algorithm

Simplex( L a LP ) Transform L into slack form. Let L be the resulting slack form. L′ ← Feasible(L) x ← LPStartSolution(L′) x′ ← SimplexInner(L′, x) (*) z ← objective function value of x′

if z > 0 then return “No solution”

x′′ ← SimplexInner(L, x′)

return x′′

Sariel (UIUC) CS573 2 Fall 2013 2 / 43

slide-3
SLIDE 3

Simplex algorithm...

. .

1

SimplexInner: solves a LP if the trivial solution of assigning zero to all the nonbasic variables is feasible. . .

2

L′ = Feasible(L) returns a new LP with feasible solution. . .

3

Done by adding new variable x0 to each equality. . .

4

Set target function in L′ to min x0. . .

5

  • riginal LP L feasible ⇐

⇒ LP L′ has feasible solution with x0 = 0. . .

6

Apply SimplexInner to L′ and solution computed (for L′) by LPStartSolution(L′). . .

7

If x0 = 0 then have a feasible solution to L. . .

8

Use solution in SimplexInner on L. . .

9

need to describe SimplexInner: solve LP in slack form given a feasible solution (all nonbasic vars assigned value 0).

Sariel (UIUC) CS573 3 Fall 2013 3 / 43

slide-4
SLIDE 4

Simplex algorithm...

. .

1

SimplexInner: solves a LP if the trivial solution of assigning zero to all the nonbasic variables is feasible. . .

2

L′ = Feasible(L) returns a new LP with feasible solution. . .

3

Done by adding new variable x0 to each equality. . .

4

Set target function in L′ to min x0. . .

5

  • riginal LP L feasible ⇐

⇒ LP L′ has feasible solution with x0 = 0. . .

6

Apply SimplexInner to L′ and solution computed (for L′) by LPStartSolution(L′). . .

7

If x0 = 0 then have a feasible solution to L. . .

8

Use solution in SimplexInner on L. . .

9

need to describe SimplexInner: solve LP in slack form given a feasible solution (all nonbasic vars assigned value 0).

Sariel (UIUC) CS573 3 Fall 2013 3 / 43

slide-5
SLIDE 5

Simplex algorithm...

. .

1

SimplexInner: solves a LP if the trivial solution of assigning zero to all the nonbasic variables is feasible. . .

2

L′ = Feasible(L) returns a new LP with feasible solution. . .

3

Done by adding new variable x0 to each equality. . .

4

Set target function in L′ to min x0. . .

5

  • riginal LP L feasible ⇐

⇒ LP L′ has feasible solution with x0 = 0. . .

6

Apply SimplexInner to L′ and solution computed (for L′) by LPStartSolution(L′). . .

7

If x0 = 0 then have a feasible solution to L. . .

8

Use solution in SimplexInner on L. . .

9

need to describe SimplexInner: solve LP in slack form given a feasible solution (all nonbasic vars assigned value 0).

Sariel (UIUC) CS573 3 Fall 2013 3 / 43

slide-6
SLIDE 6

Simplex algorithm...

. .

1

SimplexInner: solves a LP if the trivial solution of assigning zero to all the nonbasic variables is feasible. . .

2

L′ = Feasible(L) returns a new LP with feasible solution. . .

3

Done by adding new variable x0 to each equality. . .

4

Set target function in L′ to min x0. . .

5

  • riginal LP L feasible ⇐

⇒ LP L′ has feasible solution with x0 = 0. . .

6

Apply SimplexInner to L′ and solution computed (for L′) by LPStartSolution(L′). . .

7

If x0 = 0 then have a feasible solution to L. . .

8

Use solution in SimplexInner on L. . .

9

need to describe SimplexInner: solve LP in slack form given a feasible solution (all nonbasic vars assigned value 0).

Sariel (UIUC) CS573 3 Fall 2013 3 / 43

slide-7
SLIDE 7

Simplex algorithm...

. .

1

SimplexInner: solves a LP if the trivial solution of assigning zero to all the nonbasic variables is feasible. . .

2

L′ = Feasible(L) returns a new LP with feasible solution. . .

3

Done by adding new variable x0 to each equality. . .

4

Set target function in L′ to min x0. . .

5

  • riginal LP L feasible ⇐

⇒ LP L′ has feasible solution with x0 = 0. . .

6

Apply SimplexInner to L′ and solution computed (for L′) by LPStartSolution(L′). . .

7

If x0 = 0 then have a feasible solution to L. . .

8

Use solution in SimplexInner on L. . .

9

need to describe SimplexInner: solve LP in slack form given a feasible solution (all nonbasic vars assigned value 0).

Sariel (UIUC) CS573 3 Fall 2013 3 / 43

slide-8
SLIDE 8

Simplex algorithm...

. .

1

SimplexInner: solves a LP if the trivial solution of assigning zero to all the nonbasic variables is feasible. . .

2

L′ = Feasible(L) returns a new LP with feasible solution. . .

3

Done by adding new variable x0 to each equality. . .

4

Set target function in L′ to min x0. . .

5

  • riginal LP L feasible ⇐

⇒ LP L′ has feasible solution with x0 = 0. . .

6

Apply SimplexInner to L′ and solution computed (for L′) by LPStartSolution(L′). . .

7

If x0 = 0 then have a feasible solution to L. . .

8

Use solution in SimplexInner on L. . .

9

need to describe SimplexInner: solve LP in slack form given a feasible solution (all nonbasic vars assigned value 0).

Sariel (UIUC) CS573 3 Fall 2013 3 / 43

slide-9
SLIDE 9

Simplex algorithm...

. .

1

SimplexInner: solves a LP if the trivial solution of assigning zero to all the nonbasic variables is feasible. . .

2

L′ = Feasible(L) returns a new LP with feasible solution. . .

3

Done by adding new variable x0 to each equality. . .

4

Set target function in L′ to min x0. . .

5

  • riginal LP L feasible ⇐

⇒ LP L′ has feasible solution with x0 = 0. . .

6

Apply SimplexInner to L′ and solution computed (for L′) by LPStartSolution(L′). . .

7

If x0 = 0 then have a feasible solution to L. . .

8

Use solution in SimplexInner on L. . .

9

need to describe SimplexInner: solve LP in slack form given a feasible solution (all nonbasic vars assigned value 0).

Sariel (UIUC) CS573 3 Fall 2013 3 / 43

slide-10
SLIDE 10

Notations

B - Set of indices of basic variables N - Set of indices of nonbasic variables n = |N| - number of original variables b, c - two vectors of constants m = |B| - number of basic variables (i.e., number

  • f inequalities)

A = {aij} - The matrix of coefficients N ∪ B = {1, . . . , n + m} v - objective function constant. LP in slack form is specified by a tuple (N, B, A, b, c, v).

Sariel (UIUC) CS573 4 Fall 2013 4 / 43

slide-11
SLIDE 11

The corresponding LP

max z = v +

j∈N

cjxj, s.t. xi = bi −

j∈N

aijxj for i ∈ B, xi ≥ 0, ∀i = 1, . . . , n + m.

Sariel (UIUC) CS573 5 Fall 2013 5 / 43

slide-12
SLIDE 12

Reminder - basic/nonbasic

max z = 29 − 1 9x3 − 1 9x5 − 2 9x6 x1 = 8 + 1 6x3 + 1 6x5 − 1 3x6 x2 = 4 − 8 3x3 − 2 3x5 + 1 3x6 x4 = 18 − 1 2x3 + 1 2x5 Basic variables

Nonbasic variables

Sariel (UIUC) CS573 6 Fall 2013 6 / 43

slide-13
SLIDE 13

The SimplexInner Algorithm

Describe the SimplexInner algorithm: . .

1

LP is in slack form. . .

2

Trivial solution x = τ (i.e., all nonbasic variables zero), is feasible. . .

3

  • bjective value for this solution is v.

. .

4

Reminder: Objective function is z = v + ∑

j∈N cjxj.

. .

5

xe: nonbasic variable with positive coefficient in objective function. . .

6

Formally: e is one of the indices of

{

j

  • cj > 0, j ∈ N

}

. . .

7

xe is the entering variable (enters set of basic variables). . .

8

If increase value xe (from current value of 0 in τ)... . .

9

... one of basic variables is going to vanish (i.e., become zero).

Sariel (UIUC) CS573 7 Fall 2013 7 / 43

slide-14
SLIDE 14

The SimplexInner Algorithm

Describe the SimplexInner algorithm: . .

1

LP is in slack form. . .

2

Trivial solution x = τ (i.e., all nonbasic variables zero), is feasible. . .

3

  • bjective value for this solution is v.

. .

4

Reminder: Objective function is z = v + ∑

j∈N cjxj.

. .

5

xe: nonbasic variable with positive coefficient in objective function. . .

6

Formally: e is one of the indices of

{

j

  • cj > 0, j ∈ N

}

. . .

7

xe is the entering variable (enters set of basic variables). . .

8

If increase value xe (from current value of 0 in τ)... . .

9

... one of basic variables is going to vanish (i.e., become zero).

Sariel (UIUC) CS573 7 Fall 2013 7 / 43

slide-15
SLIDE 15

The SimplexInner Algorithm

Describe the SimplexInner algorithm: . .

1

LP is in slack form. . .

2

Trivial solution x = τ (i.e., all nonbasic variables zero), is feasible. . .

3

  • bjective value for this solution is v.

. .

4

Reminder: Objective function is z = v + ∑

j∈N cjxj.

. .

5

xe: nonbasic variable with positive coefficient in objective function. . .

6

Formally: e is one of the indices of

{

j

  • cj > 0, j ∈ N

}

. . .

7

xe is the entering variable (enters set of basic variables). . .

8

If increase value xe (from current value of 0 in τ)... . .

9

... one of basic variables is going to vanish (i.e., become zero).

Sariel (UIUC) CS573 7 Fall 2013 7 / 43

slide-16
SLIDE 16

The SimplexInner Algorithm

Describe the SimplexInner algorithm: . .

1

LP is in slack form. . .

2

Trivial solution x = τ (i.e., all nonbasic variables zero), is feasible. . .

3

  • bjective value for this solution is v.

. .

4

Reminder: Objective function is z = v + ∑

j∈N cjxj.

. .

5

xe: nonbasic variable with positive coefficient in objective function. . .

6

Formally: e is one of the indices of

{

j

  • cj > 0, j ∈ N

}

. . .

7

xe is the entering variable (enters set of basic variables). . .

8

If increase value xe (from current value of 0 in τ)... . .

9

... one of basic variables is going to vanish (i.e., become zero).

Sariel (UIUC) CS573 7 Fall 2013 7 / 43

slide-17
SLIDE 17

The SimplexInner Algorithm

Describe the SimplexInner algorithm: . .

1

LP is in slack form. . .

2

Trivial solution x = τ (i.e., all nonbasic variables zero), is feasible. . .

3

  • bjective value for this solution is v.

. .

4

Reminder: Objective function is z = v + ∑

j∈N cjxj.

. .

5

xe: nonbasic variable with positive coefficient in objective function. . .

6

Formally: e is one of the indices of

{

j

  • cj > 0, j ∈ N

}

. . .

7

xe is the entering variable (enters set of basic variables). . .

8

If increase value xe (from current value of 0 in τ)... . .

9

... one of basic variables is going to vanish (i.e., become zero).

Sariel (UIUC) CS573 7 Fall 2013 7 / 43

slide-18
SLIDE 18

The SimplexInner Algorithm

Describe the SimplexInner algorithm: . .

1

LP is in slack form. . .

2

Trivial solution x = τ (i.e., all nonbasic variables zero), is feasible. . .

3

  • bjective value for this solution is v.

. .

4

Reminder: Objective function is z = v + ∑

j∈N cjxj.

. .

5

xe: nonbasic variable with positive coefficient in objective function. . .

6

Formally: e is one of the indices of

{

j

  • cj > 0, j ∈ N

}

. . .

7

xe is the entering variable (enters set of basic variables). . .

8

If increase value xe (from current value of 0 in τ)... . .

9

... one of basic variables is going to vanish (i.e., become zero).

Sariel (UIUC) CS573 7 Fall 2013 7 / 43

slide-19
SLIDE 19

Choosing the leaving variable

. .

1

xe: entering variable . .

2

xl: leaving variable – vanishing basic variable. . .

3

increase value of xe till xl becomes zero. . .

4

How do we now which variable is xl? . .

5

set all nonbasic to 0 zero, except xe . .

6

xi = bi − aiexe, for all i ∈ B. . .

7

Require: ∀i ∈ B xi = bi − aiexe ≥ 0. . .

8

= ⇒ xe ≤(bi/aie) . .

9

l = arg mini bi/aie . .

10 If more than one achieves mini bi/aie, just pick one. Sariel (UIUC) CS573 8 Fall 2013 8 / 43

slide-20
SLIDE 20

Choosing the leaving variable

. .

1

xe: entering variable . .

2

xl: leaving variable – vanishing basic variable. . .

3

increase value of xe till xl becomes zero. . .

4

How do we now which variable is xl? . .

5

set all nonbasic to 0 zero, except xe . .

6

xi = bi − aiexe, for all i ∈ B. . .

7

Require: ∀i ∈ B xi = bi − aiexe ≥ 0. . .

8

= ⇒ xe ≤(bi/aie) . .

9

l = arg mini bi/aie . .

10 If more than one achieves mini bi/aie, just pick one. Sariel (UIUC) CS573 8 Fall 2013 8 / 43

slide-21
SLIDE 21

Choosing the leaving variable

. .

1

xe: entering variable . .

2

xl: leaving variable – vanishing basic variable. . .

3

increase value of xe till xl becomes zero. . .

4

How do we now which variable is xl? . .

5

set all nonbasic to 0 zero, except xe . .

6

xi = bi − aiexe, for all i ∈ B. . .

7

Require: ∀i ∈ B xi = bi − aiexe ≥ 0. . .

8

= ⇒ xe ≤(bi/aie) . .

9

l = arg mini bi/aie . .

10 If more than one achieves mini bi/aie, just pick one. Sariel (UIUC) CS573 8 Fall 2013 8 / 43

slide-22
SLIDE 22

Choosing the leaving variable

. .

1

xe: entering variable . .

2

xl: leaving variable – vanishing basic variable. . .

3

increase value of xe till xl becomes zero. . .

4

How do we now which variable is xl? . .

5

set all nonbasic to 0 zero, except xe . .

6

xi = bi − aiexe, for all i ∈ B. . .

7

Require: ∀i ∈ B xi = bi − aiexe ≥ 0. . .

8

= ⇒ xe ≤(bi/aie) . .

9

l = arg mini bi/aie . .

10 If more than one achieves mini bi/aie, just pick one. Sariel (UIUC) CS573 8 Fall 2013 8 / 43

slide-23
SLIDE 23

Choosing the leaving variable

. .

1

xe: entering variable . .

2

xl: leaving variable – vanishing basic variable. . .

3

increase value of xe till xl becomes zero. . .

4

How do we now which variable is xl? . .

5

set all nonbasic to 0 zero, except xe . .

6

xi = bi − aiexe, for all i ∈ B. . .

7

Require: ∀i ∈ B xi = bi − aiexe ≥ 0. . .

8

= ⇒ xe ≤(bi/aie) . .

9

l = arg mini bi/aie . .

10 If more than one achieves mini bi/aie, just pick one. Sariel (UIUC) CS573 8 Fall 2013 8 / 43

slide-24
SLIDE 24

Choosing the leaving variable

. .

1

xe: entering variable . .

2

xl: leaving variable – vanishing basic variable. . .

3

increase value of xe till xl becomes zero. . .

4

How do we now which variable is xl? . .

5

set all nonbasic to 0 zero, except xe . .

6

xi = bi − aiexe, for all i ∈ B. . .

7

Require: ∀i ∈ B xi = bi − aiexe ≥ 0. . .

8

= ⇒ xe ≤(bi/aie) . .

9

l = arg mini bi/aie . .

10 If more than one achieves mini bi/aie, just pick one. Sariel (UIUC) CS573 8 Fall 2013 8 / 43

slide-25
SLIDE 25

Choosing the leaving variable

. .

1

xe: entering variable . .

2

xl: leaving variable – vanishing basic variable. . .

3

increase value of xe till xl becomes zero. . .

4

How do we now which variable is xl? . .

5

set all nonbasic to 0 zero, except xe . .

6

xi = bi − aiexe, for all i ∈ B. . .

7

Require: ∀i ∈ B xi = bi − aiexe ≥ 0. . .

8

= ⇒ xe ≤(bi/aie) . .

9

l = arg mini bi/aie . .

10 If more than one achieves mini bi/aie, just pick one. Sariel (UIUC) CS573 8 Fall 2013 8 / 43

slide-26
SLIDE 26

Choosing the leaving variable

. .

1

xe: entering variable . .

2

xl: leaving variable – vanishing basic variable. . .

3

increase value of xe till xl becomes zero. . .

4

How do we now which variable is xl? . .

5

set all nonbasic to 0 zero, except xe . .

6

xi = bi − aiexe, for all i ∈ B. . .

7

Require: ∀i ∈ B xi = bi − aiexe ≥ 0. . .

8

= ⇒ xe ≤(bi/aie) . .

9

l = arg mini bi/aie . .

10 If more than one achieves mini bi/aie, just pick one. Sariel (UIUC) CS573 8 Fall 2013 8 / 43

slide-27
SLIDE 27

Choosing the leaving variable

. .

1

xe: entering variable . .

2

xl: leaving variable – vanishing basic variable. . .

3

increase value of xe till xl becomes zero. . .

4

How do we now which variable is xl? . .

5

set all nonbasic to 0 zero, except xe . .

6

xi = bi − aiexe, for all i ∈ B. . .

7

Require: ∀i ∈ B xi = bi − aiexe ≥ 0. . .

8

= ⇒ xe ≤(bi/aie) . .

9

l = arg mini bi/aie . .

10 If more than one achieves mini bi/aie, just pick one. Sariel (UIUC) CS573 8 Fall 2013 8 / 43

slide-28
SLIDE 28

Choosing the leaving variable

. .

1

xe: entering variable . .

2

xl: leaving variable – vanishing basic variable. . .

3

increase value of xe till xl becomes zero. . .

4

How do we now which variable is xl? . .

5

set all nonbasic to 0 zero, except xe . .

6

xi = bi − aiexe, for all i ∈ B. . .

7

Require: ∀i ∈ B xi = bi − aiexe ≥ 0. . .

8

= ⇒ xe ≤(bi/aie) . .

9

l = arg mini bi/aie . .

10 If more than one achieves mini bi/aie, just pick one. Sariel (UIUC) CS573 8 Fall 2013 8 / 43

slide-29
SLIDE 29

Pivoting on xe...

. .

1

Determined xe and xl. . .

2

Rewrite equation for xl in LP. (Every basic variable has an equation in the LP!) . .

3

xl = bl − ∑

j∈N aljxj

⇒ xe = bl ale −

j∈N∪{l}

alj ale xj, where all = 1. . .

4

LP cleanup: remove all appearances on right side of LP of xe. . .

5

Substituting xe into the other equalities, using above. . .

6

Alternatively, do Gaussian elimination remove any appearance of xe on right side LP (including objective). Transfer xl on the left side, to the right side.

Sariel (UIUC) CS573 9 Fall 2013 9 / 43

slide-30
SLIDE 30

Pivoting on xe...

. .

1

Determined xe and xl. . .

2

Rewrite equation for xl in LP. (Every basic variable has an equation in the LP!) . .

3

xl = bl − ∑

j∈N aljxj

⇒ xe = bl ale −

j∈N∪{l}

alj ale xj, where all = 1. . .

4

LP cleanup: remove all appearances on right side of LP of xe. . .

5

Substituting xe into the other equalities, using above. . .

6

Alternatively, do Gaussian elimination remove any appearance of xe on right side LP (including objective). Transfer xl on the left side, to the right side.

Sariel (UIUC) CS573 9 Fall 2013 9 / 43

slide-31
SLIDE 31

Pivoting on xe...

. .

1

Determined xe and xl. . .

2

Rewrite equation for xl in LP. (Every basic variable has an equation in the LP!) . .

3

xl = bl − ∑

j∈N aljxj

⇒ xe = bl ale −

j∈N∪{l}

alj ale xj, where all = 1. . .

4

LP cleanup: remove all appearances on right side of LP of xe. . .

5

Substituting xe into the other equalities, using above. . .

6

Alternatively, do Gaussian elimination remove any appearance of xe on right side LP (including objective). Transfer xl on the left side, to the right side.

Sariel (UIUC) CS573 9 Fall 2013 9 / 43

slide-32
SLIDE 32

Pivoting on xe...

. .

1

Determined xe and xl. . .

2

Rewrite equation for xl in LP. (Every basic variable has an equation in the LP!) . .

3

xl = bl − ∑

j∈N aljxj

⇒ xe = bl ale −

j∈N∪{l}

alj ale xj, where all = 1. . .

4

LP cleanup: remove all appearances on right side of LP of xe. . .

5

Substituting xe into the other equalities, using above. . .

6

Alternatively, do Gaussian elimination remove any appearance of xe on right side LP (including objective). Transfer xl on the left side, to the right side.

Sariel (UIUC) CS573 9 Fall 2013 9 / 43

slide-33
SLIDE 33

Pivoting on xe...

. .

1

Determined xe and xl. . .

2

Rewrite equation for xl in LP. (Every basic variable has an equation in the LP!) . .

3

xl = bl − ∑

j∈N aljxj

⇒ xe = bl ale −

j∈N∪{l}

alj ale xj, where all = 1. . .

4

LP cleanup: remove all appearances on right side of LP of xe. . .

5

Substituting xe into the other equalities, using above. . .

6

Alternatively, do Gaussian elimination remove any appearance of xe on right side LP (including objective). Transfer xl on the left side, to the right side.

Sariel (UIUC) CS573 9 Fall 2013 9 / 43

slide-34
SLIDE 34

Pivoting on xe...

. .

1

Determined xe and xl. . .

2

Rewrite equation for xl in LP. (Every basic variable has an equation in the LP!) . .

3

xl = bl − ∑

j∈N aljxj

⇒ xe = bl ale −

j∈N∪{l}

alj ale xj, where all = 1. . .

4

LP cleanup: remove all appearances on right side of LP of xe. . .

5

Substituting xe into the other equalities, using above. . .

6

Alternatively, do Gaussian elimination remove any appearance of xe on right side LP (including objective). Transfer xl on the left side, to the right side.

Sariel (UIUC) CS573 9 Fall 2013 9 / 43

slide-35
SLIDE 35

Pivoting on xe...

. .

1

Determined xe and xl. . .

2

Rewrite equation for xl in LP. (Every basic variable has an equation in the LP!) . .

3

xl = bl − ∑

j∈N aljxj

⇒ xe = bl ale −

j∈N∪{l}

alj ale xj, where all = 1. . .

4

LP cleanup: remove all appearances on right side of LP of xe. . .

5

Substituting xe into the other equalities, using above. . .

6

Alternatively, do Gaussian elimination remove any appearance of xe on right side LP (including objective). Transfer xl on the left side, to the right side.

Sariel (UIUC) CS573 9 Fall 2013 9 / 43

slide-36
SLIDE 36

Pivoting continued...

. .

1

End of this process: have new equivalent LP. . .

2

basic variables: B′ =(B \ {l}) ∪ {e} . .

3

non-basic variables: N ′ =(N \ {e}) ∪ {l}. . .

4

End of this pivoting stage: LP objective function value increased. . .

5

Made progress. . .

6

LP is completely defined by which variables are basic, and which are non-basic. . .

7

Pivoting never returns to a combination (of basic/non-basic variable) already visited. .

8

...because improve objective in each pivoting step. . .

9

Can do at most

(n+m

n

)

(

n+m n

· e

)n.

. .

10 examples where 2n pivoting steps are needed. Sariel (UIUC) CS573 10 Fall 2013 10 / 43

slide-37
SLIDE 37

Pivoting continued...

. .

1

End of this process: have new equivalent LP. . .

2

basic variables: B′ =(B \ {l}) ∪ {e} . .

3

non-basic variables: N ′ =(N \ {e}) ∪ {l}. . .

4

End of this pivoting stage: LP objective function value increased. . .

5

Made progress. . .

6

LP is completely defined by which variables are basic, and which are non-basic. . .

7

Pivoting never returns to a combination (of basic/non-basic variable) already visited. .

8

...because improve objective in each pivoting step. . .

9

Can do at most

(n+m

n

)

(

n+m n

· e

)n.

. .

10 examples where 2n pivoting steps are needed. Sariel (UIUC) CS573 10 Fall 2013 10 / 43

slide-38
SLIDE 38

Pivoting continued...

. .

1

End of this process: have new equivalent LP. . .

2

basic variables: B′ =(B \ {l}) ∪ {e} . .

3

non-basic variables: N ′ =(N \ {e}) ∪ {l}. . .

4

End of this pivoting stage: LP objective function value increased. . .

5

Made progress. . .

6

LP is completely defined by which variables are basic, and which are non-basic. . .

7

Pivoting never returns to a combination (of basic/non-basic variable) already visited. .

8

...because improve objective in each pivoting step. . .

9

Can do at most

(n+m

n

)

(

n+m n

· e

)n.

. .

10 examples where 2n pivoting steps are needed. Sariel (UIUC) CS573 10 Fall 2013 10 / 43

slide-39
SLIDE 39

Pivoting continued...

. .

1

End of this process: have new equivalent LP. . .

2

basic variables: B′ =(B \ {l}) ∪ {e} . .

3

non-basic variables: N ′ =(N \ {e}) ∪ {l}. . .

4

End of this pivoting stage: LP objective function value increased. . .

5

Made progress. . .

6

LP is completely defined by which variables are basic, and which are non-basic. . .

7

Pivoting never returns to a combination (of basic/non-basic variable) already visited. .

8

...because improve objective in each pivoting step. . .

9

Can do at most

(n+m

n

)

(

n+m n

· e

)n.

. .

10 examples where 2n pivoting steps are needed. Sariel (UIUC) CS573 10 Fall 2013 10 / 43

slide-40
SLIDE 40

Pivoting continued...

. .

1

End of this process: have new equivalent LP. . .

2

basic variables: B′ =(B \ {l}) ∪ {e} . .

3

non-basic variables: N ′ =(N \ {e}) ∪ {l}. . .

4

End of this pivoting stage: LP objective function value increased. . .

5

Made progress. . .

6

LP is completely defined by which variables are basic, and which are non-basic. . .

7

Pivoting never returns to a combination (of basic/non-basic variable) already visited. .

8

...because improve objective in each pivoting step. . .

9

Can do at most

(n+m

n

)

(

n+m n

· e

)n.

. .

10 examples where 2n pivoting steps are needed. Sariel (UIUC) CS573 10 Fall 2013 10 / 43

slide-41
SLIDE 41

Pivoting continued...

. .

1

End of this process: have new equivalent LP. . .

2

basic variables: B′ =(B \ {l}) ∪ {e} . .

3

non-basic variables: N ′ =(N \ {e}) ∪ {l}. . .

4

End of this pivoting stage: LP objective function value increased. . .

5

Made progress. . .

6

LP is completely defined by which variables are basic, and which are non-basic. . .

7

Pivoting never returns to a combination (of basic/non-basic variable) already visited. .

8

...because improve objective in each pivoting step. . .

9

Can do at most

(n+m

n

)

(

n+m n

· e

)n.

. .

10 examples where 2n pivoting steps are needed. Sariel (UIUC) CS573 10 Fall 2013 10 / 43

slide-42
SLIDE 42

Pivoting continued...

. .

1

End of this process: have new equivalent LP. . .

2

basic variables: B′ =(B \ {l}) ∪ {e} . .

3

non-basic variables: N ′ =(N \ {e}) ∪ {l}. . .

4

End of this pivoting stage: LP objective function value increased. . .

5

Made progress. . .

6

LP is completely defined by which variables are basic, and which are non-basic. . .

7

Pivoting never returns to a combination (of basic/non-basic variable) already visited. .

8

...because improve objective in each pivoting step. . .

9

Can do at most

(n+m

n

)

(

n+m n

· e

)n.

. .

10 examples where 2n pivoting steps are needed. Sariel (UIUC) CS573 10 Fall 2013 10 / 43

slide-43
SLIDE 43

Pivoting continued...

. .

1

End of this process: have new equivalent LP. . .

2

basic variables: B′ =(B \ {l}) ∪ {e} . .

3

non-basic variables: N ′ =(N \ {e}) ∪ {l}. . .

4

End of this pivoting stage: LP objective function value increased. . .

5

Made progress. . .

6

LP is completely defined by which variables are basic, and which are non-basic. . .

7

Pivoting never returns to a combination (of basic/non-basic variable) already visited. .

8

...because improve objective in each pivoting step. . .

9

Can do at most

(n+m

n

)

(

n+m n

· e

)n.

. .

10 examples where 2n pivoting steps are needed. Sariel (UIUC) CS573 10 Fall 2013 10 / 43

slide-44
SLIDE 44

Pivoting continued...

. .

1

End of this process: have new equivalent LP. . .

2

basic variables: B′ =(B \ {l}) ∪ {e} . .

3

non-basic variables: N ′ =(N \ {e}) ∪ {l}. . .

4

End of this pivoting stage: LP objective function value increased. . .

5

Made progress. . .

6

LP is completely defined by which variables are basic, and which are non-basic. . .

7

Pivoting never returns to a combination (of basic/non-basic variable) already visited. .

8

...because improve objective in each pivoting step. . .

9

Can do at most

(n+m

n

)

(

n+m n

· e

)n.

. .

10 examples where 2n pivoting steps are needed. Sariel (UIUC) CS573 10 Fall 2013 10 / 43

slide-45
SLIDE 45

Pivoting continued...

. .

1

End of this process: have new equivalent LP. . .

2

basic variables: B′ =(B \ {l}) ∪ {e} . .

3

non-basic variables: N ′ =(N \ {e}) ∪ {l}. . .

4

End of this pivoting stage: LP objective function value increased. . .

5

Made progress. . .

6

LP is completely defined by which variables are basic, and which are non-basic. . .

7

Pivoting never returns to a combination (of basic/non-basic variable) already visited. .

8

...because improve objective in each pivoting step. . .

9

Can do at most

(n+m

n

)

(

n+m n

· e

)n.

. .

10 examples where 2n pivoting steps are needed. Sariel (UIUC) CS573 10 Fall 2013 10 / 43

slide-46
SLIDE 46

Simplex algorithm summary...

. .

1

Each pivoting step takes polynomial time in n and m. . .

2

Running time of Simplex is exponential in the worst case. . .

3

In practice, Simplex is extremely fast.

Sariel (UIUC) CS573 11 Fall 2013 11 / 43

slide-47
SLIDE 47

Simplex algorithm summary...

. .

1

Each pivoting step takes polynomial time in n and m. . .

2

Running time of Simplex is exponential in the worst case. . .

3

In practice, Simplex is extremely fast.

Sariel (UIUC) CS573 11 Fall 2013 11 / 43

slide-48
SLIDE 48

Simplex algorithm summary...

. .

1

Each pivoting step takes polynomial time in n and m. . .

2

Running time of Simplex is exponential in the worst case. . .

3

In practice, Simplex is extremely fast.

Sariel (UIUC) CS573 11 Fall 2013 11 / 43

slide-49
SLIDE 49

Degeneracies

. .

1

Simplex might get stuck if one of the bis is zero. . .

2

More than > m hyperplanes (i.e., equalities) passes through the same point. . .

3

Result: might not be able to make any progress at all in a pivoting step. . .

4

Solution I: add tiny random noise to each coefficient. Can be done symbolically. Intuitively, the degeneracy, being a local phenomena on the polytope disappears with high probability.

Sariel (UIUC) CS573 12 Fall 2013 12 / 43

slide-50
SLIDE 50

Degeneracies

. .

1

Simplex might get stuck if one of the bis is zero. . .

2

More than > m hyperplanes (i.e., equalities) passes through the same point. . .

3

Result: might not be able to make any progress at all in a pivoting step. . .

4

Solution I: add tiny random noise to each coefficient. Can be done symbolically. Intuitively, the degeneracy, being a local phenomena on the polytope disappears with high probability.

Sariel (UIUC) CS573 12 Fall 2013 12 / 43

slide-51
SLIDE 51

Degeneracies

. .

1

Simplex might get stuck if one of the bis is zero. . .

2

More than > m hyperplanes (i.e., equalities) passes through the same point. . .

3

Result: might not be able to make any progress at all in a pivoting step. . .

4

Solution I: add tiny random noise to each coefficient. Can be done symbolically. Intuitively, the degeneracy, being a local phenomena on the polytope disappears with high probability.

Sariel (UIUC) CS573 12 Fall 2013 12 / 43

slide-52
SLIDE 52

Degeneracies

. .

1

Simplex might get stuck if one of the bis is zero. . .

2

More than > m hyperplanes (i.e., equalities) passes through the same point. . .

3

Result: might not be able to make any progress at all in a pivoting step. . .

4

Solution I: add tiny random noise to each coefficient. Can be done symbolically. Intuitively, the degeneracy, being a local phenomena on the polytope disappears with high probability.

Sariel (UIUC) CS573 12 Fall 2013 12 / 43

slide-53
SLIDE 53

Degeneracies

. .

1

Simplex might get stuck if one of the bis is zero. . .

2

More than > m hyperplanes (i.e., equalities) passes through the same point. . .

3

Result: might not be able to make any progress at all in a pivoting step. . .

4

Solution I: add tiny random noise to each coefficient. Can be done symbolically. Intuitively, the degeneracy, being a local phenomena on the polytope disappears with high probability.

Sariel (UIUC) CS573 12 Fall 2013 12 / 43

slide-54
SLIDE 54

Degeneracies

. .

1

Simplex might get stuck if one of the bis is zero. . .

2

More than > m hyperplanes (i.e., equalities) passes through the same point. . .

3

Result: might not be able to make any progress at all in a pivoting step. . .

4

Solution I: add tiny random noise to each coefficient. Can be done symbolically. Intuitively, the degeneracy, being a local phenomena on the polytope disappears with high probability.

Sariel (UIUC) CS573 12 Fall 2013 12 / 43

slide-55
SLIDE 55

Degeneracies – cycling

. .

1

Might get into cycling: a sequence of pivoting operations that do not improve the objective function, and the bases you get are cyclic (i.e., infinite loop). . .

2

Solution II: Bland’s rule. Always choose the lowest index variable for entering and leaving

  • ut of the possible candidates.

(Not prove why this work - but it does.)

Sariel (UIUC) CS573 13 Fall 2013 13 / 43

slide-56
SLIDE 56

Degeneracies – cycling

. .

1

Might get into cycling: a sequence of pivoting operations that do not improve the objective function, and the bases you get are cyclic (i.e., infinite loop). . .

2

Solution II: Bland’s rule. Always choose the lowest index variable for entering and leaving

  • ut of the possible candidates.

(Not prove why this work - but it does.)

Sariel (UIUC) CS573 13 Fall 2013 13 / 43

slide-57
SLIDE 57

Correctness of LP

.

Definition

. . A solution to an LP is a basic solution if it the result of setting all the nonbasic variables to zero. Simplex algorithm deals only with basic solutions. .

Theorem

. . For an arbitrary linear program, the following statements are true: (A) If there is no optimal solution, the problem is either infeasible

  • r unbounded.

(B) If a feasible solution exists, then a basic feasible solution exists. (C) If an optimal solution exists, then a basic optimal solution exists. Proof: is constructive by running the simplex algorithm.

Sariel (UIUC) CS573 14 Fall 2013 14 / 43

slide-58
SLIDE 58

Correctness of LP

.

Definition

. . A solution to an LP is a basic solution if it the result of setting all the nonbasic variables to zero. Simplex algorithm deals only with basic solutions. .

Theorem

. . For an arbitrary linear program, the following statements are true: (A) If there is no optimal solution, the problem is either infeasible

  • r unbounded.

(B) If a feasible solution exists, then a basic feasible solution exists. (C) If an optimal solution exists, then a basic optimal solution exists. Proof: is constructive by running the simplex algorithm.

Sariel (UIUC) CS573 14 Fall 2013 14 / 43

slide-59
SLIDE 59

Correctness of LP

.

Definition

. . A solution to an LP is a basic solution if it the result of setting all the nonbasic variables to zero. Simplex algorithm deals only with basic solutions. .

Theorem

. . For an arbitrary linear program, the following statements are true: (A) If there is no optimal solution, the problem is either infeasible

  • r unbounded.

(B) If a feasible solution exists, then a basic feasible solution exists. (C) If an optimal solution exists, then a basic optimal solution exists. Proof: is constructive by running the simplex algorithm.

Sariel (UIUC) CS573 14 Fall 2013 14 / 43

slide-60
SLIDE 60

Correctness of LP

.

Definition

. . A solution to an LP is a basic solution if it the result of setting all the nonbasic variables to zero. Simplex algorithm deals only with basic solutions. .

Theorem

. . For an arbitrary linear program, the following statements are true: (A) If there is no optimal solution, the problem is either infeasible

  • r unbounded.

(B) If a feasible solution exists, then a basic feasible solution exists. (C) If an optimal solution exists, then a basic optimal solution exists. Proof: is constructive by running the simplex algorithm.

Sariel (UIUC) CS573 14 Fall 2013 14 / 43

slide-61
SLIDE 61

On the ellipsoid method and interior point methods

. .

1

Simplex has exponential running time in the worst case. . .

2

ellipsoid method is weakly polynomial. It is polynomial in the number of bits of the input. . .

3

Khachian in 1979 came up with it. Useless in practice. . .

4

In 1984, Karmakar came up with a different method, called the interior-point method. . .

5

Also weakly polynomial. Quite useful in practice. . .

6

Result in arm race between the interior-point method and the simplex method. . .

7

BIG OPEN QUESTION: Is there strongly polynomial time algorithm for linear programming?

Sariel (UIUC) CS573 15 Fall 2013 15 / 43

slide-62
SLIDE 62

On the ellipsoid method and interior point methods

. .

1

Simplex has exponential running time in the worst case. . .

2

ellipsoid method is weakly polynomial. It is polynomial in the number of bits of the input. . .

3

Khachian in 1979 came up with it. Useless in practice. . .

4

In 1984, Karmakar came up with a different method, called the interior-point method. . .

5

Also weakly polynomial. Quite useful in practice. . .

6

Result in arm race between the interior-point method and the simplex method. . .

7

BIG OPEN QUESTION: Is there strongly polynomial time algorithm for linear programming?

Sariel (UIUC) CS573 15 Fall 2013 15 / 43

slide-63
SLIDE 63

On the ellipsoid method and interior point methods

. .

1

Simplex has exponential running time in the worst case. . .

2

ellipsoid method is weakly polynomial. It is polynomial in the number of bits of the input. . .

3

Khachian in 1979 came up with it. Useless in practice. . .

4

In 1984, Karmakar came up with a different method, called the interior-point method. . .

5

Also weakly polynomial. Quite useful in practice. . .

6

Result in arm race between the interior-point method and the simplex method. . .

7

BIG OPEN QUESTION: Is there strongly polynomial time algorithm for linear programming?

Sariel (UIUC) CS573 15 Fall 2013 15 / 43

slide-64
SLIDE 64

On the ellipsoid method and interior point methods

. .

1

Simplex has exponential running time in the worst case. . .

2

ellipsoid method is weakly polynomial. It is polynomial in the number of bits of the input. . .

3

Khachian in 1979 came up with it. Useless in practice. . .

4

In 1984, Karmakar came up with a different method, called the interior-point method. . .

5

Also weakly polynomial. Quite useful in practice. . .

6

Result in arm race between the interior-point method and the simplex method. . .

7

BIG OPEN QUESTION: Is there strongly polynomial time algorithm for linear programming?

Sariel (UIUC) CS573 15 Fall 2013 15 / 43

slide-65
SLIDE 65

On the ellipsoid method and interior point methods

. .

1

Simplex has exponential running time in the worst case. . .

2

ellipsoid method is weakly polynomial. It is polynomial in the number of bits of the input. . .

3

Khachian in 1979 came up with it. Useless in practice. . .

4

In 1984, Karmakar came up with a different method, called the interior-point method. . .

5

Also weakly polynomial. Quite useful in practice. . .

6

Result in arm race between the interior-point method and the simplex method. . .

7

BIG OPEN QUESTION: Is there strongly polynomial time algorithm for linear programming?

Sariel (UIUC) CS573 15 Fall 2013 15 / 43

slide-66
SLIDE 66

On the ellipsoid method and interior point methods

. .

1

Simplex has exponential running time in the worst case. . .

2

ellipsoid method is weakly polynomial. It is polynomial in the number of bits of the input. . .

3

Khachian in 1979 came up with it. Useless in practice. . .

4

In 1984, Karmakar came up with a different method, called the interior-point method. . .

5

Also weakly polynomial. Quite useful in practice. . .

6

Result in arm race between the interior-point method and the simplex method. . .

7

BIG OPEN QUESTION: Is there strongly polynomial time algorithm for linear programming?

Sariel (UIUC) CS573 15 Fall 2013 15 / 43

slide-67
SLIDE 67

On the ellipsoid method and interior point methods

. .

1

Simplex has exponential running time in the worst case. . .

2

ellipsoid method is weakly polynomial. It is polynomial in the number of bits of the input. . .

3

Khachian in 1979 came up with it. Useless in practice. . .

4

In 1984, Karmakar came up with a different method, called the interior-point method. . .

5

Also weakly polynomial. Quite useful in practice. . .

6

Result in arm race between the interior-point method and the simplex method. . .

7

BIG OPEN QUESTION: Is there strongly polynomial time algorithm for linear programming?

Sariel (UIUC) CS573 15 Fall 2013 15 / 43

slide-68
SLIDE 68

On the ellipsoid method and interior point methods

. .

1

Simplex has exponential running time in the worst case. . .

2

ellipsoid method is weakly polynomial. It is polynomial in the number of bits of the input. . .

3

Khachian in 1979 came up with it. Useless in practice. . .

4

In 1984, Karmakar came up with a different method, called the interior-point method. . .

5

Also weakly polynomial. Quite useful in practice. . .

6

Result in arm race between the interior-point method and the simplex method. . .

7

BIG OPEN QUESTION: Is there strongly polynomial time algorithm for linear programming?

Sariel (UIUC) CS573 15 Fall 2013 15 / 43

slide-69
SLIDE 69

Duality...

. .

1

Every linear program L has a dual linear program L′. . .

2

Solving the dual problem is essentially equivalent to solving the primal linear program original LP. . .

3

Lets look an example..

Sariel (UIUC) CS573 16 Fall 2013 16 / 43

slide-70
SLIDE 70

Duality by Example

max z = 4x1 + x2 + 3x3 s.t. x1 + 4x2 ≤ 1 3x1 − x2 + x3 ≤ 3 x1, x2, x3 ≥ 0 .

1

η: maximal possible value of target function. . .

2

Any feasible solution ⇒ a lower bound on η. . .

3

In above: x1 = 1, x2 = x3 = 0 is feasible, and implies z = 4 and thus η ≥ 4. . .

4

x1 = x2 = 0, x3 = 3 is feasible = ⇒ η ≥ z = 9. . .

5

How close this solution is to opt? (i.e., η) . .

6

If very close to optimal – might be good enough. Maybe stop?

Sariel (UIUC) CS573 17 Fall 2013 17 / 43

slide-71
SLIDE 71

Duality by Example

max z = 4x1 + x2 + 3x3 s.t. x1 + 4x2 ≤ 1 3x1 − x2 + x3 ≤ 3 x1, x2, x3 ≥ 0 .

1

η: maximal possible value of target function. . .

2

Any feasible solution ⇒ a lower bound on η. . .

3

In above: x1 = 1, x2 = x3 = 0 is feasible, and implies z = 4 and thus η ≥ 4. . .

4

x1 = x2 = 0, x3 = 3 is feasible = ⇒ η ≥ z = 9. . .

5

How close this solution is to opt? (i.e., η) . .

6

If very close to optimal – might be good enough. Maybe stop?

Sariel (UIUC) CS573 17 Fall 2013 17 / 43

slide-72
SLIDE 72

Duality by Example

max z = 4x1 + x2 + 3x3 s.t. x1 + 4x2 ≤ 1 3x1 − x2 + x3 ≤ 3 x1, x2, x3 ≥ 0 .

1

η: maximal possible value of target function. . .

2

Any feasible solution ⇒ a lower bound on η. . .

3

In above: x1 = 1, x2 = x3 = 0 is feasible, and implies z = 4 and thus η ≥ 4. . .

4

x1 = x2 = 0, x3 = 3 is feasible = ⇒ η ≥ z = 9. . .

5

How close this solution is to opt? (i.e., η) . .

6

If very close to optimal – might be good enough. Maybe stop?

Sariel (UIUC) CS573 17 Fall 2013 17 / 43

slide-73
SLIDE 73

Duality by Example

max z = 4x1 + x2 + 3x3 s.t. x1 + 4x2 ≤ 1 3x1 − x2 + x3 ≤ 3 x1, x2, x3 ≥ 0 .

1

η: maximal possible value of target function. . .

2

Any feasible solution ⇒ a lower bound on η. . .

3

In above: x1 = 1, x2 = x3 = 0 is feasible, and implies z = 4 and thus η ≥ 4. . .

4

x1 = x2 = 0, x3 = 3 is feasible = ⇒ η ≥ z = 9. . .

5

How close this solution is to opt? (i.e., η) . .

6

If very close to optimal – might be good enough. Maybe stop?

Sariel (UIUC) CS573 17 Fall 2013 17 / 43

slide-74
SLIDE 74

Duality by Example

max z = 4x1 + x2 + 3x3 s.t. x1 + 4x2 ≤ 1 3x1 − x2 + x3 ≤ 3 x1, x2, x3 ≥ 0 .

1

η: maximal possible value of target function. . .

2

Any feasible solution ⇒ a lower bound on η. . .

3

In above: x1 = 1, x2 = x3 = 0 is feasible, and implies z = 4 and thus η ≥ 4. . .

4

x1 = x2 = 0, x3 = 3 is feasible = ⇒ η ≥ z = 9. . .

5

How close this solution is to opt? (i.e., η) . .

6

If very close to optimal – might be good enough. Maybe stop?

Sariel (UIUC) CS573 17 Fall 2013 17 / 43

slide-75
SLIDE 75

Duality by Example

max z = 4x1 + x2 + 3x3 s.t. x1 + 4x2 ≤ 1 3x1 − x2 + x3 ≤ 3 x1, x2, x3 ≥ 0 .

1

η: maximal possible value of target function. . .

2

Any feasible solution ⇒ a lower bound on η. . .

3

In above: x1 = 1, x2 = x3 = 0 is feasible, and implies z = 4 and thus η ≥ 4. . .

4

x1 = x2 = 0, x3 = 3 is feasible = ⇒ η ≥ z = 9. . .

5

How close this solution is to opt? (i.e., η) . .

6

If very close to optimal – might be good enough. Maybe stop?

Sariel (UIUC) CS573 17 Fall 2013 17 / 43

slide-76
SLIDE 76

Duality by Example: II

max z = 4x1 + x2 + 3x3 s.t. x1 + 4x2 ≤ 1 3x1 − x2 + x3 ≤ 3 x1, x2, x3 ≥ 0 .

1

Add the first inequality (multiplied by 2) to the second inequality (multiplied by 3): 2( x1 + 4x2 ) ≤ 2(1) +3(3x1 − x2 + x3) ≤ 3(3). . .

2

The resulting inequality is 11x1 + 5x2 + 3x3 ≤ 11. (1)

Sariel (UIUC) CS573 18 Fall 2013 18 / 43

slide-77
SLIDE 77

Duality by Example: II

max z = 4x1 + x2 + 3x3 s.t. x1 + 4x2 ≤ 1 3x1 − x2 + x3 ≤ 3 x1, x2, x3 ≥ 0 .

1

Add the first inequality (multiplied by 2) to the second inequality (multiplied by 3): 2( x1 + 4x2 ) ≤ 2(1) +3(3x1 − x2 + x3) ≤ 3(3). . .

2

The resulting inequality is 11x1 + 5x2 + 3x3 ≤ 11. (1)

Sariel (UIUC) CS573 18 Fall 2013 18 / 43

slide-78
SLIDE 78

Duality by Example: II

max z = 4x1 + x2 + 3x3 s.t. x1 + 4x2 ≤ 1 3x1 − x2 + x3 ≤ 3 x1, x2, x3 ≥ 0 .

1

got 11x1 + 5x2 + 3x3 ≤ 11. . .

2

inequality must hold for any feasible solution of L. . .

3

Objective: z = 4x1 + x2 + 3x3 and x1,x2 and x3 are all non-negative. . .

4

Inequality above has larger coefficients than objective (for corresponding variables) . .

5

For any feasible solution: z = 4x1 + x2 + 3x3 ≤ 11x1 + 5x2 + 3x3 ≤ 11,

Sariel (UIUC) CS573 19 Fall 2013 19 / 43

slide-79
SLIDE 79

Duality by Example: II

max z = 4x1 + x2 + 3x3 s.t. x1 + 4x2 ≤ 1 3x1 − x2 + x3 ≤ 3 x1, x2, x3 ≥ 0 .

1

got 11x1 + 5x2 + 3x3 ≤ 11. . .

2

inequality must hold for any feasible solution of L. . .

3

Objective: z = 4x1 + x2 + 3x3 and x1,x2 and x3 are all non-negative. . .

4

Inequality above has larger coefficients than objective (for corresponding variables) . .

5

For any feasible solution: z = 4x1 + x2 + 3x3 ≤ 11x1 + 5x2 + 3x3 ≤ 11,

Sariel (UIUC) CS573 19 Fall 2013 19 / 43

slide-80
SLIDE 80

Duality by Example: II

max z = 4x1 + x2 + 3x3 s.t. x1 + 4x2 ≤ 1 3x1 − x2 + x3 ≤ 3 x1, x2, x3 ≥ 0 .

1

got 11x1 + 5x2 + 3x3 ≤ 11. . .

2

inequality must hold for any feasible solution of L. . .

3

Objective: z = 4x1 + x2 + 3x3 and x1,x2 and x3 are all non-negative. . .

4

Inequality above has larger coefficients than objective (for corresponding variables) . .

5

For any feasible solution: z = 4x1 + x2 + 3x3 ≤ 11x1 + 5x2 + 3x3 ≤ 11,

Sariel (UIUC) CS573 19 Fall 2013 19 / 43

slide-81
SLIDE 81

Duality by Example: II

max z = 4x1 + x2 + 3x3 s.t. x1 + 4x2 ≤ 1 3x1 − x2 + x3 ≤ 3 x1, x2, x3 ≥ 0 .

1

got 11x1 + 5x2 + 3x3 ≤ 11. . .

2

inequality must hold for any feasible solution of L. . .

3

Objective: z = 4x1 + x2 + 3x3 and x1,x2 and x3 are all non-negative. . .

4

Inequality above has larger coefficients than objective (for corresponding variables) . .

5

For any feasible solution: z = 4x1 + x2 + 3x3 ≤ 11x1 + 5x2 + 3x3 ≤ 11,

Sariel (UIUC) CS573 19 Fall 2013 19 / 43

slide-82
SLIDE 82

Duality by Example: II

max z = 4x1 + x2 + 3x3 s.t. x1 + 4x2 ≤ 1 3x1 − x2 + x3 ≤ 3 x1, x2, x3 ≥ 0 .

1

got 11x1 + 5x2 + 3x3 ≤ 11. . .

2

inequality must hold for any feasible solution of L. . .

3

Objective: z = 4x1 + x2 + 3x3 and x1,x2 and x3 are all non-negative. . .

4

Inequality above has larger coefficients than objective (for corresponding variables) . .

5

For any feasible solution: z = 4x1 + x2 + 3x3 ≤ 11x1 + 5x2 + 3x3 ≤ 11,

Sariel (UIUC) CS573 19 Fall 2013 19 / 43

slide-83
SLIDE 83

Duality by Example: III

max z = 4x1 + x2 + 3x3 s.t. x1 + 4x2 ≤ 1 3x1 − x2 + x3 ≤ 3 x1, x2, x3 ≥ 0 .

1

For any feasible solution: z = 4x1 + x2 + 3x3 ≤ 11x1 + 5x2 + 3x3 ≤ 11, . .

2

Opt solution is LP L is somewhere between 9 and 11. . .

3

Multiply first inequality by y1, second inequality by y2 and add them up: y1(x1 + 4x2 ) ≤ y1(1) + y2(3x1

  • x2

+ x3 ) ≤ y2(3) (y1 + 3y2)x1 + (4y1 − y2)x2 + y2x3 ≤ y1 + 3y2.

Sariel (UIUC) CS573 20 Fall 2013 20 / 43

slide-84
SLIDE 84

Duality by Example: III

max z = 4x1 + x2 + 3x3 s.t. x1 + 4x2 ≤ 1 3x1 − x2 + x3 ≤ 3 x1, x2, x3 ≥ 0 .

1

For any feasible solution: z = 4x1 + x2 + 3x3 ≤ 11x1 + 5x2 + 3x3 ≤ 11, . .

2

Opt solution is LP L is somewhere between 9 and 11. . .

3

Multiply first inequality by y1, second inequality by y2 and add them up: y1(x1 + 4x2 ) ≤ y1(1) + y2(3x1

  • x2

+ x3 ) ≤ y2(3) (y1 + 3y2)x1 + (4y1 − y2)x2 + y2x3 ≤ y1 + 3y2.

Sariel (UIUC) CS573 20 Fall 2013 20 / 43

slide-85
SLIDE 85

Duality by Example: III

max z = 4x1 + x2 + 3x3 s.t. x1 + 4x2 ≤ 1 3x1 − x2 + x3 ≤ 3 x1, x2, x3 ≥ 0 .

1

For any feasible solution: z = 4x1 + x2 + 3x3 ≤ 11x1 + 5x2 + 3x3 ≤ 11, . .

2

Opt solution is LP L is somewhere between 9 and 11. . .

3

Multiply first inequality by y1, second inequality by y2 and add them up: y1(x1 + 4x2 ) ≤ y1(1) + y2(3x1

  • x2

+ x3 ) ≤ y2(3) (y1 + 3y2)x1 + (4y1 − y2)x2 + y2x3 ≤ y1 + 3y2.

Sariel (UIUC) CS573 20 Fall 2013 20 / 43

slide-86
SLIDE 86

Duality by Example: IV

max z = 4x1 + x2 + 3x3 s.t. x1 + 4x2 ≤ 1 3x1 − x2 + x3 ≤ 3 x1, x2, x3 ≥ 0 .

1

(y1 + 3y2)x1 + (4y1 − y2)x2 + y2x3 ≤ y1 + 3y2. . .

1

Compare to target function – require expression bigger than target function in each variable. = ⇒ z = 4x1 + x2 + 3x3 ≤ (y1 + 3y2)x1 + (4y1 − y2)x2 + y2x3 ≤ y1 + 3y2, the last step follows by previous slide.

Sariel (UIUC) CS573 21 Fall 2013 21 / 43

slide-87
SLIDE 87

Duality by Example: IV

max z = 4x1 + x2 + 3x3 s.t. x1 + 4x2 ≤ 1 3x1 − x2 + x3 ≤ 3 x1, x2, x3 ≥ 0 .

1

(y1 + 3y2)x1 + (4y1 − y2)x2 + y2x3 ≤ y1 + 3y2. . .

1

Compare to target function – require expression bigger than target function in each variable. = ⇒ z = 4x1 + x2 + 3x3 ≤ (y1 + 3y2)x1 + (4y1 − y2)x2 + y2x3 ≤ y1 + 3y2, the last step follows by previous slide.

Sariel (UIUC) CS573 21 Fall 2013 21 / 43

slide-88
SLIDE 88

Duality by Example: IV

max z = 4x1 + x2 + 3x3 s.t. x1 + 4x2 ≤ 1 3x1 − x2 + x3 ≤ 3 x1, x2, x3 ≥ 0 .

1

(y1 + 3y2)x1 + (4y1 − y2)x2 + y2x3 ≤ y1 + 3y2. 4 ≤ y1 + 3y2 1 ≤ 4y1 − y2 3 ≤ y2, . .

1

Compare to target function – require expression bigger than target function in each variable. = ⇒ z = 4x1 + x2 + 3x3 ≤ (y1 + 3y2)x1 + (4y1 − y2)x2 + y2x3 ≤ y1 + 3y2, the last step follows by previous slide.

Sariel (UIUC) CS573 21 Fall 2013 21 / 43

slide-89
SLIDE 89

Duality by Example: IV

max z = 4x1 + x2 + 3x3 s.t. x1 + 4x2 ≤ 1 3x1 − x2 + x3 ≤ 3 x1, x2, x3 ≥ 0 .

1

(y1 + 3y2)x1 + (4y1 − y2)x2 + y2x3 ≤ y1 + 3y2. 4 ≤ y1 + 3y2 1 ≤ 4y1 − y2 3 ≤ y2, . .

1

Compare to target function – require expression bigger than target function in each variable. = ⇒ z = 4x1 + x2 + 3x3 ≤ (y1 + 3y2)x1 + (4y1 − y2)x2 + y2x3 ≤ y1 + 3y2, the last step follows by previous slide.

Sariel (UIUC) CS573 21 Fall 2013 21 / 43

slide-90
SLIDE 90

Duality by Example: IV

Primal LP: max z = 4x1 + x2 + 3x3 s.t. x1 + 4x2 ≤ 1 3x1 − x2 + x3 ≤ 3 x1, x2, x3 ≥ 0 Dual LP: L min y1 + 3y2 s.t. y1 + 3y2 ≥ 4 4y1 − y2 ≥ 1 y2 ≥ 3 y1, y2 ≥ 0. .

1

Best upper bound on η (max value of z) then solve the LP L. . .

2

  • L: Dual program to L.

. .

3

  • pt. solution of

L is an upper bound on optimal solution for L.

Sariel (UIUC) CS573 22 Fall 2013 22 / 43

slide-91
SLIDE 91

Duality by Example: IV

Primal LP: max z = 4x1 + x2 + 3x3 s.t. x1 + 4x2 ≤ 1 3x1 − x2 + x3 ≤ 3 x1, x2, x3 ≥ 0 Dual LP: L min y1 + 3y2 s.t. y1 + 3y2 ≥ 4 4y1 − y2 ≥ 1 y2 ≥ 3 y1, y2 ≥ 0. .

1

Best upper bound on η (max value of z) then solve the LP L. . .

2

  • L: Dual program to L.

. .

3

  • pt. solution of

L is an upper bound on optimal solution for L.

Sariel (UIUC) CS573 22 Fall 2013 22 / 43

slide-92
SLIDE 92

Duality by Example: IV

Primal LP: max z = 4x1 + x2 + 3x3 s.t. x1 + 4x2 ≤ 1 3x1 − x2 + x3 ≤ 3 x1, x2, x3 ≥ 0 Dual LP: L min y1 + 3y2 s.t. y1 + 3y2 ≥ 4 4y1 − y2 ≥ 1 y2 ≥ 3 y1, y2 ≥ 0. .

1

Best upper bound on η (max value of z) then solve the LP L. . .

2

  • L: Dual program to L.

. .

3

  • pt. solution of

L is an upper bound on optimal solution for L.

Sariel (UIUC) CS573 22 Fall 2013 22 / 43

slide-93
SLIDE 93

Duality by Example: IV

Primal LP: max z = 4x1 + x2 + 3x3 s.t. x1 + 4x2 ≤ 1 3x1 − x2 + x3 ≤ 3 x1, x2, x3 ≥ 0 Dual LP: L min y1 + 3y2 s.t. y1 + 3y2 ≥ 4 4y1 − y2 ≥ 1 y2 ≥ 3 y1, y2 ≥ 0. .

1

Best upper bound on η (max value of z) then solve the LP L. . .

2

  • L: Dual program to L.

. .

3

  • pt. solution of

L is an upper bound on optimal solution for L.

Sariel (UIUC) CS573 22 Fall 2013 22 / 43

slide-94
SLIDE 94

Primal program/Dual program

max

n

j=1

cjxj s.t.

n

j=1

aijxj ≤ bi, for i = 1, . . . , m, xj ≥ 0, for j = 1, . . . , n. min

m

i=1

biyi s.t.

m

i=1

aijyi ≥ cj, for j = 1, . . . , n, yi ≥ 0, for i = 1, . . . , m.

Sariel (UIUC) CS573 23 Fall 2013 23 / 43

slide-95
SLIDE 95

Primal program/Dual program

max cTx

  • s. t.

Ax ≤ b. x ≥ 0. min yTb

  • s. t.

yTA ≥ cT. y ≥ 0.

Sariel (UIUC) CS573 24 Fall 2013 24 / 43

slide-96
SLIDE 96

Primal program/Dual program

What happens when you take the dual of the dual? max

n

j=1

cjxj s.t.

n

j=1

aijxj ≤ bi, for i = 1, . . . , m, xj ≥ 0, for j = 1, . . . , n. min

m

i=1

biyi s.t.

m

i=1

aijyi ≥ cj, for j = 1, . . . , n, yi ≥ 0, for i = 1, . . . , m.

Sariel (UIUC) CS573 25 Fall 2013 25 / 43

slide-97
SLIDE 97

Primal program / Dual program in standard form

max

n

j=1

cjxj s.t.

n

j=1

aijxj ≤ bi, for i = 1, . . . , m, xj ≥ 0, for j = 1, . . . , n. max

m

i=1

(−bi)yi s.t.

m

i=1

(−aij)yi ≤ −cj, for j = 1, . . . , n, yi ≥ 0, fori = 1, . . . , m.

Sariel (UIUC) CS573 26 Fall 2013 26 / 43

slide-98
SLIDE 98

Dual program in standard form / Dual of dual program

max

m

i=1

(−bi)yi s.t.

m

i=1

(−aij)yi ≤ −cj, for j = 1, . . . , n, yi ≥ 0, for i = 1, . . . , m. min

n

j=1

−cjxj s.t.

n

j=1

(−aij)xj ≥ −bi, for i = 1, . . . , m, xj ≥ 0, for j = 1, . . . , n.

Sariel (UIUC) CS573 27 Fall 2013 27 / 43

slide-99
SLIDE 99

Dual of dual program / Dual of dual program written in standard form

min

n

j=1

−cjxj s.t.

n

j=1

(−aij)xj ≥ −bi, for i = 1, . . . , m, xj ≥ 0, for j = 1, . . . , n. max

n

j=1

cjxj s.t.

n

j=1

aijxj ≤ bi, for i = 1, . . . , m, xj ≥ 0, for j = 1, . . . , n. = ⇒ Dual of the dual LP is the primal LP!

Sariel (UIUC) CS573 28 Fall 2013 28 / 43

slide-100
SLIDE 100

Dual of dual program / Dual of dual program written in standard form

min

n

j=1

−cjxj s.t.

n

j=1

(−aij)xj ≥ −bi, for i = 1, . . . , m, xj ≥ 0, for j = 1, . . . , n. max

n

j=1

cjxj s.t.

n

j=1

aijxj ≤ bi, for i = 1, . . . , m, xj ≥ 0, for j = 1, . . . , n. = ⇒ Dual of the dual LP is the primal LP!

Sariel (UIUC) CS573 28 Fall 2013 28 / 43

slide-101
SLIDE 101

Result

Proved the following: .

Lemma

. . Let L be an LP, and let L′ be its dual. Let L′′ be the dual to L′. Then L and L′′ are the same LP.

Sariel (UIUC) CS573 29 Fall 2013 29 / 43

slide-102
SLIDE 102

Weak duality theorem

.

Theorem

. . If (x1, x2, . . . , xn) is feasible for the primal LP and (y1, y2, . . . , ym) is feasible for the dual LP, then

j

cjxj ≤

i

biyi. Namely, all the feasible solutions of the dual bound all the feasible solutions of the primal.

Sariel (UIUC) CS573 30 Fall 2013 30 / 43

slide-103
SLIDE 103

Weak duality theorem – proof

.

Proof.

. . By substitution from the dual form, and since the two solutions are feasible, we know that

j

cjxj ≤

j

( m ∑

i=1

yiaij

)

xj ≤

i

 ∑

j

aijxj

  yi ≤ ∑

i

biyi . .

1

y being dual feasible implies cT ≤ yTA . .

2

x being primal feasible implies Ax ≤ b . .

3

⇒ cTx ≤ (yTA)x ≤ yT(Ax) ≤ yTb

Sariel (UIUC) CS573 31 Fall 2013 31 / 43

slide-104
SLIDE 104

Weak duality theorem – proof

.

Proof.

. . By substitution from the dual form, and since the two solutions are feasible, we know that

j

cjxj ≤

j

( m ∑

i=1

yiaij

)

xj ≤

i

 ∑

j

aijxj

  yi ≤ ∑

i

biyi . .

1

y being dual feasible implies cT ≤ yTA . .

2

x being primal feasible implies Ax ≤ b . .

3

⇒ cTx ≤ (yTA)x ≤ yT(Ax) ≤ yTb

Sariel (UIUC) CS573 31 Fall 2013 31 / 43

slide-105
SLIDE 105

Weak duality is weak...

. .

1

If apply the weak duality theorem on the dual program, .

2

= ⇒

m

i=1

(−bi)yi ≤

n

j=1

−cjxj, . .

3

which is the original inequality in the weak duality theorem. . .

4

Weak duality theorem does not imply the strong duality theorem which will be discussed next.

Sariel (UIUC) CS573 32 Fall 2013 32 / 43

slide-106
SLIDE 106

Weak duality is weak...

. .

1

If apply the weak duality theorem on the dual program, .

2

= ⇒

m

i=1

(−bi)yi ≤

n

j=1

−cjxj, . .

3

which is the original inequality in the weak duality theorem. . .

4

Weak duality theorem does not imply the strong duality theorem which will be discussed next.

Sariel (UIUC) CS573 32 Fall 2013 32 / 43

slide-107
SLIDE 107

Weak duality is weak...

. .

1

If apply the weak duality theorem on the dual program, .

2

= ⇒

m

i=1

(−bi)yi ≤

n

j=1

−cjxj, . .

3

which is the original inequality in the weak duality theorem. . .

4

Weak duality theorem does not imply the strong duality theorem which will be discussed next.

Sariel (UIUC) CS573 32 Fall 2013 32 / 43

slide-108
SLIDE 108

Weak duality is weak...

. .

1

If apply the weak duality theorem on the dual program, .

2

= ⇒

m

i=1

(−bi)yi ≤

n

j=1

−cjxj, . .

3

which is the original inequality in the weak duality theorem. . .

4

Weak duality theorem does not imply the strong duality theorem which will be discussed next.

Sariel (UIUC) CS573 32 Fall 2013 32 / 43

slide-109
SLIDE 109

The strong duality theorem

.

Theorem (Strong duality theorem.)

. . If the primal LP problem has an optimal solution x∗ =

(

x∗

1, . . . , x∗ n

)

then the dual also has an optimal solution, y∗ =

(

y∗

1, . . . , y∗ m

)

, such that

j

cjx∗

j =

i

biy∗

i .

Proof is tedious and omitted.

Sariel (UIUC) CS573 33 Fall 2013 33 / 43

slide-110
SLIDE 110

Shortest path

. .

1

G = (V, E): graph. s: source , t: target . .

2

∀ (u → v) ∈ E: weight ω(u, v) on edge. . .

3

Q: Comp. shortest s-t path. . .

4

No edges into s/out of t. . .

5

dx: var=dist. s to x, ∀x ∈ V. . .

6

∀ (u → v) ∈ E: du + ω(u, v) ≥ dv. . .

7

Also ds = 0. . .

8

Trivial solution: all variables 0. . .

9

Target: find assignment max dt. . .

10 LP to solve this! Sariel (UIUC) CS573 34 Fall 2013 34 / 43

slide-111
SLIDE 111

Shortest path

. .

1

G = (V, E): graph. s: source , t: target . .

2

∀ (u → v) ∈ E: weight ω(u, v) on edge. . .

3

Q: Comp. shortest s-t path. . .

4

No edges into s/out of t. . .

5

dx: var=dist. s to x, ∀x ∈ V. . .

6

∀ (u → v) ∈ E: du + ω(u, v) ≥ dv. . .

7

Also ds = 0. . .

8

Trivial solution: all variables 0. . .

9

Target: find assignment max dt. . .

10 LP to solve this! Sariel (UIUC) CS573 34 Fall 2013 34 / 43

slide-112
SLIDE 112

Shortest path

. .

1

G = (V, E): graph. s: source , t: target . .

2

∀ (u → v) ∈ E: weight ω(u, v) on edge. . .

3

Q: Comp. shortest s-t path. . .

4

No edges into s/out of t. . .

5

dx: var=dist. s to x, ∀x ∈ V. . .

6

∀ (u → v) ∈ E: du + ω(u, v) ≥ dv. . .

7

Also ds = 0. . .

8

Trivial solution: all variables 0. . .

9

Target: find assignment max dt. . .

10 LP to solve this! Sariel (UIUC) CS573 34 Fall 2013 34 / 43

slide-113
SLIDE 113

Shortest path

. .

1

G = (V, E): graph. s: source , t: target . .

2

∀ (u → v) ∈ E: weight ω(u, v) on edge. . .

3

Q: Comp. shortest s-t path. . .

4

No edges into s/out of t. . .

5

dx: var=dist. s to x, ∀x ∈ V. . .

6

∀ (u → v) ∈ E: du + ω(u, v) ≥ dv. . .

7

Also ds = 0. . .

8

Trivial solution: all variables 0. . .

9

Target: find assignment max dt. . .

10 LP to solve this! Sariel (UIUC) CS573 34 Fall 2013 34 / 43

slide-114
SLIDE 114

Shortest path

. .

1

G = (V, E): graph. s: source , t: target . .

2

∀ (u → v) ∈ E: weight ω(u, v) on edge. . .

3

Q: Comp. shortest s-t path. . .

4

No edges into s/out of t. . .

5

dx: var=dist. s to x, ∀x ∈ V. . .

6

∀ (u → v) ∈ E: du + ω(u, v) ≥ dv. . .

7

Also ds = 0. . .

8

Trivial solution: all variables 0. . .

9

Target: find assignment max dt. . .

10 LP to solve this! Sariel (UIUC) CS573 34 Fall 2013 34 / 43

slide-115
SLIDE 115

Shortest path

. .

1

G = (V, E): graph. s: source , t: target . .

2

∀ (u → v) ∈ E: weight ω(u, v) on edge. . .

3

Q: Comp. shortest s-t path. . .

4

No edges into s/out of t. . .

5

dx: var=dist. s to x, ∀x ∈ V. . .

6

∀ (u → v) ∈ E: du + ω(u, v) ≥ dv. . .

7

Also ds = 0. . .

8

Trivial solution: all variables 0. . .

9

Target: find assignment max dt. . .

10 LP to solve this! Sariel (UIUC) CS573 34 Fall 2013 34 / 43

slide-116
SLIDE 116

Shortest path

. .

1

G = (V, E): graph. s: source , t: target . .

2

∀ (u → v) ∈ E: weight ω(u, v) on edge. . .

3

Q: Comp. shortest s-t path. . .

4

No edges into s/out of t. . .

5

dx: var=dist. s to x, ∀x ∈ V. . .

6

∀ (u → v) ∈ E: du + ω(u, v) ≥ dv. . .

7

Also ds = 0. . .

8

Trivial solution: all variables 0. . .

9

Target: find assignment max dt. . .

10 LP to solve this! Sariel (UIUC) CS573 34 Fall 2013 34 / 43

slide-117
SLIDE 117

Shortest path

. .

1

G = (V, E): graph. s: source , t: target . .

2

∀ (u → v) ∈ E: weight ω(u, v) on edge. . .

3

Q: Comp. shortest s-t path. . .

4

No edges into s/out of t. . .

5

dx: var=dist. s to x, ∀x ∈ V. . .

6

∀ (u → v) ∈ E: du + ω(u, v) ≥ dv. . .

7

Also ds = 0. . .

8

Trivial solution: all variables 0. . .

9

Target: find assignment max dt. . .

10 LP to solve this! Sariel (UIUC) CS573 34 Fall 2013 34 / 43

slide-118
SLIDE 118

Shortest path

. .

1

G = (V, E): graph. s: source , t: target . .

2

∀ (u → v) ∈ E: weight ω(u, v) on edge. . .

3

Q: Comp. shortest s-t path. . .

4

No edges into s/out of t. . .

5

dx: var=dist. s to x, ∀x ∈ V. . .

6

∀ (u → v) ∈ E: du + ω(u, v) ≥ dv. . .

7

Also ds = 0. . .

8

Trivial solution: all variables 0. . .

9

Target: find assignment max dt. . .

10 LP to solve this! Sariel (UIUC) CS573 34 Fall 2013 34 / 43

slide-119
SLIDE 119

Shortest path

. .

1

G = (V, E): graph. s: source , t: target . .

2

∀ (u → v) ∈ E: weight ω(u, v) on edge. . .

3

Q: Comp. shortest s-t path. . .

4

No edges into s/out of t. . .

5

dx: var=dist. s to x, ∀x ∈ V. . .

6

∀ (u → v) ∈ E: du + ω(u, v) ≥ dv. . .

7

Also ds = 0. . .

8

Trivial solution: all variables 0. . .

9

Target: find assignment max dt. . .

10 LP to solve this! Sariel (UIUC) CS573 34 Fall 2013 34 / 43

slide-120
SLIDE 120

Shortest path

max dt s.t. ds ≤ 0 du + ω(u, v) ≥ dv ∀ (u → v) ∈ E, dx ≥ 0 ∀x ∈ V. . .

1

G = (V, E): graph. s: source , t: target . .

2

∀ (u → v) ∈ E: weight ω(u, v) on edge. . .

3

Q: Comp. shortest s-t path. . .

4

No edges into s/out of t. . .

5

dx: var=dist. s to x, ∀x ∈ V. . .

6

∀ (u → v) ∈ E: du + ω(u, v) ≥ dv. .

7

Also ds = 0. . .

8

Trivial solution: all variables 0. . .

9

Target: find assignment max dt. .

10 LP to solve this! Sariel (UIUC) CS573 34 Fall 2013 34 / 43

slide-121
SLIDE 121

Shortest path

max dt s.t. ds ≤ 0 du + ω(u, v) ≥ dv ∀ (u → v) ∈ E, dx ≥ 0 ∀x ∈ V. Equivalently: max dt s.t. ds ≤ 0 dv − du ≤ ω(u, v) ∀ (u → v) ∈ E, dx ≥ 0 ∀x ∈ V. . .

1

G = (V, E): graph. s: source , t: target . .

2

∀ (u → v) ∈ E: weight ω(u, v) on edge. . .

3

Q: Comp. shortest s-t path. . .

4

No edges into s/out of t. . .

5

dx: var=dist. s to x, ∀x ∈ V. . .

6

∀ (u → v) ∈ E: du + ω(u, v) ≥ dv. .

7

Also ds = 0. . .

8

Trivial solution: all variables 0. . .

9

Target: find assignment max dt. .

10 LP to solve this! Sariel (UIUC) CS573 34 Fall 2013 34 / 43

slide-122
SLIDE 122

The dual

max dt s.t. ds ≤ 0 dv − du ≤ ω(u, v) ∀ (u → v) ∈ E, dx ≥ 0 ∀x ∈ V.

min

(u→v)∈E

yuvω(u, v) s.t. ys −

(s→u)∈E

ysu ≥ 0 (∗)

(u→x)∈E

yux −

(x→v)∈E

yxv ≥ 0 ∀x ∈ V \ {s, t} (∗∗)

(u→t)∈E

yut ≥ 1 (∗ ∗ ∗) yuv ≥ 0, ∀ (u → v) ∈ E, ys ≥ 0.

Sariel (UIUC) CS573 35 Fall 2013 35 / 43

slide-123
SLIDE 123

The dual – details

. .

1

yuv: dual variable for the edge (u → v). . .

2

ys: dual variable for ds ≤ 0 . .

3

Think about the yuv as a flow on the edge yuv. . .

4

Assume that weights are positive. . .

5

LP is min cost flow of sending 1 unit flow from source s to t. . .

6

Indeed... (**) can be assumed to be hold with equality in the

  • ptimal solution...

. .

7

conservation of flow. .

8

Equation (***) implies that one unit of flow arrives to the sink t. . .

9

(*) implies that at least ys units of flow leaves the source. . .

10 Remaining of LP implies that ys ≥ 1. Sariel (UIUC) CS573 36 Fall 2013 36 / 43

slide-124
SLIDE 124

The dual – details

. .

1

yuv: dual variable for the edge (u → v). . .

2

ys: dual variable for ds ≤ 0 . .

3

Think about the yuv as a flow on the edge yuv. . .

4

Assume that weights are positive. . .

5

LP is min cost flow of sending 1 unit flow from source s to t. . .

6

Indeed... (**) can be assumed to be hold with equality in the

  • ptimal solution...

. .

7

conservation of flow. .

8

Equation (***) implies that one unit of flow arrives to the sink t. . .

9

(*) implies that at least ys units of flow leaves the source. . .

10 Remaining of LP implies that ys ≥ 1. Sariel (UIUC) CS573 36 Fall 2013 36 / 43

slide-125
SLIDE 125

The dual – details

. .

1

yuv: dual variable for the edge (u → v). . .

2

ys: dual variable for ds ≤ 0 . .

3

Think about the yuv as a flow on the edge yuv. . .

4

Assume that weights are positive. . .

5

LP is min cost flow of sending 1 unit flow from source s to t. . .

6

Indeed... (**) can be assumed to be hold with equality in the

  • ptimal solution...

. .

7

conservation of flow. .

8

Equation (***) implies that one unit of flow arrives to the sink t. . .

9

(*) implies that at least ys units of flow leaves the source. . .

10 Remaining of LP implies that ys ≥ 1. Sariel (UIUC) CS573 36 Fall 2013 36 / 43

slide-126
SLIDE 126

The dual – details

. .

1

yuv: dual variable for the edge (u → v). . .

2

ys: dual variable for ds ≤ 0 . .

3

Think about the yuv as a flow on the edge yuv. . .

4

Assume that weights are positive. . .

5

LP is min cost flow of sending 1 unit flow from source s to t. . .

6

Indeed... (**) can be assumed to be hold with equality in the

  • ptimal solution...

. .

7

conservation of flow. .

8

Equation (***) implies that one unit of flow arrives to the sink t. . .

9

(*) implies that at least ys units of flow leaves the source. . .

10 Remaining of LP implies that ys ≥ 1. Sariel (UIUC) CS573 36 Fall 2013 36 / 43

slide-127
SLIDE 127

The dual – details

. .

1

yuv: dual variable for the edge (u → v). . .

2

ys: dual variable for ds ≤ 0 . .

3

Think about the yuv as a flow on the edge yuv. . .

4

Assume that weights are positive. . .

5

LP is min cost flow of sending 1 unit flow from source s to t. . .

6

Indeed... (**) can be assumed to be hold with equality in the

  • ptimal solution...

. .

7

conservation of flow. .

8

Equation (***) implies that one unit of flow arrives to the sink t. . .

9

(*) implies that at least ys units of flow leaves the source. . .

10 Remaining of LP implies that ys ≥ 1. Sariel (UIUC) CS573 36 Fall 2013 36 / 43

slide-128
SLIDE 128

The dual – details

. .

1

yuv: dual variable for the edge (u → v). . .

2

ys: dual variable for ds ≤ 0 . .

3

Think about the yuv as a flow on the edge yuv. . .

4

Assume that weights are positive. . .

5

LP is min cost flow of sending 1 unit flow from source s to t. . .

6

Indeed... (**) can be assumed to be hold with equality in the

  • ptimal solution...

. .

7

conservation of flow. .

8

Equation (***) implies that one unit of flow arrives to the sink t. . .

9

(*) implies that at least ys units of flow leaves the source. . .

10 Remaining of LP implies that ys ≥ 1. Sariel (UIUC) CS573 36 Fall 2013 36 / 43

slide-129
SLIDE 129

The dual – details

. .

1

yuv: dual variable for the edge (u → v). . .

2

ys: dual variable for ds ≤ 0 . .

3

Think about the yuv as a flow on the edge yuv. . .

4

Assume that weights are positive. . .

5

LP is min cost flow of sending 1 unit flow from source s to t. . .

6

Indeed... (**) can be assumed to be hold with equality in the

  • ptimal solution...

. .

7

conservation of flow. .

8

Equation (***) implies that one unit of flow arrives to the sink t. . .

9

(*) implies that at least ys units of flow leaves the source. . .

10 Remaining of LP implies that ys ≥ 1. Sariel (UIUC) CS573 36 Fall 2013 36 / 43

slide-130
SLIDE 130

Integrality

. .

1

In the previous example there is always an optimal solution with integral values. . .

2

This is not an obvious statement. . .

3

This is not true in general. . .

4

If it were true we could solve NPC problems with LP.

Sariel (UIUC) CS573 37 Fall 2013 37 / 43

slide-131
SLIDE 131

Integrality

. .

1

In the previous example there is always an optimal solution with integral values. . .

2

This is not an obvious statement. . .

3

This is not true in general. . .

4

If it were true we could solve NPC problems with LP.

Sariel (UIUC) CS573 37 Fall 2013 37 / 43

slide-132
SLIDE 132

Integrality

. .

1

In the previous example there is always an optimal solution with integral values. . .

2

This is not an obvious statement. . .

3

This is not true in general. . .

4

If it were true we could solve NPC problems with LP.

Sariel (UIUC) CS573 37 Fall 2013 37 / 43

slide-133
SLIDE 133

Integrality

. .

1

In the previous example there is always an optimal solution with integral values. . .

2

This is not an obvious statement. . .

3

This is not true in general. . .

4

If it were true we could solve NPC problems with LP.

Sariel (UIUC) CS573 37 Fall 2013 37 / 43

slide-134
SLIDE 134

Set cover...

Details in notes...

Set cover LP: min

Fj∈F

xj s.t.

Fj∈F, ui∈Fj

xj ≥ 1 ∀ui ∈ S, xj ≥ 0 ∀Fj ∈ F.

Sariel (UIUC) CS573 38 Fall 2013 38 / 43

slide-135
SLIDE 135

Set cover dual is a packing LP...

Details in notes...

max

ui∈S

yi s.t.

ui∈Fj

yi ≤ 1 ∀Fj ∈ F, yi ≥ 0 ∀ui ∈ S.

Sariel (UIUC) CS573 39 Fall 2013 39 / 43

slide-136
SLIDE 136

Network flow

max

(s→v)∈E

xs→v xu→v ≤ c(u → v) ∀ (u → v) ∈ E

(u→v)∈E

xu→v −

(v→w)∈E

xv→w ≤ 0 ∀v ∈ V \ {s, t} −

(u→v)∈E

xu→v +

(v→w)∈E

xv→w ≤ 0 ∀v ∈ V \ {s, t} 0 ≤ xu→v ∀ (u → v) ∈ E.

Sariel (UIUC) CS573 40 Fall 2013 40 / 43

slide-137
SLIDE 137

Dual of network flow...

min

(u→v)∈E

c(u → v) yu→v du − dv ≤ yu→v ∀ (u → v) ∈ E yu→v ≥ 0 ∀ (u → v) ∈ E ds = 1, dt = 0. Under right interpretation: shortest path (see notes).

Sariel (UIUC) CS573 41 Fall 2013 41 / 43

slide-138
SLIDE 138

Duality and min-cut max-flow

Details in class notes

.

Lemma

. . The Min-Cut Max-Flow Theorem follows from the strong duality Theorem for Linear Programming.

Sariel (UIUC) CS573 42 Fall 2013 42 / 43

slide-139
SLIDE 139

Solving LPs without ever getting into a loop - symbolic perturbations

Details in the class notes.

Sariel (UIUC) CS573 43 Fall 2013 43 / 43

slide-140
SLIDE 140

Notes

Sariel (UIUC) CS573 44 Fall 2013 44 / 43

slide-141
SLIDE 141

Notes

Sariel (UIUC) CS573 45 Fall 2013 45 / 43

slide-142
SLIDE 142

Notes

Sariel (UIUC) CS573 46 Fall 2013 46 / 43

slide-143
SLIDE 143

Notes

Sariel (UIUC) CS573 47 Fall 2013 47 / 43