Professional Documents
Culture Documents
Lecture 4
Linear Programming
Brief recap
Duality
Farkas lemma
Sensitivity analysis: b, c, A
What is to come
We have this neat method for solving LPs but in reality model parameters
are never known exactly. What if the parameter change a little bit ? Do we
have to solve the LP all over again ? The answer lies in sensitivity
analysis.
Before we come to sensitivity analysis we will study duality theory.
What do when the number of constraints change ? or is too large ?
Is there an algorithm that converges in polynomial time ?
Linear Programming 43
Duality
Example:
max 3x1 2x2 + x3 min 4u1 + u2
s.t. 2x1 + 4x2 + 5x3 4, s.t. u1 0,
x2 + 7x3 = 1, u2 = free,
x1 0, 2u1 3,
x2 0, 4u1 + u2 2,
x3 = free, 5u1 + 7u2 = 1.
Properties of duals
X X X X
i + j = ui (ai x bi ) + (cj uT aj )xj ,
i j i j
T T
= c xu b0
By strong duality, if x and u are optimal then cT x = uT b, which implies
that i = j = 0 for all i, j.
Conversely, if i = j = 0 then cT x = uT b. But uT b d = p cT x,
therefore x and u are both optimal.
Linear Programming 46
Now suppose (a) does not hold. Consider the pair of dual linear programs
max 0T x min uT b,
s.t. Ax = b, s.t. uT A 0,
x0
The first is infeasible. So the dual can either be infeasible or unbounded. But
u = 0 is feasible for the dual, therefore it is unbounded. So there exists a
feasible u, i.e. uT A 0, such that uT b < 0.
Linear Programming 47
market trades for one period with n assets and current price of the assets is
p
there are m possible states of nature
one share of asset i pays rsi dollars in state s.
Let P be the m n matrix describing the payoffs of each asset in each
state of nature
r11 . . . r1n ,
P = ... . . . ...
rm1 . . . rmn
portfolio x Rn costs pT x.
P
wealth in state s is nj=1 rsj xj , thus wealth vector w = Px.
Problem : what are allowable price vector p ?
No arbitrage condition: If you always make profit then you should have
paid for it, i.e if w = Rx 0 then pT x 0.
Farkas Lemma to the rescue : If xT PT 0 then pT x 0, i.e. (b) cannot
hold. So (a) must hold, i.e. there exists q 0 such that
p = RT q,
Pm
i.e. pi = s=1 qs rsi .
Suppose there are two markets : one for crude and another for finished
products. The cost of Saudi crude and Venezuelan crude is 20 and 15 resp.
What is the fair price of finished goods ?
Let u1 be the fair price of gasoline and u2 be the fair price of jetfuel.
In the crude market, 1 unit of saudi oil costs 20. In the finished good
market 1 unit of crude is equivalent to 0.3 units of gasoline and 0.4
units of jetfuel, i.e. its cost is 0.3u1 + 0.4u2 .
If 0.3u1 + 0.4u2 > 20 then more and more crude will be converted into
finished products (of course ignoring other costs) so no equilibrium.
Therefore 0.3u1 + 0.4u2 20
If 0.3u1 + 0.4u2 < 20 then Saudi crude never used, i.e. x1 = 0, i.e.
(0.3u1 + 0.4u2 20)x1 = 0.
Thus, fair prices satisfy the dual constraints and complementary slackness,
i.e. the optimal dual variables are the fair prices.
Linear Programming 49
Consider a simple LP :
F (b) = maximize cT x,
such that Ax b,
xj 0, j = 1, . . . , p
where x Rn , b Rm and A Rmn . Let F (b) R be the optimal
value of LP when the RHS is b
F (b)
Want to evaluate the partial derivatives ui = bi , i.e. the marginal
increase in F (b) as bi is increased
Now, ui 0 (why? ). More generally
Primal Constraint =
min problem ui 0 ui 0 ui free
max problem ui 0 ui 0 ui free
Let x be the optimal solution of the LP then the slopes corresponding to
slack contraints are zero (why ?), i.e.
ui (aTi x bi ) = 0.
F (b + aj ) = maximize cT x,
such that Ax b + aj ,
xj 0, j = 1, . . . , p
therefore,
m
X
T T j
c x = c x + cj F (b + a ) F (b) + ui aij = cT x + uT aj
i=1
Linear Programming 4 11
The dual feasible region has only a finite number of extreme points, so as
one changes b only a finite number of slopes are possible.
Therefore, the slope ui is a piece-wise constant function of b, i.e. the slope
remains constant over a certain interval.
Constraint
max problem ui 0, |ui | ui 0, |ui |
max problem ui 0, |ui | ui 0, |ui |
7.5
x
PSfrag replacements
3.75 6.67 9
7.5
5
2.625
PSfrag replacements
1.1125
3.75 6.67 9
Linear Programming 4 15
7.5
3.75 6.67 9
7.5
6
5 2
PSfrag replacements
3.75 6.67 9
7.5
6
5 3.5
PSfrag replacements
3.75 6.67 9
Linear Programming 4 16
xB(j) + ji 0, j = 1, . . . , m
i.e.
xB(j) xB(j)
max min
{j|ji >0} ji {j|ji <0} ji
Continue with example:
B = {1, 2, 5, 6} therefore
2 4 0 0
4 3 0 0
A1
B =
2 4 1 0
4 3 0 1
bounds for 1
2.0 2
3.5
xB + 1 1 = + 4 0 0.875 1 = 0.625
7.0 2
2.5 4
Other bounds
0.5 2 1.1667, 7 3 , 2.5 4
Linear Programming 4 17
Suppose the demand for gasoline increase to 2.5. what is the increase in
cost ?
2.5 [1.125, 2.625], therefore, the additional cost is given by
20 (2.5 2) = 10.
What will the reduction in cost if the demand for jetfuel fell to 0.5 ?
b2 = 0.5 6 [1, 2.6667] so cannot answer exactly. but can say that the
reduction will be greater than u2 (1.5 0.5) = 35 (1.5 0.5) = 35 units.
The actual reduction is 55 units.
Linear Programming 4 18
7.5
PSfrag replacements 6
5
c1 c
c2
3.75 6.67 9
Two cases :
Case I: j 6 B. Then b
cB = c B .
cj = (cj + ) cTB A1 j
B a 0 cj
Case II: j B.
Suppose j is the l-th basic. Then b
cB = cB + el .
New optimality conditions:
(cB + el )T A1 T T
B A c + ej .
Linear Programming 4 19
Let qTl be the l-th row A1B AN (this is available in the tableau). Then,
optimality conditions are:
qlk ck , kN
q1 = [1, 0, 2, 4, 0, 0]
So we get the following bounds on 1
8.75 1 10
i.e.
11.25 c1 30
b 1 1 (A1 1
B ei )(AB qB )
T
( AB ) = A B
1 + qTB A
B 1ei
m
For all j N
(cTB (A1 1 T j
B ei ))(AB qB ) (A + uj ei )
cj cTB A1
B (A
j
+ uj ei )
1 + qTB A
B 1ei
Range hard to compute but one can check if the basis remains optimal
Linear Programming 4 21
This dual variable is a basic solution for the dual problem. Solve the
dual to optimality to obtain the value of lp.
Linear Programming 4 22
Define uT = cTB A1
B then u is dual feasible and
uT b = cT A1 T
B b =c x = p
Reading assigment
Rardin :
Sensitivity: Chapter 7
Bertsimas :
Chapter 4: Section 4.1 - Section 4.6
Chapter 5:
Luenberger :
Chapter 4