Primal-Dual Algorithm Math 482, Lecture 29 Misha Lavrov April 17, - - PowerPoint PPT Presentation

primal dual algorithm
SMART_READER_LITE
LIVE PREVIEW

Primal-Dual Algorithm Math 482, Lecture 29 Misha Lavrov April 17, - - PowerPoint PPT Presentation

Introduction The direction-finding problem The augmenting step The restricted primal Primal-Dual Algorithm Math 482, Lecture 29 Misha Lavrov April 17, 2020 Introduction The direction-finding problem The augmenting step The restricted


slide-1
SLIDE 1

Introduction The direction-finding problem The augmenting step The restricted primal

Primal-Dual Algorithm

Math 482, Lecture 29 Misha Lavrov April 17, 2020

slide-2
SLIDE 2

Introduction The direction-finding problem The augmenting step The restricted primal

The problem

Our goal: to solve the primal-dual pair of linear programs below. (P)        minimize

x∈Rn

cTx subject to Ax = b x ≥ 0 (D)        maximize

u∈Rm

uTb subject to uTA ≤ cT u unrestricted

slide-3
SLIDE 3

Introduction The direction-finding problem The augmenting step The restricted primal

The problem

Our goal: to solve the primal-dual pair of linear programs below. (P)        minimize

x∈Rn

cTx subject to Ax = b x ≥ 0 (D)        maximize

u∈Rm

uTb subject to uTA ≤ cT u unrestricted We will try to improve on the simplex algorithm by taking long jumps across the feasible region for (D).

slide-4
SLIDE 4

Introduction The direction-finding problem The augmenting step The restricted primal

The problem

Our goal: to solve the primal-dual pair of linear programs below. (P)        minimize

x∈Rn

cTx subject to Ax = b x ≥ 0 (D)        maximize

u∈Rm

uTb subject to uTA ≤ cT u unrestricted We will try to improve on the simplex algorithm by taking long jumps across the feasible region for (D). Motivation: the Ford–Fulkerson method, where a single augmenting steps changes many variables at once.

slide-5
SLIDE 5

Introduction The direction-finding problem The augmenting step The restricted primal

The direction-finding problem

Consider the following example: (D)            maximize

u∈R2

3u1 + 3u2 subject to 2u1 + 4u2 ≤ 2 u1 − u2 ≤ 2 −4u1 + u2 ≤ 1 We are at the point u = (1, 0) and want to pick a direction v to go. What is the best direction, and how do we find it?

slide-6
SLIDE 6

Introduction The direction-finding problem The augmenting step The restricted primal

The direction-finding problem

Consider the following example: (D)            maximize

u∈R2

3u1 + 3u2 subject to 2u1 + 4u2 ≤ 2 u1 − u2 ≤ 2 −4u1 + u2 ≤ 1 We are at the point u = (1, 0) and want to pick a direction v to go. What is the best direction, and how do we find it? Answer 1. (From calculus.) Gradient descent: take v proportional to b = (3, 3), the cost vector.

slide-7
SLIDE 7

Introduction The direction-finding problem The augmenting step The restricted primal

The direction-finding problem

Consider the following example: (D)            maximize

u∈R2

3u1 + 3u2 subject to 2u1 + 4u2 ≤ 2 u1 − u2 ≤ 2 −4u1 + u2 ≤ 1 We are at the point u = (1, 0) and want to pick a direction v to go. What is the best direction, and how do we find it? Answer 1. (From calculus.) Gradient descent: take v proportional to b = (3, 3), the cost vector. Answer 2. We should also make sure we don’t accidentally leave the feasible region.

slide-8
SLIDE 8

Introduction The direction-finding problem The augmenting step The restricted primal

The linear program for v

We can find v using a linear program:

slide-9
SLIDE 9

Introduction The direction-finding problem The augmenting step The restricted primal

The linear program for v

We can find v using a linear program: Objective function: we want to improve 3u1 + 3u2 as quickly as possible, so we maximize 3v1 + 3v2.

slide-10
SLIDE 10

Introduction The direction-finding problem The augmenting step The restricted primal

The linear program for v

We can find v using a linear program: Objective function: we want to improve 3u1 + 3u2 as quickly as possible, so we maximize 3v1 + 3v2. Boundary conditions: At u = (1, 0), the constraint 2u1 + 4u2 ≤ 2 is tight, so we make sure we don’t violate it and ask that 2v1 + 4v2 ≤ 0.

slide-11
SLIDE 11

Introduction The direction-finding problem The augmenting step The restricted primal

The linear program for v

We can find v using a linear program: Objective function: we want to improve 3u1 + 3u2 as quickly as possible, so we maximize 3v1 + 3v2. Boundary conditions: At u = (1, 0), the constraint 2u1 + 4u2 ≤ 2 is tight, so we make sure we don’t violate it and ask that 2v1 + 4v2 ≤ 0. The constraints u1 − u2 ≤ 2 and −4u1 + u2 ≤ 1 are slack, so we ignore them.

