Duality - PowerPoint PPT Presentation

1 / 97
About This Presentation
Title:

Duality

Description:

Duality – PowerPoint PPT presentation

Number of Views:140
Avg rating:3.0/5.0
Slides: 98
Provided by: Tai118
Category:

less

Transcript and Presenter's Notes

Title: Duality


1
Duality
  • ???

??????? ?????????
2
Content
  • The Dual of an LP in General Form
  • Complementary Slackness
  • The Shortest-Path Problem and Its Dual
  • Dual Information in the Tableau
  • The Dual Simplex Algorithm

3
Duality
  • The Dual of an LP in General Form

??????? ?????????
4
An LP in General Form
5
?Standard Form
6
?Standard Form
7
?Standard Form
8
Optimality Criterion
Determined from the basis we choose.
9
Optimality Criterion
? ?Rm
10
RestrictedVariables
Inequalites
?
? ?Rm
11
UnrestrictedVariables
? ?Rm
12
UnrestrictedVariables
Equalites
?
? ?Rm
13
Equalites
? ?Rm
14
Equalites
?
UnrestrictedVariables
? ?Rm
15
Inequalites
? ?Rm
16
Inequalites
?
RestrictedVariables
? ?Rm
17
Constraints(Primal)
?
Constraints(Dual)
? ?Rm
18
Primal ? Dual
? ? ?
19
Primal ? Dual
20
Theorem 1
If an LP has an optimal solution, so does its
dual, at the optimality their costs are equal.
21
Theorem 1
The constraint of the dual.
Has an optimum
Pf)
Let x and ? be feasible solutions to the primal
and the dual, respectively.
the cost ot primal
the profit of dual
?
Upper bounded
Lower bounded
optimal solution of primal
The profit upper-bound of the dual.
22
Theorem 2
The duals dual is the primal.
23
Theorem 2
The duals dual is the primal.
Pf)
Duals dual
24
Theorem 2
The duals dual is the primal.
Pf)
Duals dual
25
Example The Diet Problem
aij number of units of nutrient i in one unit
food j.
xj number of units of food j in the diet.
Minimize
Subject to
26
Example The Diet Problem
aij number of units of nutrient i in one unit
food j.
xj number of units of food j in the diet.
Minimize
Subject to
Maximize
Subject to
27
Example The Diet Problem
aij number of units of nutrient i in one unit
food j.
Minimize the total cost we need to pay so as to
get the required nutrients.
xj number of units of food j in the diet.
Minimize
Subject to
The amount of the jth food needed?
?
Maximize
Subject to
?
28
Example The Diet Problem
aij number of units of nutrient i in one unit
food j.
Suppose that there is a pillmaker who can produce
all the nutrients needed.
xj number of units of food j in the diet.
Minimize
Subject to
Maximize the total price that a consumer needs to
pay so as to get the nutrients needed, i.e., to
maximize the profit.
Maximize
Subject to
The selling price for one unit of ith nutrient.
29
Example The Diet Problem
aij number of units of nutrient i in one unit
food j.
One must get enough nutrients.
xj number of units of food j in the diet.
Minimize
Subject to
The unit price for each nutrient must be
reasonable, i.e., low enough.
Maximize
Subject to
30
Example The Diet Problem
aij number of units of nutrient i in one unit
food j.
xj number of units of food j in the diet.
Minimize
Subject to
Maximize
Subject to
31
Example The Diet Problem
aij number of units of nutrient i in one unit
food j.
xj number of units of food j in the diet.
Minimize
Subject to
Consumers View.
Maximize
Subject to
Producers View.
32
Managing a Production Facility
33
Managing a Production Facility
aij number of units of the ith raw material
needed to produce one unit of the jth
product.
xj the number of units of the jth product
produced.
34
The Resource Allocation Problem
aij number of units of the ith raw material
needed to produce one unit of the jth
product.
xj the number of units of the jth product
produced.
Maximize
Subject to
35
The Resource Allocation Problem
aij number of units of the ith raw material
needed to produce one unit of the jth
product.
xj the number of units of the jth product
produced.
36
The Resource Allocation Problem
aij number of units of the ith raw material
needed to produce one unit of the jth
product.
xj the number of units of the jth product
produced.
37
The Resource Allocation Problem
aij number of units of the ith raw material
needed to produce one unit of the jth
product.
xj the number of units of the jth product
produced.
Minimize
Subject to
Maximize
Subject to
38
The Resource Allocation Problem
aij number of units of the ith raw material
needed to produce one unit of the jth
product.
xj the number of units of the jth product
produced.
39
The Resource Allocation Problem
aij number of units of the ith raw material
needed to produce one unit of the jth
product.
Maximize the total profit.
xj the number of units of the jth product
produced.
The amount of the jth item produced?
?
?
40
The Resource Allocation Problem
aij number of units of the ith raw material
needed to produce one unit of the jth
product.
xj the number of units of the jth product
produced.
Minimize the loss due to inventory, i.e., the
lost opportunity cost.
The estimated value increment for one unit of the
ith material
41
The Resource Allocation Problem
aij number of units of the ith raw material
needed to produce one unit of the jth
product.
One can use up each material at most.
xj the number of units of the jth product
produced.
Dont underestimate the value increment for each
material.
42
The Resource Allocation Problem
aij number of units of the ith raw material
needed to produce one unit of the jth
product.
xj the number of units of the jth product
produced.
43
The Resource Allocation Problem
aij number of units of the ith raw material
needed to produce one unit of the jth
product.
xj the number of units of the jth product
produced.
Production Managers View
Comptrollers View
44
Duality
  • Complementary Slackness

