Professional Documents
Culture Documents
EL6233 Lecture2
EL6233 Lecture2
Overview
LP is a tool for solving optimization problems with
linear cost functions and constraints. Motivated by
addressing military problems during World War II, LP
has now found a wide range of industrial applications
in banking, economics/finance, transportation,
petroleum, and IT, to name a few.
6
The Feasible Region P = -15
P = -4
P = -2
-3 -1 3 X1
P=0
@2020 New York University Tandon
2/4/2020 47
School of Engineering
Observations
• The minimizer occurs at the corner or
extreme point (3, 6).
• The feasible region (defined by linear
constraints) is convex.
• The geometric approach is useful for two‐
dimensional LP problems.
max P 6 x1 2 x2 ,
subject to
4 x1 5 x2 20,
3 x1 x2 6,
x , x 0.
1 2
@2020 New York University Tandon
2/4/2020 49
School of Engineering
The Simplex Method
A more systematic tool
min P c x T
subject to Ax b,
x 0,
mn
A , b , b 0. m
ai1 x1 ain xn bi
ai1 x1 ain xn si bi
@2020 New York University Tandon
2/4/2020 52
School of Engineering
Transformation to SF (cont’d)
• From “inequality” to “=“ using excess variable:
a j1 x1 a jn xn b j
a j1 x1 a jn xn e j b j
x x1 x2 , with x1 , x2 0
@2020 New York University Tandon
2/4/2020 53
School of Engineering
An Example
Convert the following LP problem into standard form:
max P 5 x1 3 x2 7 x3
subject to 2 x1 4 x2 6 x3 7
3 x1 5 x2 3 x3 5
4 x1 9 x2 4 x3 4
x1 2, 0 x2 4, x3 free
z1 x1 2, z2 x2 , z2 z3 4, z4 z5 x3
3 x1 5 x2 3 x3 z6 5
4 x1 9 x2 4 x3 z7 4
P 5 x1 3 x2 7 x3
10 5 z1 3 z2 7 z4 7 z5
10 cT z
where
cT 5, 3, 0, 7, 7, 0, 0 ,
z T z1 , z2 , , z7 .
Az b
11 2 4 0 6 6 0 0
4
0 1 1 0 0 0 0
b , A
11 3 5 0 3 3 1 0
12 4 9 0 4 4 0 1
@2020 New York University Tandon
2/4/2020 58
School of Engineering
Exercise
Convert the following optimization problem
into an LP in the standard form:
min P x1 2 x2
subject to
x1 x2 4.
@2020 New York University Tandon
2/4/2020 59
School of Engineering
Standard Form (cont’d)
min P c x T
subject to Ax b,
x 0,
mn
A , b , b 0. m
Assumptions:
1. m n : Less constraints than variables.
2. The matrix A has full (row) rank.
@2020 New York University Tandon
2/4/2020 60
School of Engineering
Extreme Points
A point x S is an extreme point if x is not
inside a line segment connecting any two points
(y, z) of S:
x y (1 ) z , 0 1, y, z x.
y, z S y 1 z S , 0 1.
@2020 New York University Tandon
2/4/2020 62
School of Engineering
Basic Solutions
A point x is a basic solution if:
i) x satisfies the equality constraints of the LP
problem.
ii) the columns of the constraint matrix A
corresponding to the nonzero components of x are
linearly independent.
min P x1 2 x2
subject to 2 x1 x2 2
x1 x2 3
x1 3
x1 , x2 0.
@2020 New York University Tandon
2/4/2020 64
School of Engineering
Standard Form
min P x1 2 x2
subject to 2 x1 x2 s1 2
x1 x2 s2 3
x1 s3 3
x1 , x2 , s1 , s2 , s3 0.
x1 x2 s1 s2 s3 0 3 1 0 3
• For the basis s 1 , s 2 , s 3 , the basic solution follows:
x1 x2 s1 s2 s3 0 0 2 2 3
• For the basis x 1 , x 2 , s 1 , the basic solution follows:
x1 x2 s1 s2 s3 3 6 2 0 0
Optimal !
@2020 New York University Tandon
2/4/2020 66
School of Engineering
An Equivalence Theorem
A point x is an extreme point of the set
{x: Ax=b, x>=0} if and only if
it is a basic feasible solution.
xB xB
x and A B N
xN 0
where B is an invertible matrix.
By contradiction, assume x is not an extreme point.
Then,
x y (1 ) z , y 0, z 0, (0,1)
y yB y N , z z B z N , y z.
T T
y N z N 0, BxB ByB Bz B b
xB xB
x , xB >0 and A B N , B full column rank
xN 0
xB p xB p
y and z , 0 small
xN xN
1 1
x y z , Contradiction !
2 2
Key points:
• Principles of the simplex method.
min P x1 2 x2
subject to 2 x1 x2 2
x1 2 x2 7
x1 3
x1 , x2 0.
6
D
The Feasible Region
C
3
-3 -1 A 3 X1
In compact notation:
min P cT x
subject to: Ax b, x 0, b 0.
@2020 New York University Tandon
2/4/2020 77
School of Engineering
Basic Feasible Solutions
Point A: (0, 0, 2, 7, 3) xB ( x3 , x4 , x5 ), xN ( x1 , x2 )
subject to x3 2 2 x1 x2 , x4 7 x1 2 x2 , x5 3 x1.
next , increase x2 to 2 (while x1 =0!) to give:
Point B: (0, 2, 0, 3, 3) xB ( x2 , x4 , x5 ), xN ( x1 , x3 )
based on the above equality constraints!
This step yields: P 4 5 x1 2 x3
subject to x2 2 2 x1 x3 , x4 3 3 x1 2 x3 , x5 3 x1.
@2020 New York University Tandon
2/4/2020 78
School of Engineering
Observations
• The slack variables are good candidates for
(initial choice of) basic variables.
subject to Ax b , A B N
x , b 0.
xB
x , P cB xB c N xN
T T
x
N
Bx B Nx N b , B invertible
1 1
x B B b B Nx N
@2020 New York University Tandon
2/4/2020 80
School of Engineering
General Formulas (Cont’d)
P y b T
c y N
T
N
T
xN
cˆN reduced costs
1
with y c B
T T
B
ˆ 1
with A B A , A t -th column of A.
t t t
xB bˆ B 1 NxN bˆ Aˆt xt
can be rewritten as: i,
( x ) bˆ aˆ x
B i i i ,t t
Remark:
When aˆi ,t 0 for all i, then, as xt increases
from zero, P !
@2020 New York University Tandon
2/4/2020 84
School of Engineering
Summary
Initialization: Select a basic feasible solution
xB bˆ B 1b 0, with B the basis matrix.
bˆs bˆ
m in i aˆ i , t 0
aˆ s , t 1 i m aˆ i , t
In compact notation:
min P c x, subject to: Ax b, x 0, b 0.
T
Step 1:
xB x3 , x4 , x5 , xN x1 , x2
T T
c B 0, 0, 0 , c N 1, 2
T T
Step 2:
xB x2 , x4 , x5 , xN x1 , x3
T T
c B 2, 0, 0 , c N 1, 0
T T
c B 2, 1, 0 , c N 0, 0
T T
Step 4: xB x2 , x1 , x3 , xN x4 , x5
T T
c B 2, 1, 0 , c N 0, 0
T T
Optimal, because
T
1
cˆ c N c B B
T
N
T T
N (1, 2) 0.
@2020 New York University Tandon
2/4/2020 89
School of Engineering