slide-12
SLIDE 12

Introduction The direction-finding problem The augmenting step The restricted primal

The linear program for v

We can find v using a linear program: Objective function: we want to improve 3u1 + 3u2 as quickly as possible, so we maximize 3v1 + 3v2. Boundary conditions: At u = (1, 0), the constraint 2u1 + 4u2 ≤ 2 is tight, so we make sure we don’t violate it and ask that 2v1 + 4v2 ≤ 0. The constraints u1 − u2 ≤ 2 and −4u1 + u2 ≤ 1 are slack, so we ignore them. Scaling constraints: we just want a direction, not a

  • magnitude. So we limit v by asking that v1, v2 ≤ 1.
slide-13
SLIDE 13

Introduction The direction-finding problem The augmenting step The restricted primal

The linear program for v

We can find v using a linear program: Objective function: we want to improve 3u1 + 3u2 as quickly as possible, so we maximize 3v1 + 3v2. Boundary conditions: At u = (1, 0), the constraint 2u1 + 4u2 ≤ 2 is tight, so we make sure we don’t violate it and ask that 2v1 + 4v2 ≤ 0. The constraints u1 − u2 ≤ 2 and −4u1 + u2 ≤ 1 are slack, so we ignore them. Scaling constraints: we just want a direction, not a

  • magnitude. So we limit v by asking that v1, v2 ≤ 1.

(Fine print: this only works if the coefficients in the objective function uTb are nonnegative, but we can make sure that this holds.)

slide-14
SLIDE 14

Introduction The direction-finding problem The augmenting step The restricted primal

The direction-finding linear program

The original LP, (D), leads to the auxiliary LP, (DRP): (D)        maximize

u∈Rm

uTb subject to uTA ≤ cT u unrestricted (DRP)        maximize

v∈Rm

vTb subject to vTAJ ≤ 0T v1, . . . , vm ≤ 1 (Here, J indexes constraints which are tight at the initial point u.)

slide-15
SLIDE 15

Introduction The direction-finding problem The augmenting step The restricted primal

The direction-finding linear program

The original LP, (D), leads to the auxiliary LP, (DRP): (D)        maximize

u∈Rm

uTb subject to uTA ≤ cT u unrestricted (DRP)        maximize

v∈Rm

vTb subject to vTAJ ≤ 0T v1, . . . , vm ≤ 1 (Here, J indexes constraints which are tight at the initial point u.) In our example, we get: (DRP)            maximize

v∈R2

3v1 + 3v2 subject to 2v1 + 4v2 ≤ 0 v1 ≤ 1 v2 ≤ 1

slide-16
SLIDE 16

Introduction The direction-finding problem The augmenting step The restricted primal

The augmenting step

We can now do the primal-dual algorithm, just very badly.

slide-17
SLIDE 17

Introduction The direction-finding problem The augmenting step The restricted primal

The augmenting step

We can now do the primal-dual algorithm, just very badly.

1 Start at some solution to (D). (u1, u2) = (1, 0)

slide-18
SLIDE 18

Introduction The direction-finding problem The augmenting step The restricted primal

The augmenting step

We can now do the primal-dual algorithm, just very badly.

1 Start at some solution to (D). (u1, u2) = (1, 0) 2 Write the direction-finding problem (DRP). (previous slide)

slide-19
SLIDE 19

Introduction The direction-finding problem The augmenting step The restricted primal

The augmenting step

We can now do the primal-dual algorithm, just very badly.

1 Start at some solution to (D). (u1, u2) = (1, 0) 2 Write the direction-finding problem (DRP). (previous slide) 3 Solve (DRP) to find a direction v. We get (v1, v2) = (1, − 1

2)

slide-20
SLIDE 20

Introduction The direction-finding problem The augmenting step The restricted primal

The augmenting step

We can now do the primal-dual algorithm, just very badly.

1 Start at some solution to (D). (u1, u2) = (1, 0) 2 Write the direction-finding problem (DRP). (previous slide) 3 Solve (DRP) to find a direction v. We get (v1, v2) = (1, − 1

2)

4 Find the largest t such that u + tv is still feasible for (D).

slide-21
SLIDE 21

Introduction The direction-finding problem The augmenting step The restricted primal

The augmenting step

We can now do the primal-dual algorithm, just very badly.

1 Start at some solution to (D). (u1, u2) = (1, 0) 2 Write the direction-finding problem (DRP). (previous slide) 3 Solve (DRP) to find a direction v. We get (v1, v2) = (1, − 1

2)

4 Find the largest t such that u + tv is still feasible for (D).

     2(u1 + tv1) + 4(u2 + tv2) ≤ 2 holds automatically

slide-22
SLIDE 22

