LinearProgramming I
LinearProgramming I
Linear Programming
Shirish Shevade
Computer Science and Automation
Indian Institute of Science
Bangalore 560 012, India.
Shirish Shevade
Numerical Optimization
Transportation Problem
min
ij cij xij
s.t.
P3
j=1 xij
P2
ai , i = 1, 2
bj , j = 1, 2, 3
xij 0 i, j
i=1 xij
Shirish Shevade
The Diet Problem: Find the most economical diet that satisfies
minimum nutritional requirements.
Number of food items: n
Number of nutritional ingredient: m
Each person must consume at least bj units of nutrient j per
day
Unit cost of food item i: ci
Each unit of food item i contains aji units of the nutrient j
Number of units of food item i consumed: xi
Constraint corresponding to the nutrient j:
aj1 x1 + aj2 x2 + . . . + ajn xn bj , xi 0 i
Cost:
c1 x1 + c2 x2 + . . . + cn xn
Shirish Shevade
Numerical Optimization
Problem:
min
c1 x1 + c2 x2 + . . . + cn xn
s.t. aj1 x1 + aj2 x2 + . . . + ajn xn bj j
xi 0 i
Given: c = (c1 , . . . , cn )T , A = (a1 | . . . |an ), b = (b1 , . . . , bm )T .
Linear Programming Problem (LP):
min
cT x
s.t. Ax b
x0
where A Rmn , c Rn and b Rm .
Assumption: m n, rank(A) = m
Linear Constraints can be of the form Ax = b or Ax b
Shirish Shevade
Numerical Optimization
Shirish Shevade
Numerical Optimization
Shirish Shevade
Numerical Optimization
Shirish Shevade
Numerical Optimization
Numerical Optimization
Numerical Optimization
Definition
Let X be a convex set. A point x X is said to be an extreme
point (corner point or vertex) of X if x cannot be represented
as a strict convex combination of two distinct points in X.
Numerical Optimization
Extreme Point: A
Shirish Shevade
Numerical Optimization
Constraint Set:
X = {(x1 , x2 ) : x1 + x2 2, x1 1, x1 0, x2 0}
4 constraints in R2
Numerical Optimization
Shirish Shevade
Numerical Optimization
Numerical Optimization
Remarks:
Consider the constraint set: X = {x : Ax = b, x 0} where
A Rmn and rank(A) = m.
Let x X be an extreme point of X
m equality constraints are active at x
Therefore, n m additional hyperplanes (from the
non-negativity constraints) are active at x
Shirish Shevade
Numerical Optimization
Shirish Shevade
Numerical Optimization
Shirish Shevade
Numerical Optimization
Shirish Shevade
Numerical Optimization
Shirish Shevade
Numerical Optimization
Shirish Shevade
Numerical Optimization
Shirish Shevade
Numerical Optimization
Shirish Shevade
Numerical Optimization
Example:
min
s.t.
2x1 x2
x1 + x2 5
x1 + 2x2 6
x1 , x2 0
Shirish Shevade
Numerical Optimization
Example:
min
s.t.
2x1 x2
x1 + x2 5
x1 + 2x2 6
x1 , x2 0
Shirish Shevade
Numerical Optimization
Example:
min
s.t.
2x1 x2
x1 + x2 5
x1 + 2x2 6
x1 , x2 0
Shirish Shevade
Numerical Optimization
Example:
min
s.t.
2x1 x2
x1 + x2 5
x1 + 2x2 6
x1 , x2 0
Shirish Shevade
Numerical Optimization
Example:
min cT x
s.t. x X
Shirish Shevade
Numerical Optimization
Example:
min cT x
s.t. x X
Shirish Shevade
Numerical Optimization
Example:
min cT x
s.t. x X
Shirish Shevade
Numerical Optimization
Example:
min cT x
s.t. x X
Shirish Shevade
Numerical Optimization
Numerical Optimization
LP in Standard Form:
min
cT x
s.t. Ax = b
x0
where A Rmn and rank(A) = m.
Assumption: Feasible set is non-empty
Shirish Shevade
Numerical Optimization
Shirish Shevade
Numerical Optimization
Shirish Shevade
Numerical Optimization
Example:
x1 2x2 3x3
x1 + 2x2 + x3 14
x1 + 2x2 + 4x3 12
x1 x2 + x3 = 2
x1 , x2 unrestricted
x3 3constraints
Write the constraints as equality
min
s.t.
x1 + 2x2 + x3 + x4 = 14, x4 0
x1 + 2x2 + 4x3 x5 = 12, x5 0
Shirish Shevade
Numerical Optimization
Numerical Optimization
Numerical Optimization
Shirish Shevade
Numerical Optimization
Proof.
(a) Let x be a basic feasible solution of Ax = b, x 0.
Therefore, x = (x1 , . . . , xm , 0, . . . , 0). Let B = (a1 |a2 | . . . |am )
| {z } | {z }
0
nm
Numerical Optimization
Proof.(continued)
(b) Let x be an extreme point of X.
x X Ax = b, x 0.
There exist n linearly independent constraints active at x.
m active constraints associated with Ax = b.
n m active constraints associated with n m
non-negativity constraints
x is the unique solution of Ax = b, xN = 0.
Ax = b BxB + NxN = b xB = B1 b 0
Therefore, x = (xB xN )T is a basic feasible solution.
n
Number of basic solutions
m
Enough to search the finite set of vertices of X to get an optimal
Shirish Shevade
Numerical Optimization
solution
Theorem
Let X be non-empty and compact constraint set of a linear
program. Then, an optimal solution to the linear program exists
and it is attained at a vertex of X.
Proof.
Objective function, cT x, of the linear program is continuous
and the constraint set is compact. Therefore, by Weierstrass
Theorem, optimal solution exists.
The set of vertices, {x1 , . . . , xk }, of X is finite.
Therefore, X is the convex hull
P of x1 , . . . , xk .
Hence, for every x X, x = ki=1 i xi where
P
i 0, ki=1 i = 1.
Let z = min
cT xi . Therefore,
x X,
P1ik
Pk for any
k
T
T
z = c x = i=1 i c xi z
i=1 i = z . So, the minimum
value of cT x is attained at a vertex of X.
Shirish Shevade
Numerical Optimization
Shirish Shevade
Numerical Optimization
Shirish Shevade
Numerical Optimization
1 1 1 0
1 0 0 1
2
1
Shirish Shevade
Numerical Optimization
1 1 1 0
1 0 0 1
2
1
Shirish Shevade
Numerical Optimization
A=
1 1 1 0
1 0 0 1
= (a1 |a2 |a3 |a4 ) and b =
(3) B = (a1 |a4 ) =
1 0
1 1
2
1
.
Shirish Shevade
Numerical Optimization
1 1 1 0
1 0 0 1
2
1
Shirish Shevade
Numerical Optimization
1 1 1 0
1 0 0 1
2
1
Shirish Shevade
Numerical Optimization
Example:
min 3x1 x2
s.t. x1 + x2 2
x1 1
x1 , x2 0
Shirish Shevade
Numerical Optimization