Linear Problem (LP) Linear Problem (LP) Linear Problem (LP) Linear Problem (LP)
Linear Problem (LP) Linear Problem (LP) Linear Problem (LP) Linear Problem (LP)
Rajib Bhattacharjya
Department of Civil Engineering
IIT Guwahati
Linear programming
During World War II, the US Air force sought more effective procedure for allocation
of resources
George B. Dantzig, a member of the US Air Force formulate general linear problem
for solving the resources allocation problem.
⋮ ⋮ ⋮
ܽଵ ݔଵ + ܽଶ ݔଶ + ܽଷ ݔଷ + ⋯ + ܽ ݔ = ܾ
Minimize ݂ ܺ = ܿ ் ܺ
Subject to
ܽܺ = ܾ
ܺ≥0
Where
ݔଵ ܾଵ ܿଵ ܽଵଵ ܽଵଶ ⋯ ܽଵ
ݔଶ ܾ ܿଶ ܽଶଵ ܽଶଶ ⋯ ܽଶ
ܺ= ⋮ ܾ= ଶ ܿ= ⋮ ܽ= ⋮ ⋮ ⋱ ⋮
⋮
ݔ ܾ ܿ ܽଵ ܽଶ ⋯ ܽ
Equivalent to
Minimize = ܨ−݂ ݔଵ , ݔଶ , ݔଷ , … , ݔ = −ܿଵ ݔଵ − ܿଶ ݔଶ − ܿଷ ݔଷ −… − ܿ ݔ
Infeasible
region
Infeasible region
Infeasible
Feasible
region
= ݖସ
Infeasible region
= ݖଶ = ݖଷ
= ݖଵ
Increasing z direction Maximize ܿ = ݖଵ ݔ+ ܿଶ ݕ
Subject to
Infeasible
region
As such solution of
the problem will
Infeasible region be one of the
corners of the
Infeasible
Feasible
search space
region
Infeasible region
Infeasible
region
This problem has
infinite number of
Infeasible region solutions
Infeasible
Feasible
region
Infeasible region
= ݖଷ
= ݖଵ = ݖଶ
Maximize ܿ = ݖଵ ݔ+ ܿଶ ݕ
Subject to
Feasible region
Infeasible region
Search space
25
20
15
10
Plane
ିܪ
5
ܪା = ܺ|்ܽ ܺ ≥ ܾ
0
10
8
0
6 2
4
4
ܾ ≤ ܺ ்ܽ|ܺ = ି ܪ
6
2
8
0 10
10
ିܪ
9
Line
ܪା
5
1
1 2 3 4 5 6 7 8 9 10
ܽܺ = ܾ
ܺ≥0
is called feasible solution
Basic solution
A basic solution is one in which ݊ − ݉ variable are set equal to zero and
solution can be obtained for the ݉ number variable
Elementary operation
1. Any equation ܧ can be replaced by ݇ܧ , where ݇ is a non zero constant
2. Any equation ܧ can be replaced by ܧ + ݇ܧ௦ , where ܧ௦ is any other
equation
3 7 1 1
ݔଵ + ݔଶ − ݔଷ − ݔସ = ܴଵ = ܴ
2 2 2 2
1 13 11
0 − ݔଶ + 2ݔଷ + ݔସ = ܴଵଵ = ܴଵ − ܴଵ
2 2 2
5 17 7
0 − ݔଶ + 2ݔଷ + ݔସ = ܴଶଵ = ܴଶ − ܴଵ
2 2 2
Rajib Bhattacharjya, IITG CE 602: Optimization Method
3
ݔଵ + 0 + 5ݔଷ + 16ݔସ = 17 ܴଶ = ܴଵ − ܴଵଶ
2
0 + ݔଶ − 4ݔଷ − 13ݔସ = −11 ܴଵଶ = −2ܴଵଵ
5
0 + 0 − 8ݔଷ −24ݔସ = −24 ܴଶଶ = ܴଶଵ + ܴଵଶ
2
ݔଵ = 2 − ݔସ
ݔଶ = 1 + ݔସ
ݔଷ = 3 − 3ݔସ
Basic Variable
f bi bi/aij
Variable x1 x2 x3 x4 x5 x6
x4 2 1 -1 1 0 0 0 2 2
x5 2 -1 5 0 1 0 0 6
x6 4 1 1 0 0 1 0 6 6
f -1 -2 -1 0 0 0 -1 0
Basic Variable
f bi bi/aij
Variable x1 x2 x3 x4 x5 x6
x2 3 1 0 1.25 0.25 0 0 4
x3 1 0 1 0.25 0.25 0 0 2
x6 0 0 0 -1.5 -0.5 1 0 0
f 6 0 0 2.75 0.75 0 -1 10
Basic Variable
f bi bi/aij
Variable x1 x2 x3 x4 x5 x6
x2 3 1 0 0.5 0 0.5 0 4
x5 0 0 0 3 1 -2 0 0
x3 1 0 1 -0.5 0 0.5 0 2
f 6 0 0 0.5 0 1.5 -1 10
If all ܿᇱ are positive, it is not possible to improve (reduce) the objective
function value by making a non basic variable as basic variable
Maximum benefit can be obtained by making the non-basic variable with
minimum negative coefficient as basic variable
In case of a tie, any one can be selected arbitrarily
ᇱ
If ܽ௦ is negative, the maximum possible value of ݔ௦ is +∞
Basic Variable
f bi bi/aij
Variable x1 x2 x3 x4
x3 1 -1 1 0 0 1 1
x4 3 -2 0 1 0 6 2
f -3 -2 0 0 -1 0
Basic Variable
f bi bi/ais
Variable x1 x2 x3 x4
x1 1 0 -2 1 0 4
x2 0 1 -3 1 0 3
f 0 0 -12 5 -1 18
Basic Variable
Variable x1 x2 x3 x4 x5 y1 y2 f w b bi/ais
y1 3 -3 4 2 -1 1 0 0 0 0 0
y2 1 1 1 3 1 0 1 0 0 2 0.67
f 2 3 2 -1 1 0 0 -1 0 0
w -4 2 -5 -5 0 0 0 0 -1 -2
Basic Variable
Variable x1 x2 x3 x4 x5 y1 y2 f w b bi/ais
x4 0.55 0 0.64 1 0.18 0.09 0.27 0 0 0.55
-
x2 0.64 1 -0.91 0 0.45 -0.27 0.18 0 0 0.36
f 4.45 0 5.36 0 -0.18 0.91 -0.27 -1 0 -0.55
w 0 0 0 0 0 1 1 0 -1 0
Phase I
Minimize ݕ = ݓଵ + ݕଶ
Or, Minimize w = −2ݔଵ + 0ݔଷ + 0ݔସ + ݔହ = −10
Basic Variable
w f bi bi/aij
Variable x1 x3 x4 x5 x6 y1 y2
x1 1 0 0 -0.5 0 0.5 0.5 0 0 5
x3 0 1 -1 0.25 0 -0.25 0.25 0 0 1.5
x6 0 0 0 0.75 1 -0.75 -0.25 0 0 7.5
f 0 0 0 1.5 0 -1.5 -2.5 0 -1 -23
w 0 0 0 0 0 1 1 -1 0 0
Basic Variable
f bi bi/aij
Variable x1 x3 x4 x5 x6
x1 1 0 0 -0.50 0 0 5
x3 0 1 -1 0.25 0 0 1.5
x6 0 0 0 0.75 1 0 7.5
f 0 0 0 1.5 0 -1 -23
Basic Variable
f bi bi/aij
Variable x1 x2 x3 x4 x5 x6
x5 6.25 0 3.75 8.75 1 -0.25 0 1000 114
x2 0.075 1 0.025 0.025 0 0.025 0 20 800
f -37.5 0 -27.5 -47.5 0 2.5 -1 2000
Basic Variable
f bi bi/aij
Variable x1 x2 x3 x4 x5 x6
x3 1.67 0 1 2.33 0.27 -0.07 0 267
x2 0.03 1 0 -0.03 -0.01 0.03 0 13
f 8.33 0 0 16.67 7.33 0.67 -1 9333