??????? ?????????
45
Complementary Slackness
46
Theorem 3Complementary Slackness
x
?
Pf)
Facts
47
Theorem 3Complementary Slackness
x
?
Pf)
Facts
u v 0
Define
x and ? are optima
u v 0
48
Example
Does x(0, 0.5, 0, 2.5, 1.5) solve the LP?
49
Example
Does x(0, 0.5, 0, 2.5, 1.5) solve the LP?
Primal
Dual
50
Example
Does x(0, 0.5, 0, 2.5, 1.5) solve the LP?
Primal
Dual
?
?
?
0
0.5
0
2.5
1.5
x is an optimum
? (?2.5, 1, 1)
51
Example
Does x(0, 0.5, 0, 2.5, 1.5) solve the LP?
Primal
Dual
?
Remember this result. It will be compared with
one obtaind using another method.
?
?
0
0.5
0
2.5
1.5
x is an optimum
? (?2.5, 1, 1)
52
Duality
  • The Shortest-Path Problem and Its Dual

??????? ?????????
53
The Shortest-Path Problem
Given a directed graph G (V, E) and a
nonnegative weight cj ? 0 associated with each
arc ej?E, an instance of the shortest path
problem (SP) is the problem of finding a directed
path from a distinguished source node s to a
distinguished terminal node t, with the minimum
total weight.
54
LP Formulation of SP
a
e1
e4
c4
c1
c3
t
s
e3
e2
e5
c5
c2
b
Flow vector
Incidence Matrix
Flow conservation for node i
Cost vector
55
a
e1
e4
t
s
e3
e2
e5
b
56
The Dual of SP
Primal
Dual
57
The Dual of SP
Primal
Dual
58
Explanation for the Primal/Dual
Primal
Dual
Minimize the total traffic cost needed to travel
from the source to the target city by city.
The transportation company, e.g., airline
company, want to maximize the price to take you
from the source to the target.
59
Explanation for the Primal/Dual
Primal
Dual
The transportation fee between each pair of
cities must be cheap enough.
60
Example
3
1
2
2
1
Primal
61
Example
f1 f2 f3 f4 f5 Ans
1 1 0 0 0 1
?1 0 1 1 0 0
0 ?1 ?1 0 1 0
1 2 2 3 1 0
f1 f2 f3 f4 f5 Ans
1 1 0 0 0 1
0 1 1 1 0 1
0 ?1 ?1 0 1 0
1 2 2 3 1 0
f1 f2 f3 f4 f5 Ans
1 1 0 0 0 1
0 1 1 1 0 1
0 ?1 ?1 0 1 0
0 ?1 0 0 0 ?4
f1 f2 f3 f4 f5 Ans
1 1 0 0 0 1
0 1 1 1 0 1
0 ?1 ?1 0 1 0
0 ?1 0 0 0 ?4
62
Example
f1 f2 f3 f4 f5 Ans
1 0 ?1 ?1 0 0
0 1 1 1 0 1
0 0 0 1 1 1
0 0 1 1 0 ?3
f1 f2 f3 f4 f5 Ans
1 0 ?1 ?1 0 0
0 1 1 1 0 1
0 0 0 1 1 1
0 0 1 1 0 ?3
f1 f2 f3 f4 f5 Ans
1 1 0 0 0 1
0 1 1 1 0 1
0 ?1 ?1 0 1 0
0 ?1 0 0 0 ?4
63
Example
The Primal
The Dual
64
Example
3
3
1
f1 0
f2 1
The optimum
f3 0
f5 1
f4 0
Complementary Slackness
The optimum
?1 3
?2 3
?3 1
65
Duality
  • Dual Information
  • in the Tableau

