Example 1 Max
Example 1 Max
Solution
Step 1: Introducing non-negative slack variables s1, s2 and s3 to convert the given LP problem into its standard
form:
Maximize Z = 3x1 + 5 x2 + 4 x3 + 0s1 + 0s2 + 0s3 subject
to the constraints
2 x1 + 3x2 + s1 = 8,
2 x2 + 5 x3 + s2 = 10,
3 x1 + 2 x2 + 4 x3 + s3 = 15 and
x1 , x2 , x3 , s1 , s2 , s3 0
0 s1 8 2 3 0 1 0 0 8/3 →
0 s2 10 0 2 5 0 1 0 10/2
0 s3 15 3 2 4 0 0 1 15/2
Zj 0 0 0 0 0 0 0
Cj – Zj 3 5 4 0 0 0
↑
Since all cj – zj ≥ 0 ( j = 1, 2, 3), the current solution is not optimal. Variable x2 is chosen to enter into
the basis because c2 – z2 = 5 is the largest positive number in the x2-column, where all elements are
positive. This means that for every unit of variable x2, the objective function will increase in value by
5. The x2 column is the key column.
The variable that is to leave the basis is determined by dividing the values in the bi -column by the
corresponding elements in the key column as shown in the table above. Since the ratio, 8/3 is
minimum in row 1, the basic variable s1 is chosen to leave the solution (basis).
Since the key element enclosed in the circle in the table above is not 1, divide all elements of the key
row by 3 in order to obtain new values of the elements in this row. The new values of the elements in
the remaining rows for the new can be obtained by performing the following elementary row
operations on all rows so that all elements except the key element 1 in the key column are zero.
R1 (new) → R1 (old) ÷ 3 (key element)
→ (8/3, 2/3, 3/3, 0/3, 1/3, 0/3, 0/3) = (8/3, 2/3, 1, 0, 1/3, 0, 0)
R2 (new) → R2 (old) – 2R1 (new) R3 (new) → R3 (old) – 2R1 (new)
10 – 2 × 8/3 = 14/3 15 – 2 × 8/3 = 29/3
0 – 2 × 2/3 = –4/3 3 – 2 × 2/3 = 5/3
2–2×1=0 2–2×1=0
5–2×0=5 4–2×0=4
0 – 2 × 1/3 = – 2/3 0 – 2 × 1/3 = –2/3
1–2×0=1 0–2×0=0
0–2×0=0 1–2×0=1
Page 1 of 3
1st iteration
Cj 3 5 4 0 0 0 Min Ratio
Cb Base
bi x1 x2 x3 s1 s2 s3
5 x2 8/3 2/3 1 0 1/3 0 0 –
Cj – Zj – 1/3 0 4 – 5/3 0 0
↑
The improved basic feasible solution can be read from the table above as: x2 = 8/3, s2 = 14/3, s3 = 29/3 and x1 = x3
= s1 = 0. The improved value of the objective function becomes:
Z = (Basic variable coefficients, cb ) × (Basic variable values, bi )
= 5 (8/3) + 0 (14/3) + 0 (29/3) = 40/3
Once again, calculate values of cj – zj to check whether the solution shown above is optimal or not. Since c3 – z3
> 0, the current solution is not optimal.
Repeat Steps 3 to 5. The 2nd iteration is obtained by performing the following row operations to enter variable
x3 into the basis and to drive out s2 from the basis.
R2 (new) = R2 (old) ÷ 5 (key element) = (14/15, – 4/15, 0, 1, – 2/15, 1/5, 0)
R3 (new) → R3 (old) – 4 R3 (new)
29/3 – 4 ×14/15 = 89/15
5/3 – 4 × – 4/15 = 41/15
0 – 4 ×0 = 0
4 – 4 ×1 = 0
– 2/3 – 4 × – 2/15 = – 2/15
0 – 4 ×1/5 = – 4/5
1 – 4 ×0 = 0
The improved basic feasible solution is shown in the table below
2nd iteration
Cj 3 5 4 0 0 0 Min Ratio
Cb Base
bi x1 x2 x3 s1 s2 s3
In the table above(2nd iteration), since c1 – z1 is still a positive value, the current solution is not
optimal. Thus, the variable x1 enters the basis and s3 leaves the basis. To get the 3rd iteration, perform
the following row operations in the same manner as discussed earlier.
R3 ( new) → R3 ( old ) 15 / 41 ( key element )
→ ( 89 / 15 15 / 41, 41 / 15 15 / 41, 0 15 / 41, 0 15 / 41, –2 / 15 15 / 41, – 4 / 5 15 / 41, 1 15 / 41)
→ (89/41, 1, 0, 0, – 2/41, – 12/41, 15/41)
R1(new) → R1(old) – (2/3) R3 (new) R2(new) → R2(old)+ (4/15) R3(new)
8/3 – 2/3 ×89/3 =50/41 14/15 + 4/15 ×89/41 =62/41
2/3 – 2/3 ×1 =0 – 4/15 + 4/15 ×1 =0
1 – 2/3 ×0 =1 0 + 4/15 ×0 =0
0 – 2/3 ×0 =0 1 + 4/15 ×0 =1
1/3 – 2/3 × – 2/41 =15/41 – 2/15 + 4/15 × –2/41 =– 6/41
0 – 2/3 × – 2/41 =8/41 1/5 + 4/15 × – 12/41 =5/41
0 – 2/3 × 15/41 = – 10/41 0 + 4/15 ×41 =4/41
Page 2 of 3
3rd iteration
Cj 3 5 4 0 0 0
Cb Base
bi x1 x2 x3 s1 s2 s3
In the table above, all cj – zj < 0 for non-basic variables. Therefore, the optimal solution is reached
with, x1 = 89/41, x2 = 50/41, x3 = 62/41 and the optimal value of Z = 765/41.
Page 3 of 3