Professional Documents
Culture Documents
Lecture 03
Lecture 03
Yinyu Ye
Department of Management Science and Engineering
Stanford University
Stanford, CA 94305, U.S.A.
http://www.stanford.edu/˜yyye
LY, Appendix B, Chapters 2.3-2.6, 3.1-3.3
1
Yinyu Ye, MS&E, Stanford MS&E310 Lecture Note #03
AB xB = b
for the m-dimension vector xB . By setting, xN , the variables corresponding to the remaining columns of
A equal to zero, we obtain a solution x such that Ax = b. (Here, index set N represents the indices of
the remaining columns of A.)
Then, x is said to be a basic solution to with respect to the basic variable set B . The variables of xB are
called basic variables, those of xN are called nonbasic variables, and AB is called basis.
If a basic solution xB ≥ 0, then x is called a basic feasible solution, or BFS, which is an extreme or
corner point of the polyhedron.
Carathéodory’s Theorem: If there is a feasible solution for the polyhedron, then there is a basic feasible
solution for the polyhedron.
2
Yinyu Ye, MS&E, Stanford MS&E310 Lecture Note #03
Consider the polyhedron set {y : AT y ≤ c} where A is a m × n matrix with n ≥ m and full row rank,
select m linearly independent columns, denoted by the variable index set B , from A. Solve
ATB y = cB
Then, y is called a basic solution to with respect to the basis AB in polyhedron set {y : AT y ≤ c}.
If a basic solution AT
Ny≤ cN , then y is called a basic feasible solution, or BFS of {y : AT y ≤ c},
where index set N represents the indices of the remaining columns of A. BFS is an extreme or corner
point of the polyhedron.
3
Yinyu Ye, MS&E, Stanford MS&E310 Lecture Note #03
The most important theorem about the convex set is the following separating hyperplane theorem (Figure
1).
a • b > sup a • x
x∈C
4
Yinyu Ye, MS&E, Stanford MS&E310 Lecture Note #03
Figure 1: Illustration of the separating hyperplane theorem; an exterior point b is separated by a hyperplane
from a convex set C .
5
Yinyu Ye, MS&E, Stanford MS&E310 Lecture Note #03
Examples
Let C be a unit circle centered at point (1; 1). That is, C = {x ∈ R2 : (x1 − 1)2 + (x2 − 1)2 ≤ 1}.
If b = (2; 0), a = (−1; 1) is a separating hyperplane vector.
If b = (0; −1), a = (0; 1) is a separating hyperplane vector. It is worth noting that these separating
hyperplanes are not unique.
6
Yinyu Ye, MS&E, Stanford MS&E310 Lecture Note #03
Farkas’ Lemma
7
Yinyu Ye, MS&E, Stanford MS&E310 Lecture Note #03
Alternative Systems
Farkas’ lemma is also called the alternative theorem, that is, exactly one of the two systems:
{x : Ax = b, x ≥ 0}
and
{y : AT y ≤ 0, bT y > 0},
is feasible.
Geometrically, Farkas’ lemma means that if a vector b ∈ Rm does not belong to the cone generated by
a.1 , ..., a.n , then there is a hyperplane separating b from cone(a.1 , ..., a.n ), that is,
b ̸∈ {Ax : x ≥ 0}.
8
Yinyu Ye, MS&E, Stanford MS&E310 Lecture Note #03
Proof
y • b > sup y • c
c∈C
or
y • b > sup y • (Ax) = sup AT y • x. (1)
x≥0 x≥0
9
Yinyu Ye, MS&E, Stanford MS&E310 Lecture Note #03
10
Yinyu Ye, MS&E, Stanford MS&E310 Lecture Note #03
C is a Closed Set
C := {Ax : x ≥ 0} is closed set, that is, for every convergence sequence ck ∈ C , the limit of {ck }, is
also in C .
The key to prove the statement is to show that ck = Axk for a bounded sequence xk ≥ 0. This is
where Carathéodory’s theorem can help, since ck = AB k xk B k ≥ 0.
k
B k for a basic feasible solution x
−1 k
Clearly, xk is bounded since xk
B k = A B k c is bounded and x k
N k = 0.
x x1 x2
Note that C may not be closed if x is in other cones. C = , ≽ 0 where
1
x2 x2 x3
(0; 1) is not in C but it is a limit point of sequence ck ∈ C .
11
Yinyu Ye, MS&E, Stanford MS&E310 Lecture Note #03
Theorem 3 Let A ∈ Rm×n and c ∈ Rn . Then, the system {y : AT y ≤ c} has a solution y if and
only if that Ax = 0, x ≥ 0, cT x < 0 has no feasible solution x.
Again, a vector x ≥ 0, with Ax = 0 and cT x < 0, is called a infeasibility certificate for the system
{y : AT y ≤ c}.
example
Let A = (1; −1) and c = (1; −2). Then, x = (1; 1) is an infeasibility certificate for {y : AT y ≤ c}.
12
Yinyu Ye, MS&E, Stanford MS&E310 Lecture Note #03
Consider the linear program in standard form, called the primal problem,
(LP ) minimize cT x
subject to Ax = b, x ≥ 0,
(LD) maximize bT y
subject to AT y + s = c, s ≥ 0,
13
Yinyu Ye, MS&E, Stanford MS&E310 Lecture Note #03
A AT
Max model Min model
xj ≥ 0 j th constraint ≥
xj ≤ 0 j th constraint ≤
xj free j th constraint =
ith constraint ≤ yi ≥ 0
ith constraint ≥ yi ≤ 0
ith constraint = yi free
14
Yinyu Ye, MS&E, Stanford MS&E310 Lecture Note #03
maximize x1 +2x2
subject to x1 ≤1
P rimal : x2 ≤1
x1 +x2 ≤ 1.5
x1 , x2 ≥ 0.
15
Yinyu Ye, MS&E, Stanford MS&E310 Lecture Note #03
LP Duality Theories
Theorem 4 (Weak duality theorem) Let feasible regions Fp and Fd be non-empty. Then,
cT x ≥ bT y where x ∈ Fp , (y, s) ∈ Fd .
cT x − bT y = cT x − (Ax)T y = xT (c − AT y) = xT s ≥ 0.
This theorem shows that a feasible solution to either problem yields a bound on the value of the other
problem. We call cT x − bT y the duality gap.
16
Yinyu Ye, MS&E, Stanford MS&E310 Lecture Note #03
Theorem 5 (Strong duality theorem) Let Fp and Fd be non-empty. Then, x∗ is optimal for (LP) if and
only if the following conditions hold:
i) x∗ ∈ Fp ;
ii) there is (y∗ , s∗ ) ∈ Fd ;
iii) cT x∗ = bT y∗ .
Given Fp and Fd being non-empty, we like to prove that there is x∗ ∈ Fp and (y∗ , s∗ ) ∈ Fd such that
cT x∗ ≤ bT y∗ , or to prove that
Ax = b, AT y ≤ c, cT x − bT y ≤ 0, x ≥ 0
is feasible.
17
Yinyu Ye, MS&E, Stanford MS&E310 Lecture Note #03
Suppose not, from Farkas’ lemma, we must have an infeasibility certificate (x′ , τ, y′ ) such that
Ax′ − bτ = 0, AT y′ − cτ ≤ 0, (x′ ; τ ) ≥ 0
and
bT y′ − cT x′ = 1
which is a contradiction.
18
Yinyu Ye, MS&E, Stanford MS&E310 Lecture Note #03
Geometric Interpretation
Consider
minimize 18x1 + 12x2 + 2x3 + 6x4
subject to 3x1 + x2 − 2x3 + x4 = 2
x1 + 3x2 − x4 = 2
x1 > 0, x2 > 0, x3 > 0, x4 > 0.
and its dual
maximize 2λ1 + 2λ2
subject to 3λ1 + λ2 6 18
λ1 + 3λ2 6 12
−2λ1 62
λ1 − λ2 6 6.
19
Yinyu Ye, MS&E, Stanford MS&E310 Lecture Note #03
λ2
a2 a2
b b
a1 a1
a3 a3
λ1
a4
a4 Obj contour
Each column aj of the primal defines a constraint of the dual as a half-space whose boundary is
orthogonal to that column vector and is located at a point determined by cj . The dual objective is
maximized at an extreme point of the dual feasible region. The active constraints at optimal solution
correspond to an optimal basis of the primal. In the specific example, b is a conic combination of a1 and
a2 . The weights in this combination are the xi ’s in the optimal solution of the primal.
20
Yinyu Ye, MS&E, Stanford MS&E310 Lecture Note #03
Theorem 6 (LP duality theorem) If (LP) and (LD) both have feasible solutions then both problems have
optimal solutions and the optimal objective values of the objective functions are equal.
If one of (LP) or (LD) has no feasible solution, then the other is either unbounded or has no feasible
solution. If one of (LP) or (LD) is unbounded then the other has no feasible solution.
The above theorems show that if a pair of feasible solutions can be found to the primal and dual problems
with equal objective values, then these are both optimal. The converse is also true; there is no “gap.”
21
Yinyu Ye, MS&E, Stanford MS&E310 Lecture Note #03
Optimality Conditions
cT x − bT y = 0
(x, y, s) ∈ (Rn+ , Rm , Rn+ ) : Ax = b ,
−AT y − s = −c
which is a system of linear inequalities and equations. Now it is easy to verify whether or not a pair
(x, y, s) is optimal.
22
Yinyu Ye, MS&E, Stanford MS&E310 Lecture Note #03
Xs = 0
Ax = b
−AT y − s = −c,
This system has total 2n + m unknowns and 2n + m equations including n nonlinear equations.
23
Yinyu Ye, MS&E, Stanford MS&E310 Lecture Note #03
Theorem 7 (Strict complementarity theorem) If (LP) and (LD) both have feasible solutions then both
problems have a pair of strictly complementary solutions x∗ ≥ 0 and s∗ ≥ 0 meaning
X ∗ s∗ = 0 and x∗ + s∗ > 0.
Given (LP) or (LD), the pair of P ∗ and Z ∗ is called the (strict) complementarity partition, solving which can
be viewed as a binary classification problem for a given data (A, b, c).
24
Yinyu Ye, MS&E, Stanford MS&E310 Lecture Note #03
An Example
25
Yinyu Ye, MS&E, Stanford MS&E310 Lecture Note #03
bT y − z ∗ τ = 0, AT y − cτ + s = −ej , (s, τ ) ≥ 0.
26
Yinyu Ye, MS&E, Stanford MS&E310 Lecture Note #03
∗ 1∑ j ∗ 1∑ j
x = x and s = s .
n j n j
Let (x1 , s1 ) and (x2 , s2 ) be two strict complementarity solution pairs. Note that we still have
0 = (x1 )T s2 = (x2 )T s1
from the Strong Duality theorem. This indicates that they must have same strict complementarity partition,
since, otherwise, we must have an j such that x1j > 0 and s2j > 0 or (x1 )T s2 > 0.
27