Introduction The direction-finding problem The augmenting step The restricted primal

The augmenting step

We can now do the primal-dual algorithm, just very badly.

1 Start at some solution to (D). (u1, u2) = (1, 0) 2 Write the direction-finding problem (DRP). (previous slide) 3 Solve (DRP) to find a direction v. We get (v1, v2) = (1, − 1

2)

4 Find the largest t such that u + tv is still feasible for (D).

     2(u1 + tv1) + 4(u2 + tv2) ≤ 2 holds automatically (u1 + tv1) − (u2 + tv2) ≤ 2 = ⇒ t ≤ 2

3

slide-23
SLIDE 23

Introduction The direction-finding problem The augmenting step The restricted primal

The augmenting step

We can now do the primal-dual algorithm, just very badly.

1 Start at some solution to (D). (u1, u2) = (1, 0) 2 Write the direction-finding problem (DRP). (previous slide) 3 Solve (DRP) to find a direction v. We get (v1, v2) = (1, − 1

2)

4 Find the largest t such that u + tv is still feasible for (D).

     2(u1 + tv1) + 4(u2 + tv2) ≤ 2 holds automatically (u1 + tv1) − (u2 + tv2) ≤ 2 = ⇒ t ≤ 2

3

−4(u1 + tv1) + (u2 + tv2) ≤ 1 = ⇒ t ≥ − 9

10

slide-24
SLIDE 24

Introduction The direction-finding problem The augmenting step The restricted primal

The augmenting step

We can now do the primal-dual algorithm, just very badly.

1 Start at some solution to (D). (u1, u2) = (1, 0) 2 Write the direction-finding problem (DRP). (previous slide) 3 Solve (DRP) to find a direction v. We get (v1, v2) = (1, − 1

2)

4 Find the largest t such that u + tv is still feasible for (D).

     2(u1 + tv1) + 4(u2 + tv2) ≤ 2 holds automatically (u1 + tv1) − (u2 + tv2) ≤ 2 = ⇒ t ≤ 2

3

−4(u1 + tv1) + (u2 + tv2) ≤ 1 = ⇒ t ≥ − 9

10

Largest value of t allowed is t = 2

3.

slide-25
SLIDE 25

Introduction The direction-finding problem The augmenting step The restricted primal

The augmenting step

We can now do the primal-dual algorithm, just very badly.

1 Start at some solution to (D). (u1, u2) = (1, 0) 2 Write the direction-finding problem (DRP). (previous slide) 3 Solve (DRP) to find a direction v. We get (v1, v2) = (1, − 1

2)

4 Find the largest t such that u + tv is still feasible for (D).

     2(u1 + tv1) + 4(u2 + tv2) ≤ 2 holds automatically (u1 + tv1) − (u2 + tv2) ≤ 2 = ⇒ t ≤ 2

3

−4(u1 + tv1) + (u2 + tv2) ≤ 1 = ⇒ t ≥ − 9

10

Largest value of t allowed is t = 2

3.

5 Replace u by u + tv and go back to step 2. u + 2

3v = ( 5 3, − 1 3).

slide-26
SLIDE 26

Introduction The direction-finding problem The augmenting step The restricted primal

A made-up example

What this ideally looks like:

slide-27
SLIDE 27

Introduction The direction-finding problem The augmenting step The restricted primal

A made-up example

What this ideally looks like:

slide-28
SLIDE 28

Introduction The direction-finding problem The augmenting step The restricted primal

A made-up example

What this ideally looks like:

slide-29
SLIDE 29

Introduction The direction-finding problem The augmenting step The restricted primal

A made-up example

What this ideally looks like:

slide-30
SLIDE 30

Introduction The direction-finding problem The augmenting step The restricted primal

A made-up example

What this ideally looks like:

slide-31
SLIDE 31

Introduction The direction-finding problem The augmenting step The restricted primal

A made-up example

What this ideally looks like:

slide-32
SLIDE 32

Introduction The direction-finding problem The augmenting step The restricted primal

A made-up example

What this ideally looks like: We stop when we reach a point where t = 0 and we cannot make any further improvement.

slide-33
SLIDE 33

Introduction The direction-finding problem The augmenting step The restricted primal

A made-up example

What this ideally looks like: We stop when we reach a point where t = 0 and we cannot make any further improvement. In theory, the advantage is that we do many fewer iterations.

slide-34
SLIDE 34

Introduction The direction-finding problem The augmenting step The restricted primal

A made-up example

What this ideally looks like: We stop when we reach a point where t = 0 and we cannot make any further improvement. In theory, the advantage is that we do many fewer iterations. Right now, the disadvantage is that each iteration requires solving its own LP. This is way too slow!

slide-35
SLIDE 35

Introduction The direction-finding problem The augmenting step The restricted primal

The restricted primal

We fix this by coming up with a fourth linear program.

