lesson 30: duality in linear programming

28
Lesson 30 (Section 19.2–3) Duality in Linear Programming Math 20 December 3, 2007 Announcements I Problem Set 11 on the WS. Due December 5. I next OH: Monday 1–2 (SC 323) I next PS: Sunday 6–7 (SC B-10) I Midterm II review: Tuesday 12/4, 7:30-9:00pm in Hall E I Midterm II: Thursday, 12/6, 7-8:30pm in Hall A

Upload: guest463822

Post on 20-Jun-2015

4.921 views

Category:

Technology


0 download

DESCRIPTION

Every linear programming problem has a dual problem, which in many cases has an interesting interpretation. The original ("primal") problem and the dual problem have the same extreme value.

TRANSCRIPT

Page 1: Lesson 30: Duality In Linear Programming

Lesson 30 (Section 19.2–3)Duality in Linear Programming

Math 20

December 3, 2007

Announcements

I Problem Set 11 on the WS. Due December 5.

I next OH: Monday 1–2 (SC 323)

I next PS: Sunday 6–7 (SC B-10)

I Midterm II review: Tuesday 12/4, 7:30-9:00pm in Hall E

I Midterm II: Thursday, 12/6, 7-8:30pm in Hall A

Page 2: Lesson 30: Duality In Linear Programming

Outline

Recap

Example

Shadow Prices

The Dual Problem

Page 3: Lesson 30: Duality In Linear Programming

DefinitionA linear programming problem is a constrained optimizationproblem with a linear objective function and linear inequalityconstraints.

DefinitionAn LP problem is in standard form if it is expressed as

max z = c1x1 + c2x2 + · · ·+ cnxn

subject to the constraints

a11x1 + a12x2 + · · ·+ a1nxn ≤ b1

a21x1 + a22x2 + · · ·+ a2nxn ≤ b2

......

am1x1 + am2x2 + · · ·+ amnxn ≤ bm

x1, x2, . . . , xn ≥ 0

Page 4: Lesson 30: Duality In Linear Programming

DefinitionA linear programming problem is a constrained optimizationproblem with a linear objective function and linear inequalityconstraints.

DefinitionAn LP problem is in standard form if it is expressed as

max z = c1x1 + c2x2 + · · ·+ cnxn

subject to the constraints

a11x1 + a12x2 + · · ·+ a1nxn ≤ b1

a21x1 + a22x2 + · · ·+ a2nxn ≤ b2

......

am1x1 + am2x2 + · · ·+ amnxn ≤ bm

x1, x2, . . . , xn ≥ 0

Page 5: Lesson 30: Duality In Linear Programming

In vector notation, an LP problem in standard form looks like

max z = c · x

subject to constraints

Ax ≤ b x ≥ 0

Page 6: Lesson 30: Duality In Linear Programming

Theorem of the Day for Friday

Theorem (The Corner Principle)

In any linear programming problem, the extreme values of theobjective function, if achieved, will be achieved on a corner of thefeasibility set.

Page 7: Lesson 30: Duality In Linear Programming

Outline

Recap

Example

Shadow Prices

The Dual Problem

Page 8: Lesson 30: Duality In Linear Programming

Example

Example

We are starting a business selling two Harvard insignia products:sweaters and scarves. The profits on each are $35 and $10,respectively. Each has a pre-bought embroidered crest sewn on it;we have 2000 crests on hand. Sweaters take four skeins of yarnwhile scarves only take one, and there are 2300 skeins of yarnavailable. Finally, we have available storage space for 1250 scarves;we could use any of that space for sweaters, too, but sweaters takeup half again as much space as scarves.What product mix maximizes revenue?

Page 9: Lesson 30: Duality In Linear Programming

Formulating the problem

Let x be the number of sweaters and y the number of scarvesmade. We want to

max z = 35x + 10y

subject to

x + y ≤ 2000

4x + y ≤ 2300

3x + 2y ≤ 2500

x , y ≥ 0

Page 10: Lesson 30: Duality In Linear Programming

Finding the corners

x+

y=

2000

4x+

y=

23003x

+2y

=2500

575 83313

2000

1250

2000

2300

(420, 620)

Notice one constraint issuperfluous!

z(0, 0) = 0

z(575, 0) = 20, 125

z(0, 1250) = 12, 500

z(420, 620) = 20, 900

Page 11: Lesson 30: Duality In Linear Programming

Answer

We should make 420 sweaters and 620 scarves.

Page 12: Lesson 30: Duality In Linear Programming

Outline

Recap

Example

Shadow Prices

The Dual Problem

Page 13: Lesson 30: Duality In Linear Programming

Suppose our business were suddenly given

I one additional crest patch?

I one additional skein of yarn?

I one additional unit of storage space?

How much would profits change?

Page 14: Lesson 30: Duality In Linear Programming

One more patch

x+

y=

2001

4x+

y=

23003x

+2y

=2500

575 83313

2000

1250

2000

2300

(420, 620)

I Since we weren’t “up against”this constraint in the first place,one extra doesn’t change ouroptimal product mix.

I At this product mix, themarginal profit of patches is 0.

Page 15: Lesson 30: Duality In Linear Programming

One more skein

x+

y=

2000

4x+

y=

23013x

+2y

=2500

575 83313

2000

1250

2000

2300

(420.4, 619.4)

I We’ll make a little more sweaterand less scarf

