Linear Programming (based on Coremen et al.)
LP in Standard form
Find values for n variables x
1,
x
2, …,
x
n
:
Maximize (
∑
j=1
n
c
j
x
j
)
(Maximize the objective function)
Subject to:
∑
j=1
n
a
ij
x
j
≤
b
i
,
for i = 1, … m
(subject to m linear constraints, and)
for all j = 1,…n, x
j
≥
0
(all variables are non-negative)
The constant coefficients are c
j
, a
ij
, and b
i
.
Problem size: (n, m).
Example 1:
Maximize (2x1 –3x2 +3x3)
Three constraints:
x1 +x2 –x3
≤
7,
-x1 –x2 +x3
≤
-7,
x1 –2x2 +2x3
≤
4,
x1, x2, x3
≥
0
Converting some non-standard form to equivalent standard form
Note: In the standard for the inequalities must be strict (‘
≥
,’ rather than ‘>’), equations
are linear (power of x is 0 or 1)
1) Objective function minimizes as opposed to maximizes
Example 2.1: minimize (-2x1 + 3x2)
Action: Change the signs of coefficients
Example 2.1: maximize (2x1 –3x2)
2) Some variables need not be non-negative
Example 2.2:
Constraints: x1 +x2 = 7,
x1 –2x2
≤
4,
x1
≥
0, no constraint on x2.
Action: replace occurrence of any unconstrained variable xj, with a new expression (xj’ –
xj’’),
and add two new constraints xj’, xj’’
≥
0.
Example 2.2:
Constraints: x1 +x2’ –x2’’ = 7,
x1 –2x2’ +2x2’’
≤
4, x1, x2’, x2’’
≥
0.
The number of variables in the problem may at most be doubled, from n to 2n, a
polynomial-time increase.
3) There may be equality linear constraints
Example 2.3: