duality/sensitivity-1 duality theory. duality/sensitivity-2 the essence every linear program has...
TRANSCRIPT
Duality/Sensitivity-1
Duality TheoryDuality Theory
Duality/Sensitivity-2
The EssenceThe Essence
• Every linear program has another linear program associated with it:Its ‘dual’
• The dual complements the original linear program, the ‘primal’
• The theory of duality provides many insights into what is happening ‘behind the scenes’
Duality/Sensitivity-3
Primal and DualPrimal and Dual
PrimalPrimal
Decision variables: x
max Z = cx
s.to Ax b n
x 0 m
DualDual
Decision variables: y
min W = yb
s.to yA c m
y 0 n
Duality/Sensitivity-4
Primal and Dual - ExamplePrimal and Dual - ExampleStandard Algebraic FormStandard Algebraic Form
PrimalPrimal DualDual
Max Z = 3x1+ 5x2
s. to x1 ≤ 4
2x2 ≤ 12
3x1+ 2x2 ≤ 18
x1,x2 ≥ 0
Min W = 4y1+ 12y2+ 18y3
s. to y1+ 3y3 ≥ 3
2y2+ 2y3 ≥ 5
y1, y2, y3 ≥ 0
Duality/Sensitivity-5
Primal and Dual - ExamplePrimal and Dual - ExampleMatrix FormMatrix Form
PrimalPrimal DualDual
0
0
18
12
4
23
20
01
to subject
53 maximize
2
1
2
1
2
1
x
x
x
x
x
x
000
53
23
20
01
to subject
18
12
4
minimize
321
321
321
yyy
yyy
yyy
Duality/Sensitivity-6
Symmetry PropertySymmetry Property
• For any primal problem and its dual problem, all relationships between them must be symmetric because…
Duality/Sensitivity-7
Duality TheoremDuality Theorem
The following are the only possible relationships between the primal and dual problems:
1. If one problem has feasible solutions and a bounded objective function (and so has an optimal solution), then so does the other problem, so both the weak and the strong duality properties are applicable
2. If one variable has feasible solutions but an unbounded objective function (no optimal solutions), then the other problem has no feasible solutions
3. If one variable has no feasible solutions, then the other problem either has no feasible solutions or an unbounded objective function
Duality/Sensitivity-8
Relationships between Primal and DualRelationships between Primal and Dual
• Weak duality property If x is a feasible solution to the primal, and
y is a feasible solution to the dual, thencx yb
• Strong duality property If x* is an optimal solution to the primal, and
y* is an optimal solution to the dual, thencx* = y*b
Duality/Sensitivity-9
Complementary SolutionsComplementary Solutions
• At each iteration, the simplex method identifies – x, a BFS for the primal, and– a complementary solution y, a BS for the dual
(which can be found from the row coefficients under slack variables)
• For any primal feasible (but suboptimal) x, its complementary solution y is dual infeasible, with cx=yb
• For any primal optimal x*, its complementary solution y* is dual optimal, withcx*=y*b
Duality/Sensitivity-10
Complementary SlacknessComplementary Slackness
• Associated variables between primal and dual
• Complementary slackness property:When one variable in primal is basic, its associated variable in dual is nonbasic
PrimalPrimal
(original variable) xj
(slack variable) xsn+i
DualDual
ysm+j (surplus variable)
yi (original variable)
PrimalPrimal
(m variables) basic
(n variables) nonbasic
DualDual
nonbasic (m variables)
basic (n variables)
Duality/Sensitivity-11
Primal and DualPrimal and DualPrimalPrimalZ=Z=cx
DualDualW=W=yb
(optimal)(optimal) Z* Z* W* W* (optimal)(optimal)
superoptimalsuperoptimal
superoptimalsuperoptimal
suboptimalsuboptimal
suboptimalsuboptimal
Duality/Sensitivity-12
InsightInsight
B.V. ZOriginal Variables Slack Variables
r.h.s.x1 x2 … xn xs
n+1 … xsn+m
Z 1 cBB-1A-c cBB-1 cBB-1b
xB 0 B-1A B-1 B-1b
B.V. ZOriginal Variables Slack Variables
r.h.s.x1 x2 … xn xs
n+1 … xsn+m
Z 1 yA-c y yb
xB 0 B-1A B-1 B-1b
Duality/Sensitivity-13
A More Detailed Look at SensitivityA More Detailed Look at Sensitivity
• We are interested in the optimal solution sensitivity to changes in model parameters– Coefficients aij, cj
– Right hand sides bi
• If we change the model parameters, how does it affect – Feasibility?
If violated, then primal infeasible, but may be dual feasible– Optimality?
If violated, then dual infeasible, but may be primal feasible
Duality/Sensitivity-14
General Procedure for Sensitivity AnalysisGeneral Procedure for Sensitivity Analysis
• Revise the model• Calculate changes to the original final tableau• Covert to the proper form using Gaussian elimination• Feasibility Test: Is the new right-hand-sides 0 ?• Optimality Test: Is the new row-0 coefficients 0 ?• Reoptimization
– If feasible, but not optimal, continue solving with the primal simplex method
– If not feasible, but satisfies optimality, continue solving with thedual simplex method
– If feasible and satisfies optimality, then calculate new x* and Z*
Duality/Sensitivity-15
Example of Sensitivity AnalysisExample of Sensitivity Analysis
Original final simplex tableau
Original modelMax Z = 3x1+ 5x2
s. to x1 ≤ 4
2x2 ≤ 12
3x1+ 2x2 ≤ 18
x1,x2 ≥ 0
Revised modelMax Z= 4x1+ 5x2
s. to x1 ≤ 4
2x2 ≤ 24
2x1+ 2x2 ≤ 18
x1,x2 ≥ 0
Basic variable
Z x1 x2 s1 s2 s3 r.h.s.
Z 1 0 0 0 3/2 1 36
s1 0 0 0 1 1/3 -1/3 2
x2 0 0 1 0 1/2 0 6
x1 0 1 0 0 -1/3 1/3 2
BB-1-1AA BB-1-1 BB-1-1bb
ccBBBB-1-1A-cA-c ccBBBB-1-1 ccBBBB-1-1bb
What happens when A, b, c changes?
Duality/Sensitivity-16
The Changes in CoefficientsThe Changes in Coefficients
x1 = 4
x1
x2
2x2 = 12
3x1+ 2x2 = 18
Z = 3x1+ 5x2 = 36
x1 = 4
x1
x2
2x2 = 2424
22x1+ 2x2 = 18
Z = 44x1+ 5x2
Duality/Sensitivity-17
Example of Sensitivity AnalysisExample of Sensitivity Analysis
• Calculate changes to the original final tableau
from original final tableau
use new coefficients , , :new new newA b c
1 1 * old B oldB C B y
1 1 *
1
new new newold B old
new newB old
B b C B b y b
C B A c
Duality/Sensitivity-18
Example of Sensitivity AnalysisExample of Sensitivity Analysis
• Feasible?
• Satisfies optimality criterion?
Basic variable Z x1 x2 s1 s2 s3 r.h.s.
Z 1 0 0 0 ½ 1 48
s1 0 0 0 1 ½ - ½ 7
x2 0 0 1 0 ½ 0 12
x1 0 1 0 0 - ½ ½ -3
Duality/Sensitivity-19
Example of Sensitivity AnalysisExample of Sensitivity Analysis
Simple dual simplex iterationBasic
variable Z x1 x2 s1 s2 s3 r.h.s.
Z 1 0 0 0 ½ 1 48
s1 0 0 0 1 ½ - ½ 7
x2 0 0 1 0 ½ 0 12
x1 0 1 0 0 - ½ ½ -3
Basic variable Z x1 x2 s1 s2 s3 r.h.s.
Z 1
0
0
0
Duality/Sensitivity-20
Changes in bChanges in bii only (Case 1) only (Case 1)
• What is affected when only b changes?
• Optimality criterion will always be satisfied• Feasibility might not
B.V. ZOriginal Variables Slack Variables
r.h.s.x1 x2 … xn xs
n+1 … xsn+m
Z 1 cBB-1A-c cBB-1 cBB-1b
xB 0 B-1A B-1 B-1b
Duality/Sensitivity-21
Changes in bChanges in bii only onlyExampleExample A A
18
12
4
bChange to
18
24
4
b B-1b=
cBB-1b=
Basic variable Z x1 x2 s1 s2 s3 r.h.s.
Z 1 0 0 0 3/2 1
s1 0 0 0 1 1/3 -1/3
x2 0 0 1 0 1/2 0
x1 0 1 0 0 -1/3 1/3
Duality/Sensitivity-22
Changes in bChanges in bii only onlyExampleExample A A
Simple dual simplex iterationBasic
variable Z x1 x2 s1 s2 s3 r.h.s.
Z 1 0 0 0 3/2 1 54
s1 0 0 0 1 1/3 -1/3 6
x2 0 0 1 0 1/2 0 12
x1 0 1 0 0 -1/3 1/3 -2
Basic variable Z x1 x2 s1 s2 s3 r.h.s.
Z 1
0
0
0
Duality/Sensitivity-23
Changes in bChanges in bii only onlyRepresenting as differencesRepresenting as differences
18
12
4
bChange to
18
24
4
b
3
2
1
b
b
b
bbCan represent as
b
Then we can find bB 1
bBcB 1
= change in r.h.s. of optimal tableau
= change in optimal Z value
Duality/Sensitivity-24
Changes in bChanges in bii only onlyAllowable rangesAllowable ranges
• Assume only b2 changes
• The current basis stays feasible (and optimal) as long as
0)(1 bbB
Duality/Sensitivity-25
Changes in coefficients of nonbasic variables Changes in coefficients of nonbasic variables (Case 2a)(Case 2a)
• What is affected when only c and A columns for a nonbasic variable change?
• Feasibility criterion will always be satisfied• Optimality might not
B.V. ZOriginal Variables Slack Variables
r.h.s.x1 x2 … xn xs
n+1 … xsn+m
Z 1 cBB-1A-c cBB-1 cBB-1b
xB 0 B-1A B-1 B-1b
Duality/Sensitivity-26
Changes in coefficients of nonbasic variablesChanges in coefficients of nonbasic variablesExample A continuedExample A continued
• From Example A (slide 22 – p241, Table 6.21), we had
Basic variable Z x1 x2 s1 s2 s3 r.h.s.
Z 1 9/2 0 0 0 5/2 45
s1 0 1 0 1 0 0 4
x2 0 3/2 1 0 0 1/2 9
s2 0 -3 0 0 1 -1 6
3
0
1
3
1
1
A
cChange to (cBB-1A - c)1= y* A – c =
(B-1A)1=
2
0
1
4
1
1
A
c
Duality/Sensitivity-27
Changes in coefficients of nonbasic variablesChanges in coefficients of nonbasic variablesAllowable rangesAllowable ranges
• Assume only c1 changes
• The current basis stays optimal (and feasible) as long as
1 0 BC B A c
Duality/Sensitivity-28
Introduction of a new variable (Case 2b)Introduction of a new variable (Case 2b)
• Assume the variable was always there, with ci=0, Aij=0
• Can now assume it is a nonbasic variable at the original optimal, and apply the same approach as Case 2a
Example AMax Z = 3x1+ 5x2
s. to x1 ≤ 4
2x2 ≤ 24
3x1+ 2x2 ≤ 18
x1,x2 ≥ 0
Example A with new variableMax Z = 3x1+ 5x2 + 2x6
s. to x1 + x6 ≤ 4
2x2 ≤ 24
3x1+ 2x2 + 2x6 ≤ 18
x1,x2 ≥ 0
Duality/Sensitivity-29
Other possible analysesOther possible analyses
• Changes to the coefficients of a basic variable– Utilize same approach as initial example, not much of a ‘special
case’
• Introduction of a new constraint– Would optimality criterion be satisfied?– Would feasibility criterion be satisfied?
• Parametric analysis