lecture 9 duality

Post on 12-Feb-2017

234 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Lecture 9Duality

09-13-2009

DualityEvery LP has its Dual.

Primal(Ex 4.1-1)

max z = 5x1 + 12x2 + 4x3s.t. x1 + 2x2 + x3 ≤ 10

2x1 − x2 + 3x3 = 8x1, x2, x3 ≥ 0.

Dual

min w = 10y1 + 8y2s.t. y1 + 2y2 ≥ 5

2y1 − y2 ≥ 12y1 + 3y2 ≥ 4y1 ≥ 0

Primal Optimal Solution

Primal

max z = 5x1 + 12x2 + 4x3s.t. x1 + 2x2 + x3 ≤ 10

2x1 − x2 + 3x3 = 8x1, x2, x3 ≥ 0.

(x∗1 , x∗2 , x∗3 ) = (5.2, 2.4, 0).

z∗ = 54.8.

Dual Optimal Solution

Dual

min w = 10y1 + 8y2s.t. y1 + 2y2 ≥ 5

2y1 − y2 ≥ 12y1 + 3y2 ≥ 4y1 ≥ 0

(y1, y2) = (5.8,−0.4).

w∗ = 54.8.

DualityDual can be constructed from its primal.

Primal(Ex 4.1-1)

max z = 5x1 + 12x2 + 4x3s.t. x1 + 2x2 + x3 ≤ 10

2x1 − x2 + 3x3 = 8x1, x2, x3 ≥ 0.

Dual

min w = 10y1 + 8y2s.t. y1 + 2y2 ≥ 5

2y1 − y2 ≥ 12y1 + 3y2 ≥ 4y1 ≥ 0

Strong Duality

Economic Interpretation

Economic Interpretation

Ex 4.3-2TOYCO assembles three types of toys: trains, trucks, and carsusing three operations. Available assembly times for the threeoperations are 430, 460 and 420 minutes per day, respectively, andthe revenues per toy train, truck, and car are $3, $2 and $5,respectively. The assembly times per train for the three operationsare 1, 3 and 1 minutes, respectively. The corresponding times pertruck and per car are (2, 0, 4) and (1, 2, 0) minutes (a zero timeindicates that the operations is not used).

Economic Interpretation

Primal

max z = 3x1 + 2x2 + 5x3s.t. x1 + 2x2 + x3 ≤ 430

3x1 + 2x3 ≤ 460x1 + 4x2 ≤ 420x1, x2, x3 ≥ 0.

Optimal solution:z∗ = $1350x∗ = (0, 100, 230).

Economic Interpretation

Dual side of the storyTOYCO’s available assembly times for the three operations are430, 460 and 420 minutes per day. You want to buy all assemblytimes from TOYCO, by paying prices y1, y2, y3 per minute,respectively. You must pay enough for the assembly times becauseotherwise TOYCO would choose not to sell to you, they wouldproduce on their own and profit from it.TOYCO’s revenues per toy train, truck, and car are $3, $2 and $5,respectively. The assembly times per train for the three operationsare 1, 3 and 1 minutes, respectively. The corresponding times pertruck and per car are (2, 0, 4) and (1, 2, 0) minutes.

Economic Interpretation

Dual

max w = 430y1 + 460y2 + 420y3s.t. y1 + 3y2 + y3 ≥ 3

2y1 + 4y3 ≥ 2y1 + 2y2 ≥ 5y1, y2, y3 ≥ 0.

Optimal solution:w∗ = $1350y∗ = (1, 2, 0).

Economic Interpretation

Primal Dualmax z = 3x1 + 2x2 + 5x3 min w = 430y1 + 460y2 + 420y3

s.t. x1 + 2x2 + x3 ≤ 430 s.t. y1 + 3y2 + y3 ≥ 33x1 + 2x3 ≤ 460 2y1 + 4y3 ≥ 2x1 + 4x2 ≤ 420 y1 + 2y2 ≥ 5x1, x2, x3 ≥ 0. y1, y2, y3 ≥ 0.

z∗ = $1350 w∗ = $1350x∗ = (0, 100, 230). y∗ = (1, 2, 0).

Constructing Dual LP

Constructing Dual LP

I Transpose all coefficients.I Flip max/min.

Primal Dualmax z = 3x1 + 2x2 + 5x3 min w = 430y1 + 460y2 + 420y3

