Lecture 06
Lecture 06
Lecture 6
In which we introduce the theory of duality in linear programming.
maximize x1 + 2x2 + x3 + x4
subject to
x1 + 2x2 + x3 ≤ 2
x2 + x4 ≤ 1
(1)
x1 + 2x3 ≤ 1
x1 ≥ 0
x2 ≥ 0
x3 ≥ 0
a ≤ b and c ≤ d
a+c≤b+d
(derived by “summing the left hand sides and the right hand sides” of our original
inequalities) is also true. In fact, we can also scale the inequalities by a positive
multiplicative factor before adding them up, so for every non-negative values y1 , y2 ≥ 0
we also have
1
y1 a + y2 c ≤ y1 b + y2 d
Going back to our linear program (1), we see that if we scale the first inequality by
1
2
, add the second inequality, and then add the third inequality scaled by 21 , we get
that, for every (x1 , x2 , x3 , x4 ) that is feasible for (1),
maximize c1 x1 + . . . cn xn
subject to
a1,1 x1 + . . . + a1,n xn ≤ b1
..
.
(2)
am,1 x1 + . . . + am,n xn ≤ bm
x1 ≥ 0
..
.
xn ≥ 0
For every choice of non-negative scaling factors y1 , . . . , ym , we can derive the inequality
y1 · (a1,1 x1 + . . . + a1,n xn )
+···
+yn · (am,1 x1 + . . . + am,n xn )
≤ y1 b1 + · · · ym bm
which is true for every feasible solution (x1 , . . . , xn ) to the linear program (2). We
can rewrite the inequality as
(a1,1 y1 + · · · am,1 ym ) · x1
+···
2
+(a1,n y1 · · · am,n ym ) · xn
≤ y 1 b1 + · · · y m bm
So we get that a certain linear function of the xi is always at most a certain value,
for every feasible (x1 , . . . , xn ). The trick is now to choose the yi so that the linear
function of the xi for which we get an upper bound is, in turn, an upper bound to
the cost function of (x1 , . . . , xn ). We can achieve this if we choose the yi such that
c1 ≤ a1,1 y1 + · · · am,1 ym
.. (3)
.
cn ≤ a1,n y1 · · · am,n ym
Now we see that for every non-negative (y1 , . . . , ym ) that satisfies (3), and for every
(x1 , . . . , xn ) that is feasible for (2),
c1 x1 + . . . cn xn
≤ (a1,1 y1 + · · · am,1 ym ) · x1
+···
+(a1,n y1 · · · am,n ym ) · xn
≤ y 1 b1 + · · · y m bm
Clearly, we want to find the non-negative values y1 , . . . , ym such that the above upper
bound is as strong as possible, that is we want to
minimize b1 y1 + · · · bm ym
subject to
a1,1 y1 + . . . + am,1 ym ≥ c1
..
.
(4)
an,1 y1 + . . . + am,n ym ≥ cn
y1 ≥ 0
..
.
ym ≥ 0
So we find out that if we want to find the scaling factors that give us the best possible
upper bound to the optimum of a linear program in standard maximization form, we
end up with a new linear program, in standard minimization form.
3
Definition 1 If
maximize cT x
subject to
(5)
Ax ≤ b
x≥0
is a linear program in maximization standard form, then its dual is the minimization
linear program
minimize bT y
subject to
(6)
AT y ≥ c
y≥0
minimize cT y
subject to
Ay ≥ b
y≥0
in an equivalent way as
maximize − cT y
subject to
−Ay ≤ −b
y≥0
If we compute the dual of the above program we get
minimize − bT z
subject to
−AT z ≥ −c
z≥0
4
that is,
maximize bT z
subject to
AT z ≤ c
y≥0
So we can form the dual of a linear program in minimization normal form in the same
way in which we formed the dual in the maximization case:
• take the transpose of the matrix of coefficients of the left-hand side of the
inequality,
• switch the roles of the vector of coefficients in the objective function and the
vector of right-hand sides in the inequalities.
Note that:
Fact 2 The dual of the dual of a linear program is the linear program itself.
Fact 3 If the primal (in maximization standard form) and the dual (in minimization
standard form) are both feasible, then
opt(primal) ≤ opt(dual)
5
• If LP2 is unbounded, then LP1 is infeasible;
opt(LP1 ) ≤ opt(LP2 )
Proof: We have proved the third statement already. Now observe that the third
statement is also saying that if LP1 and LP2 are both feasible, then they have to both
be bounded, because every feasible solution to LP2 gives a finite upper bound to the
optimum of LP1 (which then cannot be +∞) and every feasible solution to LP1 gives
a finite lower bound to the optimum of LP2 (which then cannot be −∞).
What is surprising is that, for bounded and feasible linear programs, there is always
a dual solution that certifies the exact value of the optimum.
Theorem 5 (Strong Duality) If either LP1 or LP2 is feasible and bounded, then
so is the other, and
opt(LP1 ) = opt(LP2 )
• If one of LP1 or LP2 is infeasible, then the other cannot be feasible and bounded,
that is, the other is going to be either infeasible or unbounded. Either case can
happen.
We will return to the Strong Duality Theorem, and discuss its proof, later in the
course.