Chapter 1 - Linear Programming Part 2
Chapter 1 - Linear Programming Part 2
Linear Programming
2 9/14/2021
KKR, GEC Tcr
Generalized mathematical Expression of LPP
Maximize or Minimize Z(x) = F(x) = c1x1+c2x2+…+cnxn
Subject to linear constraints;
a11x1 + a12x2 + ................+ a1nxn = b2
a21x1 + a22x2 + ................+ a2nxn ≤ b2
...................................................
am1x1 + am2x2 + ................+ amnxn ≤ bm
And non-negativity constraints;
x1 ≥ 0, x2 ≥ 0, .................., xn ≥ 0
Where cj are cost coefficients, bi - capacities, Xj- decision variables
and aij are technological coefficients
Equation (2)
8
D Equation (1)
6
4
(8,2)
C
2 Feasible region - ABCD
0A
9 0 2 4 6 8 B 10 12 9/14/2021
KKR, GEC Tcr
x1 14
1. Graphical Method…
It can be shown that the optimal z will be on any one of the corner
points of the feasible region.
Thus, evaluate z = 12 x1 + 16 x2 at the corner points A, B, C and D
Point A (0,0): z = 12 x 0 + 16 x 0 = 0
Point B (10,0): z = 12 x 10 + 16 x 0 = 120
Point C (8,2): z = 12 x 8 + 16 x 2 = 128
Point D (0,6): z = 12 x 0 + 16 x 6 = 96
The maximum value of z is at point C (8,2).
Therefore, the optimum value x1 = 8, x2 = 2 and the
corresponding profit z = Rs.128
10
KKR, GEC Tcr 9/14/2021
1. Graphical Method…
E.g. 2 Find the maximum of z = 100 x1 + 60 x2
Subject to constraints;
5x1 + 10x2 ≤ 50
Use graphical method
8x1 + 2x2 ≥ 16
3x1 – 2x2 ≥ 6
E.g. 3 Find the minimum of z = 4x1 + 6x2
Subject to constraints;
x1 + x2 ≥ 8
6x1 + x2 ≥ 12
x1, x2 ≥ 0
Key column
Highest
# Key element = 20
# x2 is the entering variable – variable in the key column
# s2 is the leaving variable – variable in the key row
15 KKR, GEC Tcr 9/14/2021
Simplex Method…
Step 6 : Iteration 1
Cj 12 16 0 0
CBi Basic Solution Ratio
x1 x2 s1 s2
Variable
Zj 8 16 4/5 0 96
Cj - Zj 4 0 -4/5 0
16 x2 1/2 1 1/20 0 6 12
Outgoing variable – s2
0 s2 4 0 -2/5 1 32 8
Entering variable – x1
Zj 8 16 4/5 0 96
Cj - Zj 4 0 -4/5 0
16 x2 0 1 1/10 -1/8 2
Zj 12 16 2/5 1 128
Cj - Zj 0 0 -2/5 -1
Now check for optimality: Since all the (Cj – Zj) values are less
than or equal to zero, the solution is optimal.
The optimal values of x1 = 8, x2 = 2 and Profit Z = 128 (ANS)
0 S1 3 -1 2 1 0 0 7 -7
0 S2 -2 -4 0 0 1 0 12 -3
0 s3 -4 3 8 0 0 1 10 10/3
Zj 0 0 0 0 0 0 0
Cj - Zj 2 -3 6 0 0 0
▪ Check for optimality: Since all the (Cj-Zj) values are not greater than
or equal to zero, the solution is not optimal (minimization problem)
Zj 4 -3 -8 0 0 -1 -10
Cj - Zj -2 0 14 0 0 1
▪ Since all the Cj-Zj values are not greater than or equal to zero, the
solution is not optimal
▪ Entering variable – x1 and leaving variable s1
23
KKR, GEC Tcr 9/14/2021
Simplex Method – Minimization Problem
Iteration 2
Cj 2 -3 6 0 0 0
CBi Basic Solution Ratio
Variabl x1 x2 x3 s1 s2 s3
e
2 x1 1 0 14/5 3/5 0 1/5 31/5
Since all the Cj-Zj values are greater than or equal to zero, the
solution is optimal
Optimal value of x1 = 31/5, x2=58/5, x3=0 & Z=-112/5
[Check the optimal value of Z by substituting the values of variables in the objective function]
24
KKR, GEC Tcr 9/14/2021
Special Cases in LPP
1. Infeasible Solution (Infeasibility)
Infeasible solution happens when the constraints have contradictory
nature.
Therefore, it is not possible to find a solution which can satisfy all
constraints.
E.g. Max. Z = 5 x1 + 8 x2
Subject to constraints
4 x1 + 8 x2 ≥ 40
4 x1 + 6 x2 ≤ 24
4 x1 + 8 x2 ≥ 40
x1, x2 ≥ 0
4 x1 + 6 x2 ≤ 24
In Simplex method, after a particular iteration, all the Cj-Zj values are negative or zero for a
max. problem, but, the solution are negative or infinite is indication of infeasibility
25 KKR, GEC Tcr 9/14/2021
Special Cass in LPP…
R1 M A1 2 4 6 -1 0 1 0 24 6
R2 M A2 3 9 6 0 -1 0 1 30 10/3
Zj 7 15 20 -3 -1/3 - - 82
Δj= Cj - Zj 0 0 0 3 1/3 - -
Since all the Cj-Zj values are greater than or equal to zero, the
solution is optimal.
Solution: x1 = 0, x2 = 6/5, x3 = 16/5 and Z = 82
33 KKR, GEC Tcr [Z=7x1+15x2+20x3 = 7 (0)+15(6/5)+20(16/5) = 82] 9/14/2021
Duality - Concept
Every linear programming problem has a mirror image associated
with it.
If the original problem is maximization, the mirror image will be
minimization and vice versa.
The original problem is called 'primal' and the mirror image is
called 'dual'.
Features of dual;
Dual of the dual is primal
If either the primal or dual has a solution, then the other also has a
solution.
If any of the primal or dual is infeasible, then the other has an
unbounded solution.
The optimal solution of both the primal and dual is equal.
Cj 20 10 0 0 M M
CBi Basic Solution Ratio
y1 y2 s1 s2 A1 A2
Variable
M A1 5 1 -1 0 1 0 6 6/5
M A2 2 2 0 -1 0 1 8 4
Zj 7M 3M -M -M M M 14M
20- 10-
M M 0 0
41 Cj - Zj 7M 3M
KKR, GEC Tcr 9/14/2021
Dual Simplex Method…
Iteration 1
Cj 20 10 0 0 M M
CBi Basic Solution Ratio
y1 y2 s1 s2 A1 A2
Variable
Cj 20 10 0 0 M M
CBi Basic Solution Ratio
y1 y2 s1 s2 A1 A2
Variable
Zj 20 10 -5/2 -30/8 45
Cj - Zj 0 0 5/2 30/8
Cj 4800 7200 0 0
CBi Basic Solution Ratio
y1 y2 s1 s2
Variable
0 s1 20 80 1 0 2 1/40
0 s2 50 500 0 1 24 6/125
Zj 0 0 0 0 0
Cj - Zj 4800 7200 0 0
Yet again, the lowest positive ratio is for the first row. So, the
solution is unbounded for primal.
0 S1 4 2 3 1 0 0 6 2
0 S2 5 1 4 0 1 0 4 1
0 s3 3 6 2 0 0 1 3 3/2
Zj 0 0 0 0 0 0 0
40 50 60 0 0 0
Cj - Zj
Zj 50 10 60 0 10 0 40
-10 40 0 0 -10 0
Cj - Zj
0 s3 0 0 4 0 0 1 100