s.t. x1 + 2x2 + x3 ≤ 430 s.t. y1 + 3y2 + y3 (?) 33x1 + 2x3 ≤ 460 2y1 + 4y3 (?) 2x1 + 4x2 ≤ 420 y1 + 2y2 (?) 5x1, x2, x3 ≥ 0. y1, y2, y3 (?) 0.

Constructing Dual LP

Constraints Variablesmax min≥ ⇔ ≤ 0≤ ⇔ ≥ 0= ⇔ Unrestrictedmin max≥ ⇔ ≥ 0≤ ⇔ ≤ 0= ⇔ Unrestricted

Constructing Dual LP

TOYCO’s example: primal

max z = 3x1 + 2x2 + 5x3s.t. x1 + 2x2 + x3 ≤ 430

3x1 + 2x3 ≤ 460x1 + 4x2 ≤ 420x1, x2, x3 ≥ 0.

Constructing Dual LP

TOYCO’s example: dual

max w = 430y1 + 460y2 + 420y3s.t. y1 + 3y2 + y3 ≥ 3

2y1 + 4y3 ≥ 2y1 + 2y2 ≥ 5y1, y2, y3 ≥ 0.

QuizMaximization, all variables nonnegative.

Basic x1 x2 x3 x4 x5 x6 Solutionz 7 0 a 0 0 0 210x5 2 0 c 3 1 0 9x2 −3 1 d −1 0 0 bx6 1 0 e 2 0 1 8

I (a) Assume b ≥ 0. What are the basic variables? What is thecurrent objective value? What is the current solution?

I (b) Given a = 2, b = 3, is the tableau optimal?I (c) Given a = 2, b = 3, find another optimal solution.I (d) For what values of a, b, c, d , e is the current table optimal?I (e) If a = −1, b ≥ 0, c, d , e ≤ 0, what can you conclude

about the optimal value?I (f) Give a possible value of (a, b, c, d , e) so that x3 would

replace x2 in the basis.

You can Obtain an optimal tableau by simply knowing two things:I Initial table.I Optimal basic variables.

Example: Initial Table

Basic x1 x2 s1 s2 s3 s4 RHSz −5 −4 0 0 0 0 0s1 6 4 1 0 0 0 24s2 1 2 0 1 0 0 6s3 −1 1 0 0 1 0 1s4 0 1 0 0 0 1 2

Example: Intermediate Table

Basic x1 x2 s1 s2 s3 s4 RHSz 0 −2/3 5/6 0 0 0 20x1 1 2/3 1/6 0 0 0 4s2 0 4/3 −1/6 1 0 0 2s3 0 5/3 1/6 0 1 0 5s4 0 1 0 0 0 1 2

There can be many intermediate tables.

Example: Final(Optimal) Table

Basic x1 x2 s1 s2 s3 s4 RHSz 0 0 3/4 1/2 0 0 21x1 1 0 1/4 −1/2 0 0 3x2 0 1 −1/8 3/4 0 0 3/2s3 0 0 3/8 −5/4 1 0 5/2s4 0 0 1/8 −3/4 0 1 1/2

Constructing Dual LP

Constructing Dual LP

Constraints Variablesmax min≥ ⇔ ≤ 0≤ ⇔ ≥ 0= ⇔ Unrestrictedmin max≥ ⇔ ≥ 0≤ ⇔ ≤ 0= ⇔ Unrestricted

Constructing Dual LP

Primal(Ex 4.1-1)

max z = 5x1 + 12x2 + 4x3s.t. x1 + 2x2 + x3 ≤ 10

2x1 − x2 + 3x3 = 8x1, x2, x3 ≥ 0.

Constructing Dual LP

Dual(Ex 4.1-1)

min w = 10y1 + 8y2s.t. y1 + 2y2 ≥ 5

2y1 − y2 ≥ 12y1 + 3y2 ≥ 4y1 ≥ 0

Constructing Dual LP from standard form

Standard form:I Constraints: =.I Variables: ≥ 0.

Dual of standard form:I Dual variables: unrestricted.I Dual Constraints:

I ≥ 0 if dual is min.I ≤ 0 if dual is max.

Constructing Dual LP from standard form

Ex 4.1-1

max z = 5x1 + 12x2 + 4x3s.t. x1 + 2x2 + x3 ≤ 10

