2. Example - II
Solve LP Problem using Simplex method
Maximize Z = 3 x1 + 5 x2 + 4 x3
Subject to the constraints:
(i) 2 x1 + 3 x2 ≤ 8 (ii) 2 x2 + 5 x3 ≤ 10
(iii) 3 x1 + 2 x2 + 4 x3 ≤ 15
Where x1 , x2 , x3 ≥ 0
3. Important table
Types of Constraints
Extra Variable
Needed
Coefficient of Additional variables in the
Objective Function
Presence of
additional variables
in the initial
solutionMax Z Min Z
Less than or equal to
(≤)
A slack variable is
added
0 0 Yes
Greater than or equal
to (≥)
A surplus variable is
subtracted, and an
artificial variable is
added
0
-M
0
+M
No
Yes
Equal to (=)
Only an artificial
variable is added
-M +M Yes
4. 1. Formulation of mathematical model
Type of constraints = less than or equal to (≤)
Therefore, we should add slack variable to the
constraints and objective function as well.
But the coefficients of slack variables must be zeros
in the Objective function.
5. 1. Formulation of mathematical model
Objective function:
Maximize Z = 3 x1 + 5 x2 + 4 x3 +0.S1 + 0.S2 + 0.S3
Subject to constraints:
2 x1 + 3 x2 + 0.x3 + S1 = 8
0.x1 + 2 x2 + 5 x3 + S2 = 10
3 x1 + 2 x2 + 4 x3 + S3 = 15
x1 , x2 , x3 ≥ 0
Adding slack variables
to the constraints
converts the linear
inequalities to the
equations.
12. Test for Optimality : Maximization
For Maximization Problem:
If all Cj – Zj ≤ 0 ; then the LP problem is said to be
reached Optimality.
13. CB
Cj 3 5 4 0 0 0
Solution
Minimum
RatioBasic
Variables
X1 X2 X3 S1 S2 S3
0 S1 2 3 0 1 0 0 8
0 S2 0 2 5 0 1 0 10
0 S3 3 2 4 0 0 1 15
Zj 0 0 0 0 0 0 0
Cj - Zj 3 5 4 0 0 0
Since all Cj - Zj ≥ 0, select biggest positive number in that row and mark the
corresponding column as Key Column
14. Find the Minimum Ratio
CB
Cj 3 5 4 0 0 0
Solution
Minimum
RatioBasic
Variables
X1 X2 X3 S1 S2 S3
0 S1 2 3 0 1 0 0 8
0 S2 0 2 5 0 1 0 10
0 S3 3 2 4 0 0 1 15
Zj 0 0 0 0 0 0 0
Cj - Zj 3 5 4 0 0 0
Divide the elements in the solution column with the corresponding elements in the key column,
and find the minimum ratio. Mark the row corresponding to the minimum ratio.
66.2
3
8
5
2
10
5.7
2
15
Mark the Key element, it is the point of intersection of Key Row and Key element.
15. CB
Cj 3 5 4 0 0 0
Solution
Minimum
RatioBasic
Variables
X1 X2 X3 S1 S2 S3
2 3 0 1 0 0 8
0 S2 0 2 5 0 1 0 10
0 S3 3 2 4 0 0 1 15
Zj 0 0 0 0 0 0 0
Cj - Zj 3 5 4 0 0 0
2X5
Divide the elements in the key row with the key element.
21. Test for Optimality : Maximization
For Maximization Problem:
If all Cj – Zj ≤ 0 ; then the LP problem is said to be
reached Optimality.
22. CB
Cj 3 5 4 0 0 0
Solution
Minimum
RatioBasic
Variables
X1 X2 X3 S1 S2 S3
5 X2 2/3 1 0 1/3 0 0 8/3
0 S2 -4/3 0 5 -2/3 1 0 14/3
0 S3 5/3 0 4 -2/3 0 1 29/3
Zj 10/3 5 0 5/3 0 0
Cj - Zj -1/3 0 4 -5/3 0 0
Since all Cj - Zj ≥ 0, select biggest positive number in that row and mark the
corresponding column as Key Column
23. Divide the elements in the solution column with the corresponding elements in the key column,
and find the minimum ratio. Mark the row corresponding to the minimum ratio.
CB
Cj 3 5 4 0 0 0
Solution
Minimum
RatioBasic
Variables
X1 X2 X3 S1 S2 S3
5 X2 2/3 1 0 1/3 0 0 8/3
0 S2 -4/3 0 5 -2/3 1 0 14/3
0 S3 5/3 0 4 -2/3 0 1 29/3
Zj 10/3 5 0 5/3 0 0
Cj - Zj -1/3 0 4 -5/3 0 0
0
3
8
15
14
5
3
14
12
29
4
3
29
Mark the Key element, it is the point of intersection of Key Row and Key element.
24. Divide the elements in the key row with the key element.
CB
Cj 3 5 4 0 0 0
Solution
Minimum
RatioBasic
Variables
X1 X2 X3 S1 S2 S3
5 X2 2/3 1 0 1/3 0 0 8/3
-4/3 0 5 -2/3 1 0 14/3
0 S3 5/3 0 4 -2/3 0 1 29/3
Zj 10/3 5 0 5/3 0 0
Cj - Zj -1/3 0 4 -5/3 0 0
3X4
30. Test for Optimality : Maximization
For Maximization Problem:
If all Cj – Zj ≤ 0 ; then the LP problem is said to be
reached Optimality.
31. Since all Cj - Zj ≥ 0, select biggest positive number in that row and mark the
corresponding column as Key Column
CB
Cj 3 5 4 0 0 0
Solution
Minimum
RatioBasic
Variables
X1 X2 X3 S1 S2 S3
5 X2 2/3 1 0 1/3 0 0 8/3
4 X3 -4/15 0 1 -2/15 1/5 0 14/15
0 S3 41/15 0 0 2/15 -4/5 1 89/15
Zj 34/15 5 4 17/15 4/5 0
Cj - Zj 15
11 0 0 15
17
5
4 0
32. CB
Cj 3 5 4 0 0 0
Solution
Minimum
RatioBasic
Variables
X1 X2 X3 S1 S2 S3
5 X2 2/3 1 0 1/3 0 0 8/3
4 X3 -4/15 0 1 -2/15 1/5 0 14/15
0 S3 41/15 0 0 2/15 -4/5 1 89/15
Zj 34/15 5 4 17/15 4/5 0
Cj - Zj 15
11 0 0 15
17
5
4 0
Find the Minimum Ratio
Divide the elements in the solution column with the corresponding elements in the key column,
and find the minimum ratio. Mark the row corresponding to the minimum ratio.
4
3
2
3
8
4
14
15
4
15
14
17.2
15
41
15
89
Mark the Key element, it is the point of intersection of Key Row and Key element.
33. CB
Cj 3 5 4 0 0 0
Solution
Minimum
RatioBasic
Variables
X1 X2 X3 S1 S2 S3
5 X2 2/3 1 0 1/3 0 0 8/3
4 X3 -4/15 0 1 -2/15 1/5 0 14/15
41/15 0 0 2/15 -4/5 1 89/15
Zj 34/15 5 4 17/15 4/5 0
Cj - Zj 15
11 0 0 15
17
5
4 0
1X3
Divide the elements in the key row with the key element.