Escolar Documentos
Profissional Documentos
Cultura Documentos
Pietro Belotti
Dept. of Mathematical Sciences Clemson University
November 4, 2010 Reading for today: pages 148-166. No class on Tuesday, November 9.
Dual feasibility
Consider a primal LP (in standard form) and its dual: max c x s.t. Ax b x 0 min b u s.t. A u c u 0
Add slack variables to the primal, surplus1 variables to the dual. max c x s.t. Ax + Ix = b x, x 0 min b u s.t. A u Iu = c u, u 0
Example
max s.t. 3x1 x1 2x1 x1 , +2x2 +x2 +x2 x2 , +x3 +x3 +3x3 x3 min s.t. 4u1 u1 u1 u1 u1 , +6u2 +2u2 +u2 +3u2 u2
4 6 0
3 2 1 0
become max s.t. 3x1 x1 2x1 x1 , 4u1 u1 u1 u1 u1 , +2x2 +x2 +x2 x2 , +6u2 +2u2 +u2 +3u2 u2 , +x3 +x3 +3x3 x3 , +x4 x4 , +x5 x5 = 4 = 6 0
min s.t.
u3 u4 u3 , u4 , u5 u5
= = =
3 2 1 0
= = =
3 2 1 0
. . . and clear up the link between primal and dual dictionaries: x4 = 4 x1 x2 x3 x5 = 6 2x1 x2 3x3 z= 3x1 +2x2 +x3 ; u1 = 3 +u4 +2u5 u2 = 2 +u4 +u5 u3 = 1 +u4 +3u5 w = 4u4 6u5 .
The dual (with surplus variables included) can be written as min b u s.t. Au = c u0 and A has
one for each original dual variable (there are m) and one for each surplus variable (there are n)
Dual dictionaries
Now partition again A (not the same A as in the primal: why?) as (B|N), and rewrite the dual as min b uB + b uN N B s.t. BuB + NuN = c uB , uN 0 Having a dej vu here? Dual dictionary: a uB = z Remember:
B1 c B1 NuN
= b B1 c + (b b B1 N)uN B N B
Primal dictionary: B = {4, 5}; N = {1, 2, 3}; Dual dictionary: B = {1, 2, 3}; N = {4, 5}.
x4 = 4 x1 x2 x3 x5 = 6 2x1 x2 3x3 is a primal feasible z= 3x1 +2x2 +x3 dictionary. It is also dual infeasible: its dual dictionary u1 = 3 +u4 +2u5 u2 = 2 +u4 +u5 u3 = 1 +u4 +3u5 w = 4u4 6u5 is infeasible. Dual infeasibility = cN cB B1 N 0. The c 3 c c column 2 = , so 0 not optimal. 1
Primal dictionary: B = {2, 5}; N = {1, 3, 4}; x2 = 4 x1 x3 x4 x5 = 2 x1 2x3 +x4 z = 6 +x1 x3 2x4
()
Dual dictionary: B = {1, 3, 4}; N = {2, 5}. u1 = u3 = u4 = w = 1 +u2 +u5 +1 +u2 +2u5 +2 +u2 u5 6 2u2 4u5
()
Dictionary () is primal feasible, dual infeasible. Dictionary () is primal infeasible, dual feasible
Primal dictionary: B = {1, 2}; N = {3, 4, 5}; () x1 = 2 2x3 +x4 x5 x2 = 2 +x3 x4 +x5 z = 8 3x3 x4 x5
Dual dictionary: B = {3, 4, 5}; N = {1, 2}. u3 = u4 = u5 = w = +3 +2u1 u2 +1 u1 +u2 +1 +u1 u2 8 2u1 2u2
()
It is optimal.
The simplex method visited three dictionaries the rst two were only feasible Or, better, primal feasible and dual infeasible The last one was optimal,
i.e. Both primal feasible and dual feasible. An alternative to the (primal) simplex method is:
Start from a primal infeasible (but dual feasible) dictionary; Do pivots aimed at
We dont even need to write the dual dictionary explicitly: the primal dictionary will do just ne.
Select a leaving variable among {x1 , x3 }. x3 = 3 0, so we can only select x1 as the leaving variable. Choose the entering one so that dual feasibility is retained. The rows of the dual dictionary are: u2 = 4 3u1 u4 = 1 + 11u1 u5 = 1 u1
Which, among {u2 , u4 , u5 }, decreases to zero rst? u5 (would be the leaving variable in the dual dictionary) x5 is the entering variable.
To recap
xB = z
B1 b
B1 NxN
= c B1 b + (c c B1 N)xN B N B
i.e. it stops when dual feasibility is reached Dual simplex keeps dual feasibility ( 0) c i.e. it stops when primal feasibility is reached
Find leaving variable (look at 1 < 0, so x1 leaves b): b The x1 -row of B1 N is3 3 11 1 = (3, 11, 1) e B1 N = (1, 0) 1 1 3 2 Find the entering variable (that drives x1 from 4 to zero) Keep dual feasibility! must stay 0 c
j c ij a
0 1
; so d = B1 a =
Set t so that xB td has a zero at x1 : 4 t(1) = 0 t = 4 (Psst! What if, instead, if was (3, 11, 1)?)
Set remaining basic variables: xB xB td c Set leaving variables : i = wij c c Set remaining nonbasic variables : k k + i wk c c c c B B \ {j} {i}