Linear Programming
Linear Programming
Duality
09-13-2009
Duality
Every LP has its Dual.
Primal(Ex 4.1-1)
Dual
Primal
Dual
Dual
Ex 4.3-2
TOYCO assembles three types of toys: trains, trucks, and cars
using three operations. Available assembly times for the three
operations are 430, 460 and 420 minutes per day, respectively, and
the revenues per toy train, truck, and car are $3, $2 and $5,
respectively. The assembly times per train for the three operations
are 1, 3 and 1 minutes, respectively. The corresponding times per
truck and per car are (2, 0, 4) and (1, 2, 0) minutes (a zero time
indicates that the operations is not used).
Economic Interpretation
Primal
Optimal solution:
z = $1350
x = (0, 100, 230).
Economic Interpretation
Dual
Optimal solution:
w = $1350
y = (1, 2, 0).
Economic Interpretation
Primal Dual
max z = 3x1 + 2x2 + 5x3 min w = 430y1 + 460y2 + 420y3
s.t. x1 + 2x2 + x3 430 s.t. y1 + 3y2 + y3 3
3x1 + 2x3 460 2y1 + 4y3 2
x1 + 4x2 420 y1 + 2y2 5
x1 , x2 , x3 0. y1 , y2 , y3 0.
z = $1350 w = $1350
x = (0, 100, 230). y = (1, 2, 0).
Constructing Dual LP
Constructing Dual LP
Primal Dual
max z = 3x1 + 2x2 + 5x3 min w = 430y1 + 460y2 + 420y3
s.t. x1 + 2x2 + x3 430 s.t. y1 + 3y2 + y3 (?) 3
3x1 + 2x3 460 2y1 + 4y3 (?) 2
x1 + 4x2 420 y1 + 2y2 (?) 5
x1 , x2 , x3 0. y1 , y2 , y3 (?) 0.
Constructing Dual LP
Constraints Variables
max min
0
0
= Unrestricted
min max
0
0
= Unrestricted
Constructing Dual LP
Basic x1 x2 x3 x4 x5 x6 Solution
z 7 0 a 0 0 0 210
x5 2 0 c 3 1 0 9
x2 3 1 d 1 0 0 b
x6 1 0 e 2 0 1 8
Basic x1 x2 s1 s2 s3 s4 RHS
z 5 4 0 0 0 0 0
s1 6 4 1 0 0 0 24
s2 1 2 0 1 0 0 6
s3 1 1 0 0 1 0 1
s4 0 1 0 0 0 1 2
Example: Intermediate Table
Basic x1 x2 s1 s2 s3 s4 RHS
z 0 2/3 5/6 0 0 0 20
x1 1 2/3 1/6 0 0 0 4
s2 0 4/3 1/6 1 0 0 2
s3 0 5/3 1/6 0 1 0 5
s4 0 1 0 0 0 1 2
Basic x1 x2 s1 s2 s3 s4 RHS
z 0 0 3/4 1/2 0 0 21
x1 1 0 1/4 1/2 0 0 3
x2 0 1 1/8 3/4 0 0 3/2
s3 0 0 3/8 5/4 1 0 5/2
s4 0 0 1/8 3/4 0 1 1/2
Constructing Dual LP
Constructing Dual LP
Constraints Variables
max min
0
0
= Unrestricted
min max
0
0
= Unrestricted
Constructing Dual LP
Primal(Ex 4.1-1)
Dual(Ex 4.1-1)
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
Dual of Ex 4.1-1
Primal of Ex 4.1-2
Dual of Ex 4.1-2
Primal of Ex 4.1-3
Substitute x1 = x1+ x1 :
Dual of Ex 4.1-3
Primal Dual
max z = 5x1 + 12x2 + 4x3 MR min w = 10y1 + 8y2
s.t. x1 + 2x2 + x3 + x4 = 10 s.t. y1 + 2y2 5
2x1 x2 + 3x3 + R = 8 2y1 y2 12
x1 , , x4 , R 0 y1 + 3y2 4
y1 0
y2 M.
Optimal Dual Solution
Initial Table
Basic x1 x2 x3 x4 R RHS
z 5 12 4 0 M 0
x4 1 2 1 1 0 10
R 2 1 3 0 1 8
Optimal Table
Basic x1 x2 x3 x4 R RHS
3 29
z 0 0 5 5 25 + M 54 45
x2 0 1 15 2
5 51 12
5
7 1 2 26
x1 1 0 5 5 5 5
Method 1
+
Original objective coefficient of xi .
! ! ! !
y1 29/5 0 29/5
= + =
y2 2/5 + M M 2/5
!1
2 1
y1 y2 = 12 5
1 2
!
2/5 1/5
= 12 5
1/5 2/5
= 29/5 2/5