slide-36
SLIDE 36

Introduction The direction-finding problem The augmenting step The restricted primal

The restricted primal

We fix this by coming up with a fourth linear program. (P)        minimize

x∈Rn

cTx subject to Ax = b x ≥ 0

slide-37
SLIDE 37

Introduction The direction-finding problem The augmenting step The restricted primal

The restricted primal

We fix this by coming up with a fourth linear program. (P)        minimize

x∈Rn

cTx subject to Ax = b x ≥ 0 (D) maximize

u∈Rm

uTb subject to uTA ≤ cT

slide-38
SLIDE 38

Introduction The direction-finding problem The augmenting step The restricted primal

The restricted primal

We fix this by coming up with a fourth linear program. (P)        minimize

x∈Rn

cTx subject to Ax = b x ≥ 0 (D) maximize

u∈Rm

uTb subject to uTA ≤ cT (DRP)        maximize

v∈Rm

vTb subject to vTAJ ≤ 0T v1, . . . , vm ≤ 1

slide-39
SLIDE 39

Introduction The direction-finding problem The augmenting step The restricted primal

The restricted primal

We fix this by coming up with a fourth linear program. (P)        minimize

x∈Rn

cTx subject to Ax = b x ≥ 0 (RP)        minimize

x∈Rn,y∈Rm

y1 + · · · + ym subject to AJxJ + Iy = b x, y ≥ 0 (D) maximize

u∈Rm

uTb subject to uTA ≤ cT (DRP)        maximize

v∈Rm

vTb subject to vTAJ ≤ 0T v1, . . . , vm ≤ 1

slide-40
SLIDE 40

Introduction The direction-finding problem The augmenting step The restricted primal

Constructing the restricted primal

The restricted primal (RP) is the dual of (DRP), which is what we called the direction-finding linear program.

slide-41
SLIDE 41

Introduction The direction-finding problem The augmenting step The restricted primal

Constructing the restricted primal

The restricted primal (RP) is the dual of (DRP), which is what we called the direction-finding linear program. It can also be obtained directly from (P): First, delete all primal variables xj for which the jth dual constraint is slack.

slide-42
SLIDE 42

Introduction The direction-finding problem The augmenting step The restricted primal

Constructing the restricted primal

The restricted primal (RP) is the dual of (DRP), which is what we called the direction-finding linear program. It can also be obtained directly from (P): First, delete all primal variables xj for which the jth dual constraint is slack. Then, add a new variable yi to the ith constraint, for every i.

slide-43
SLIDE 43

Introduction The direction-finding problem The augmenting step The restricted primal

Constructing the restricted primal

The restricted primal (RP) is the dual of (DRP), which is what we called the direction-finding linear program. It can also be obtained directly from (P): First, delete all primal variables xj for which the jth dual constraint is slack. Then, add a new variable yi to the ith constraint, for every i. Replace the objective function, instead minimizing y1 + · · · + ym.

slide-44
SLIDE 44

Introduction The direction-finding problem The augmenting step The restricted primal

Constructing the restricted primal

The restricted primal (RP) is the dual of (DRP), which is what we called the direction-finding linear program. It can also be obtained directly from (P): First, delete all primal variables xj for which the jth dual constraint is slack. Then, add a new variable yi to the ith constraint, for every i. Replace the objective function, instead minimizing y1 + · · · + ym. Independent motivation: (RP) has an objective value of 0 if and

  • nly if AJxJ = b, x ≥ 0 has a solution, which is the complementary

slackness condition to see if u is optimal.

slide-45
SLIDE 45

Introduction The direction-finding problem The augmenting step The restricted primal

Goal of the restricted primal

We will improve the primal-dual algorithm by solving (RP) instead

  • f (DRP).

(We’ll still be able to find the direction v from the optimal tableau for (RP).)

slide-46
SLIDE 46

Introduction The direction-finding problem The augmenting step The restricted primal

Goal of the restricted primal

We will improve the primal-dual algorithm by solving (RP) instead

  • f (DRP).

(We’ll still be able to find the direction v from the optimal tableau for (RP).) Here’s why this will help: Solving (DRP) requires starting from scratch every time: whatever the optimal direction v was at the previous iteration, it’s definitely not valid any more.

slide-47
SLIDE 47

Introduction The direction-finding problem The augmenting step The restricted primal

Goal of the restricted primal

We will improve the primal-dual algorithm by solving (RP) instead

  • f (DRP).

(We’ll still be able to find the direction v from the optimal tableau for (RP).) Here’s why this will help: Solving (DRP) requires starting from scratch every time: whatever the optimal direction v was at the previous iteration, it’s definitely not valid any more. However, (RP) keeps its constraints the same, possibly adding

  • r removing variables, and it turns out that the optimal

solution to (RP) will be a valid starting point for the next iteration of (RP).