Primal and Dual Example (1) - University of Liverpoolgairing/COMP557/board/20181030.pdf · Primal...
Transcript of Primal and Dual Example (1) - University of Liverpoolgairing/COMP557/board/20181030.pdf · Primal...
Primal and Dual Example (1)Primal:
min x1 + 2x2s.t. 2x1 + x2 � 7
�x1 + 3x2 � 1
x1 + 4x2 � 5
x1, x2 � 0
Dual:
136
← p , .
← P2
← p ,
Max 7-p ,t pz t 5ps
Zp ,- Pz t Ps E I
p ,t 3Pa t 4ps E 2
Pj a O Hj
Primal and Dual Example (2)Primal:
min �x1 + 4x2s.t. 3x1 + 2x2 � 9
x1 � 3x2 3
x1, x2 � 0
Dual:
137
← Pi
⇒ - x.
+3×22-3← Pi
pz := - pz'
ma×9p ,- 3pz
'
⇒ Max 9p , -13psSt
. 3ps ,- pi E - I Set 3ps , -cpzE - I
2ps , -13ps'
E 4 2ps , -3pct c
p ,ZO p ,
so
pi ZO past
Primal and Dual Example (3)Primal:
min �x1 + 4x2s.t. 3x1 + 2x2 � 9
x1 � 3x2 = 3
x1, x2 � 0
Dual:
138
←Pi
{ × . -3×223 ← pi- x -13×27-3 2- pic
pi . - pi -pi'
max 9p,t3( poi - pi ) ⇐ Max Gp,a 3ps
Setspit ( pi - pz
" ) E - I sit. 3p,tpzE - I
2. p , -31ps'- pi
' ) -24 2p , -3ps E 4
p , 20 p , so
pi ZOpz free
Pz" ZO
Primal and Dual Linear ProgramConsider the general linear program:
min cT · xs.t. ai
T · x � bi for i 2 M1
aiT · x bi for i 2 M2
aiT · x = bi for i 2 M3
xj � 0 for j 2 N1
xj 0 for j 2 N2
xj free for j 2 N3
Obtain a lower bound:
max pT · bs.t. pi � 0 for i 2 M1
pi 0 for i 2 M2
pi free for i 2 M3
ATj · p cj for j 2 N1
ATj · p � cj for j 2 N2
ATj · p = cj for j 2 N3
The linear program on the right hand side is the dual linear program of the primal linear
program on the left hand side.
139
pi 20for ie M,
pi EO for ie Mzpi free for ie My
Primal and Dual Linear ProgramConsider the general linear program:
min cT · xs.t. ai
T · x � bi for i 2 M1
aiT · x bi for i 2 M2
aiT · x = bi for i 2 M3
xj � 0 for j 2 N1
xj 0 for j 2 N2
xj free for j 2 N3
Obtain a lower bound:
max pT · bs.t.
pi � 0 for i 2 M1
pi 0 for i 2 M2
pi free for i 2 M3
ATj · p cj for j 2 N1
ATj · p � cj for j 2 N2
ATj · p = cj for j 2 N3
The linear program on the right hand side is the dual linear program of the primal linear
program on the left hand side.
139
Aj .
p E Cj for j E N,
Aj . pZ
Cj for je Nz
Aj . p = Cj for je Nz
Primal and Dual Linear ProgramConsider the general linear program:
min cT · xs.t. ai
T · x � bi for i 2 M1
aiT · x bi for i 2 M2
aiT · x = bi for i 2 M3
xj � 0 for j 2 N1
xj 0 for j 2 N2
xj free for j 2 N3
Obtain a lower bound:
max pT · bs.t.
pi � 0 for i 2 M1
pi 0 for i 2 M2
pi free for i 2 M3
ATj · p cj for j 2 N1
ATj · p � cj for j 2 N2
ATj · p = cj for j 2 N3
The linear program on the right hand side is the dual linear program of the primal linear
program on the left hand side.
139
Max ptbs
. t .
Primal and Dual Linear ProgramConsider the general linear program:
min cT · xs.t. ai
T · x � bi for i 2 M1
aiT · x bi for i 2 M2
aiT · x = bi for i 2 M3
xj � 0 for j 2 N1
xj 0 for j 2 N2
xj free for j 2 N3
Obtain a lower bound:
max pT · bs.t. pi � 0 for i 2 M1
pi 0 for i 2 M2
pi free for i 2 M3
ATj · p cj for j 2 N1
ATj · p � cj for j 2 N2
ATj · p = cj for j 2 N3
The linear program on the right hand side is the dual linear program of the primal linear
program on the left hand side.
139
Primal and Dual Linear ProgramConsider the general linear program:
min cT · xs.t. ai
T · x � bi for i 2 M1
aiT · x bi for i 2 M2
aiT · x = bi for i 2 M3
xj � 0 for j 2 N1
xj 0 for j 2 N2
xj free for j 2 N3
Obtain a lower bound:
max pT · bs.t. pi � 0 for i 2 M1
pi 0 for i 2 M2
pi free for i 2 M3
ATj · p cj for j 2 N1
ATj · p � cj for j 2 N2
ATj · p = cj for j 2 N3
The linear program on the right hand side is the dual linear program of the primal linear
program on the left hand side.
139
This is a definition I
Primal and Dual Variables and Constraints
primal LP (minimize) dual LP (maximize)
� bi � 0
constraints bi 0 variables
= bi free
� 0 ci
variables 0 � ci constraints
free = ci
140
Examples
primal LP dual LP
min cT · xs.t. A · x � b
max pT · bs.t. AT · p = c
p � 0
min cT · xs.t. A · x = b
x � 0
max pT · bs.t. AT · p c
141
X free
p free
Basic Properties of the Dual Linear Program
Theorem 4.1.
The dual of the dual LP is the primal LP.
Proof:
Primal in general form:
min cT · xs.t. ai
T · x � bi for i 2 M1
aiT · x bi for i 2 M2
aiT · x = bi for i 2 M3
xj � 0 for j 2 N1
xj 0 for j 2 N2
xj free for j 2 N3
Dual:
max pT · bs.t. pi � 0 for i 2 M1
pi 0 for i 2 M2
pi free for i 2 M3
ATj · p cj for j 2 N1
ATj · p � cj for j 2 N2
ATj · p = cj for j 2 N3
142
Max ptbS.t. pi
so i c- M,
pi E 0 ie Mzpi free ie Mz
Afp E Cj JEN ,
Aj p 2 Cj je Nz
Aj p = Cj j E Ng
Basic Properties of the Dual Linear Program
Theorem 4.1.
The dual of the dual LP is the primal LP.
Proof:
Primal in general form:
min cT · xs.t. ai
T · x � bi for i 2 M1
aiT · x bi for i 2 M2
aiT · x = bi for i 2 M3
xj � 0 for j 2 N1
xj 0 for j 2 N2
xj free for j 2 N3
Dual:
max pT · bs.t. pi � 0 for i 2 M1
pi 0 for i 2 M2
pi free for i 2 M3
ATj · p cj for j 2 N1
ATj · p � cj for j 2 N2
ATj · p = cj for j 2 N3
142
Basic Properties of the Dual Linear ProgramProof (cont.):
Dual:
max pT · bs.t. pi � 0 for i 2 M1
pi 0 for i 2 M2
pi free for i 2 M3
ATj · p cj for j 2 N1
ATj · p � cj for j 2 N2
ATj · p = cj for j 2 N3
Dual (in primal form):
min �pT · bs.t. � AT
j · p � �cj for j 2 N1
� ATj · p �cj for j 2 N2
� ATj · p = �cj for j 2 N3
pi � 0 for i 2 M1
pi 0 for i 2 M2
pi free for i 2 M3
143
min - PT b
S .t
.
11
Basic Properties of the Dual Linear ProgramProof (cont.):
Dual:
max pT · bs.t. pi � 0 for i 2 M1
pi 0 for i 2 M2
pi free for i 2 M3
ATj · p cj for j 2 N1
ATj · p � cj for j 2 N2
ATj · p = cj for j 2 N3
Dual (in primal form):
min �pT · bs.t. � AT
j · p � �cj for j 2 N1
� ATj · p �cj for j 2 N2
� ATj · p = �cj for j 2 N3
pi � 0 for i 2 M1
pi 0 for i 2 M2
pi free for i 2 M3
143
. C - I )
. ( - I )
. C - l )
Basic Properties of the Dual Linear ProgramProof (cont.):
Dual (in primal form):
min �pT · bs.t. � AT
j · p � �cj for j 2 N1
� ATj · p �cj for j 2 N2
� ATj · p = �cj for j 2 N3
pi � 0 for i 2 M1
pi 0 for i 2 M2
pi free for i 2 M3
Dual of Dual:
144
mat - CtxSrt
. xjso jeNiXj Ed jerkXj free JENS
- air E - bijEM
,
- air 2 - bi i E M2
- air = - bi ie Mg
Equavalence of the Dual LP
Theorem 4.2.
Let ⇧1 and ⇧2 be two LPs where ⇧2 has been obtained from ⇧1 by (several)
transformations of the following type:
i replace a free variable by the difference of two non-negative variables;
ii introduce a slack variable in order to replace an inequality constraint by an
equation;
iii if some row of a feasible equality system is a linear combination of the other rows,
eliminate this row.
Then the dual of ⇧1 is equivalent to the dual of ⇧2.
145
Weak Duality Theorem
Theorem 4.3.
If x is a feasible solution to the primal LP (minimization problem) and p a feasible
solution to the dual LP (maximization problem), then
cT · x � pT · b .
Corollary 4.4.
Consider a primal-dual pair of linear programs as above.
a If the primal LP is unbounded (i. e., optimal cost = �1), then the dual LP is
infeasible.
b If the dual LP is unbounded (i. e., optimal cost = 1), then the primal LP is
infeasible.
c If x and p are feasible solutions to the primal and dual LP, resp., and if
cT · x = pT · b, then x and p are optimal solutions.
146
Weak Duality Theorem
Theorem 4.3.
If x is a feasible solution to the primal LP (minimization problem) and p a feasible
solution to the dual LP (maximization problem), then
cT · x � pT · b .
Corollary 4.4.
Consider a primal-dual pair of linear programs as above.
a If the primal LP is unbounded (i. e., optimal cost = �1), then the dual LP is
infeasible.
b If the dual LP is unbounded (i. e., optimal cost = 1), then the primal LP is
infeasible.
c If x and p are feasible solutions to the primal and dual LP, resp., and if
cT · x = pT · b, then x and p are optimal solutions.
146
146 - 1
Proof of Them 4.2 :
-By Them 4.2 we way assume that primal CP ) and
dual CD ) are of the form :
m
C P ) min Ctx = IE.
cjxj (D) maxptb = ?,
bi piset Atsb n St
. Atp EC m
× so ? .aijxjsbi
,-Vi
p so⑨
¥,aijpi Ecj
Xiao Ki Kjpj 20
Kj