I The marginal profit is

∆z = 35(0.4) + 10(−0.6) = 8

Page 16: Lesson 30: Duality In Linear Programming

One more storage unit

x+

y=

2000

3x+

2y=

2501575 8331

32000

1250

2000

2300

•(419.8, 620.8)

I We’ll make a little less sweaterand more scarf

I The marginal profit is

∆z = 35(−0.2) + 10(0.8) = 1

Page 17: Lesson 30: Duality In Linear Programming

Shadow Prices

DefinitionIn a linear programming problem in standard form, the change inthe objective function obtained by increasing a constraint by one iscalled the shadow price of that constraint.

Example

In our example problem,

I The shadow price of patches is zero

I The shadow price of yarn is 8

I The shadow price of storage is 1

We should look into getting more yarn!

Page 18: Lesson 30: Duality In Linear Programming

Shadow Prices

DefinitionIn a linear programming problem in standard form, the change inthe objective function obtained by increasing a constraint by one iscalled the shadow price of that constraint.

Example

In our example problem,

I The shadow price of patches is zero

I The shadow price of yarn is 8

I The shadow price of storage is 1

We should look into getting more yarn!

Page 19: Lesson 30: Duality In Linear Programming

Outline

Recap

Example

Shadow Prices

The Dual Problem

Page 20: Lesson 30: Duality In Linear Programming

QuestionSuppose an entrepreneur wants to buy our business’s resources.What prices should be quoted for each crest? skein of yarn? unitof storage?

Answer.Suppose the entrepreneur quotes p for each crest patch, q for eachskein of yarn, and r for each storage unit.

I Each sweater takes one patch, 4 skeins, and 3 storage units,so effectively p + 4q + 3r is bid per sweater

I Likewise, p + q + 2r is bid per scarf.

So we must have

p + 4q + 3r ≥ 35

p + q + 2r ≥ 10

for us to sell out. The entrepreneur’s goal is to minimize the totalpayout

w = 2000p + 2300q + 2500r

Page 21: Lesson 30: Duality In Linear Programming

QuestionSuppose an entrepreneur wants to buy our business’s resources.What prices should be quoted for each crest? skein of yarn? unitof storage?

Answer.Suppose the entrepreneur quotes p for each crest patch, q for eachskein of yarn, and r for each storage unit.

I Each sweater takes one patch, 4 skeins, and 3 storage units,so effectively p + 4q + 3r is bid per sweater

I Likewise, p + q + 2r is bid per scarf.

So we must have

p + 4q + 3r ≥ 35

p + q + 2r ≥ 10

for us to sell out. The entrepreneur’s goal is to minimize the totalpayout

w = 2000p + 2300q + 2500r

Page 22: Lesson 30: Duality In Linear Programming

DefinitionGiven a linear programming problem in standard form, the duallinear programming problem is

min w = b1y1 + · · ·+ bmym

subject to constraints

a11y1 + a21y2 + · · ·+ am1ym ≥ p1

a12y1 + a22y2 + · · ·+ am2ym ≥ p2

......

a1ny1 + a2ny2 + · · ·+ amnym ≥ pn

y1, . . . , ym ≥ 0

Page 23: Lesson 30: Duality In Linear Programming

In fancy vector language, the dual of the problem

max z = p · x subject to Ax ≤ b and x ≥ 0

ismin w = b · y subject to A′y ≥ p and y ≥ 0

Page 24: Lesson 30: Duality In Linear Programming

Solving the Dual Problem

I The feasible set is unbounded (extending away from you)

I w(0, 8, 1) = 20, 900 is minimal

(35, 0, 0)

(0, 10, 0)

(0, 0, 83/4)

(0, 8, 1)

(12/3, 81/3, 0)

w = 70, 000

w = 23, 000

w = 21, 875

w = 20, 900

w = 22, 500

p

q

r

Page 25: Lesson 30: Duality In Linear Programming

Solving the Dual Problem

I The feasible set is unbounded (extending away from you)

I w(0, 8, 1) = 20, 900 is minimal

(35, 0, 0)

(0, 10, 0)

(0, 0, 83/4)

(0, 8, 1)

(12/3, 81/3, 0)

w = 70, 000

w = 23, 000

w = 21, 875

w = 20, 900

w = 22, 500

p

q

r

Page 26: Lesson 30: Duality In Linear Programming

Solving the Dual Problem

I The feasible set is unbounded (extending away from you)

I w(0, 8, 1) = 20, 900 is minimal

(35, 0, 0)

(0, 10, 0)

(0, 0, 83/4)

(0, 8, 1)

(12/3, 81/3, 0)

w = 70, 000

w = 23, 000

w = 21, 875

w = 20, 900

w = 22, 500p

q

r

Page 27: Lesson 30: Duality In Linear Programming

Solving the Dual Problem

I The feasible set is unbounded (extending away from you)

I w(0, 8, 1) = 20, 900 is minimal

(35, 0, 0)

(0, 10, 0)

(0, 0, 83/4)

(0, 8, 1)

(12/3, 81/3, 0)

w = 70, 000

w = 23, 000

w = 21, 875

w = 20, 900

w = 22, 500

p

q

r

Page 28: Lesson 30: Duality In Linear Programming

The Big Idea

I The shadow prices are the solutions to the dual problem

I The payoff is the same in both the primal problem and thedual problem