??????? ?????????
66
The Optima for Primal Dual
?
x
found by applying the primal simplex algorithm on
a tableau.
Can we find the duals optimum from the tableau?
67
The Criterion of Primal Algorithm
68
The Criterion of Primal Algorithm
x(x1, ..., xn) Ans
A b
c 0
x(x1, ..., xn) Ans
B?1A B?1b

Primal Algorithm
Consider AI H.
69
The Criterion of Primal Algorithm
x(x1, ..., xn) Ans
A b
c 0
x(x1, ..., xn) Ans
B?1A B?1b

Primal Algorithm
x(x1, ..., xn) Ans
I H b
c 0
x(x1, ..., xn) Ans
B?1 B?1H B?1b

Primal Algorithm
70
Dual Information in the Tableau
x(x1, ..., xn) Ans
I H b
c 0
x(x1, ..., xn) Ans
B?1 B?1H B?1b

Primal Algorithm
71
The Inverse Matrix
At the end of simplex algorithm, the inverse
matrix will appear at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1 0.5 0 0 0.5 0 0 0.5
3.5 0 0.5 1 0 ?0.5 1 0 2.5
?5.5 0 ?1.5 0 1 ?2.5 0 1 1.5

x1 x2 x3 x4 x5 x6 x7 x8 Ans
1.5 1 0.5 0 0 0.5 0 0 0.5
3.5 0 0.5 1 0 ?0.5 1 0 2.5
?5.5 0 ?1.5 0 1 ?2.5 0 1 1.5
1 1 1 1 1 0 0 0 0
77
Phase II
x1 x2 x3 x4 x5 x6 x7 x8 Ans
1.5 1 0.5 0 0 0.5 0 0 0.5
3.5 0 0.5 1 0 ?0.5 1 0 2.5
?5.5 0 ?1.5 0 1 ?2.5 0 1 1.5
1.5 0 1.5 0 0 2.5 ?1 ?1 ?4.5
B?1
x1 x2 x3 x4 x5 x6 x7 x8 Ans
1.5 1 0.5 0 0 0.5 0 0 0.5
3.5 0 0.5 1 0 ?0.5 1 0 2.5
?5.5 0 ?1.5 0 1 ?2.5 0 1 1.5

x1 x2 x3 x4 x5 x6 x7 x8 Ans
1.5 1 0.5 0 0 0.5 0 0 0.5
3.5 0 0.5 1 0 ?0.5 1 0 2.5
?5.5 0 ?1.5 0 1 ?2.5 0 1 1.5
1 1 1 1 1 0 0 0 0
78
Duality
  • The Dual
  • Simplex Algorithm

??????? ?????????
79
The Criterion of Primal Algorithm
80
The Feasibility of the Dual
Unrestricted
81
The Primal Algorithm
Unrestricted
Initial Tableau
x(x1, ..., xn) Ans
H I b?0
c 0
82
The Primal Algorithm
Unrestricted
The primal algorithm starts from a feasible
solution of the primal.
Initial Tableau
x(x1, ..., xn) Ans
H I b?0
c 0
83
The Primal Algorithm
Unrestricted
Initial Tableau
Final Tableau
x(x1, ..., xn) Ans
H I b?0
c 0
x(x1, ..., xn) Ans
. . . b?0

84
The Primal Algorithm
Optimal and Feasible.
Unrestricted
Initial Tableau
Final Tableau
x(x1, ..., xn) Ans
H I b?0
c 0
x(x1, ..., xn) Ans
. . . b?0

85
The Feasibility of the Dual
Unrestricted
The feasible solution of the dual can be read
here.
Initial Tableau
Final Tableau
x(x1, ..., xn) Ans
H I b?0
c 0
x(x1, ..., xn) Ans
. . . b?0

86
What the Primal Algorithm Done?
Maintaining the primal feasible solution and
working towards dual feasibility.
Unrestricted
87
The Primal/Dual Simplex Algorithms
  • The Primal Simplex Algorithm
  • Maintaining the primal feasible solution and
    working towards dual feasibility.
  • The Dual Simplex Algorithm
  • Maintaining the dual feasible solution and
    working towards primal feasibility.