2x1 − x2 + 3x3 = 8x1, x2, x3 ≥ 0.

Constructing Dual LP from standard form

Ex 4.1-1, standard form

max z = 5x1 + 12x2 + 4x3s.t. x1 + 2x2 + x3 + x4 = 10

2x1 − x2 + 3x3 = 8x1, · · · , x4 ≥ 0.

Constructing Dual LP from standard form

Dual of Ex 4.1-1

min w = 10y1 + 8y2s.t. y1 + 2y2 ≥ 5

2y1 − y2 ≥ 12y1 + 3y2 ≥ 4y1 ≥ 0

Constructing Dual LP from standard form

Primal of Ex 4.1-2

min z = 15x1 + 12x2s.t. x1 + 2x2 ≥ 3

2x1 − 4x2 ≤ 5x1, x2 ≥ 0.

Constructing Dual LP from standard form

Ex 4.1-2, standard form

min z = 15x1 + 12x2s.t. x1 + 2x2 − x3 = 3

2x1 − 4x2 + x4 = 5x1, · · · , x4 ≥ 0.

Constructing Dual LP from standard form

Dual of Ex 4.1-2

min w = 3y1 + 5y2s.t. y1 + 2y2 ≤ 15

2y1 − 4y2 ≤ 12y1 ≥ 0y2 ≤ 0.

Constructing Dual LP from standard form

Primal of Ex 4.1-3

max z = 5x1 + 6x2s.t. x1 + 2x2 = 5

−x1 + 5x2 ≥ 34x1 + 7x2 ≤ 8x1 unrestrictedx2 ≥ 0.

Constructing Dual LP from standard form

Substitute x1 = x+1 − x−1 :

Ex 4.1-3, standard form

max z = 5x+1 − 5x−1 + 6x2

s.t. x+1 − x−1 + 2x2 = 5−x+

1 + x−1 + 5x2 − x3 = 34x+

1 − 4x−1 + 7x2 + x4 = 8x+

1 , x−1 , x2, x3, x4 ≥ 0.

Constructing Dual LP from standard form

Dual of Ex 4.1-3

min w = 5y1 + 3y2 + 8y3s.t. y1 − y2 + 4y3 = 5

2y1 + 5y2 + 7y3 ≥ 6y1 unrestrictedy2 ≤ 0y3 ≥ 0.

Optimal Dual Solution

Primal and Dual solution meet at optimality. How do youdetermine the optimal dual variables when you solved the primal?

Ex 4.2-1

max z = 5x1 + 12x2 + 4x3s.t. x1 + 2x2 + x3 ≤ 10

2x1 − x2 + 3x3 = 8x1, x2, x3 ≥ 0.

Optimal Dual Solution

Primal Dualmax z = 5x1 + 12x2 + 4x3 −MR min w = 10y1 + 8y2

s.t. x1 + 2x2 + x3 + x4 = 10 s.t. y1 + 2y2 ≥ 52x1 − x2 + 3x3 + R = 8 2y1 − y2 ≥ 12x1, · · · , x4,R ≥ 0 y1 + 3y2 ≥ 4

y1 ≥ 0y2 ≥ −M.

Optimal Dual Solution

Initial Table

Basic x1 x2 x3 x4 R RHSz −5 −12 −4 0 M 0

x4 1 2 1 1 0 10R 2 −1 3 0 1 8

Optimal Table

Basic x1 x2 x3 x4 R RHSz 0 0 3

5295 −2

5 + M 5445

x2 0 1 −15

25 −1

5125

x1 1 0 75

15

25

265

Method 1

Optimal value of dual variable yi =

Optimal primal z-coefficient of starting basic variable xi

+

Original objective coefficient of xi .(y1y2

)=

(29/5

−2/5 + M

)+

(0−M

)=

(29/5−2/5

)

I Distinguish between starting basis and optimal basis.I Distinguish between z-coefficient and objective coefficient.

Method 2Optimal value of dual variables = Row vectors of

original objective coefficientsof optimal primal basic variables

× (Optimal primal

inverse

)

(y1 y2

)=

(12 5

)×(

2 1−1 2

)−1

=(12 5

)×(2/5 −1/51/5 2/5

)=

(29/5 −2/5

)

I (·)−1 means matrix inversion.

top related