88
The Primal/Dual Simplex Algorithms
  • The Primal Simplex Algorithm
  • Maintaining the primal feasible solution and
    working towards dual feasibility.
  • The Dual Simplex Algorithm
  • Maintaining the dual feasible solution and
    working towards primal feasibility.

89
The Dual Simplex Algorithms
x1 ? xj ? xn?m xn?m1 ? xn?mj ? xn Ans
a11 ? a1j ? a1,n?m 1 ? 0 ? 0 b1
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ai1 ? aij ? ai,n?m 0 ? 1 ? 0 bi
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
am1 ? amj ? am,n?m 0 ? 0 ? 1 bm
c1 ? cj ? cn?m 0 ? 0 ? 0 ??0
Keep all elements in it non-negative.
The dual wants to maximize ?. Hence, to minimize
the value ?? appearing here.
90
The Dual Simplex Algorithms
x1 ? xj ? xn?m xn?m1 ? xn?mj ? xn Ans
a11 ? a1j ? a1,n?m 1 ? 0 ? 0 b1
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ai1 ? aij ? ai,n?m 0 ? 1 ? 0 bi
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
am1 ? amj ? am,n?m 0 ? 0 ? 1 bm
c1 ? cj ? cn?m 0 ? 0 ? 0 ??0
When all elements in it become non-negative, we
reach the primal feasibility.
91
Select Pivot Row
How about if none of bis is negative?
x1 ? xj ? xn?m xn?m1 ? xn?mj ? xn Ans
a11 ? a1j ? a1,n?m 1 ? 0 ? 0 b1
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ai1 ? aij ? ai,n?m 0 ? 1 ? 0 bi
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
am1 ? amj ? am,n?m 0 ? 0 ? 1 bm
c1 ? cj ? cn?m 0 ? 0 ? 0 ??0
Choose the row with most negative bi entry as the
pivot row, say the ith row.
92
Select the Pivot
How about if none of aijs is negative?
x1 ? xj ? xn?m xn?m1 ? xn?mj ? xn Ans
a11 ? a1j ? a1,n?m 1 ? 0 ? 0 b1
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ai1 ? aij ? ai,n?m 0 ? 1 ? 0 bi
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
am1 ? amj ? am,n?m 0 ? 0 ? 1 bm
c1 ? cj ? cn?m 0 ? 0 ? 0 ??0
The pivot column is determined by choosing
the maximum here, say the jth column.
Compute this term only for aij's that are
negative.
?
?
93
Pivoting
x1 ? xj ? xn?m xn?m1 ? xn?mj ? xn Ans
? 0 1 ? ? 0
. . . . . . . . . . . . . . . . . . . . .
? 1 0 ? ? 0
. . . . . . . . . . . . . . . . . . . . .
? 0 0 ? ? 1
0 0 ? ? 0
x1 ? xj ? xn?m xn?m1 ? xn?mj ? xn Ans
a11 ? a1j ? a1,n?m 1 ? 0 ? 0 b1
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ai1 ? aij ? ai,n?m 0 ? 1 ? 0 bi
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
am1 ? amj ? am,n?m 0 ? 0 ? 1 bm
c1 ? cj ? cn?m 0 ? 0 ? 0 ??0
Repeat the aforementioned procedure until the
primal feasibility is reached or the infeasible
or unbounded condition becomes obviously.
94
Example
f1 f2 f3 f4 f5 Ans
1 1 0 0 0 1
?1 0 1 0 ?1 ?1
0 0 0 1 1 1
1 0 0 0 0 ?3
95
Select Pivot Row
f1 f2 f3 f4 f5 Ans
1 1 0 0 0 1
?1 0 1 0 ?1 ?1
0 0 0 1 1 1
1 0 0 0 0 ?3
Pivot Row
96
Select the Pivot
f1 f2 f3 f4 f5 Ans
1 1 0 0 0 1
?1 0 1 0 ?1 ?1
0 0 0 1 1 1
1 0 0 0 0 ?3
Pivot Row
Choose maximum
97
Pivoting
f1 f2 f3 f4 f5 Ans
1 1 0 0 0 1
?1 0 1 0 ?1 ?1
0 0 0 1 1 1
1 0 0 0 0 ?3
f1 f2 f3 f4 f5 Ans
1 1 0 0 0 1
1 0 ?1 0 1 1
?1 0 1 1 0 0
1 0 0 0 0 ?3
f1 f2 f3 f4 f5 Ans
1 1 0 0 0 1
1 0 ?1 0 1 1
?1 0 1 1 0 0
1 0 0 0 0 ?3
The Optimum
Write a Comment
User Comments (0)
About PowerShow.com