In: Advanced Math
Let x1 be the number of cars restored per day, and x2 be the number of trucks restored per day. The goal is to maximize 3000x+2000y subject to
MAX Z = 3000x1 + 2000x2
subject to
50x1 + 50x2 <= 2500
40x1 + 60x2 <= 2400
and x1,x2 >= 0
The problem is converted to canonical form by adding slack,
surplus and artificial variables as appropiate
1. As the constraint-1 is of type '≤' we should add slack variable
S1
2. As the constraint-2 is of type '≤' we should add slack variable
S2
After introducing slack variables
MAX Z = 3000x1 + 2000x2 + 0S1 + 0S2
subject to
50x1 + 50x2 + S1 = 2500
40x1 + 60x2 + S2 = 2400
and x1,x2,S1,S2 >= 0
Iteration-1 | Cj | 3000 | 2000 | 0 | 0 | ||
B | CB | XB | x1 | x2 | S1 | S2 | MinRatio XBx1 |
S1 | 0 | 2500 | (50) | 50 | 1 | 0 | 250050=50→ |
S2 | 0 | 2400 | 40 | 60 | 0 | 1 | 240040=60 |
Z=0 | Zj | 0 | 0 | 0 | 0 | ||
Cj-Zj | 3000↑ | 2000 | 0 | 0 |
Positive maximum Cj-Zj is 3000
and its column index is 1. So, the entering variable is
x1.
Minimum ratio is 50 and its row index is 1. So, the leaving basis
variable is S1.
∴ The pivot element is 50.
Entering =x1, Departing =S1, Key Element
=50
R1(new)=R1(old)÷50
R2(new)=R2(old) - 40R1(new)
Iteration-2 | Cj | 3000 | 2000 | 0 | 0 | ||
B | CB | XB | x1 | x2 | S1 | S2 | MinRatio |
x1 | 3000 | 50 | 1 | 1 | 150 | 0 | |
S2 | 0 | 400 | 0 | 20 | -45 | 1 | |
Z=150000 | Zj | 3000 | 3000 | 60 | 0 | ||
Cj-Zj | 0 | -1000 | -60 | 0 |
Since all Cj-Zj≤0
Hence, integer optimal solution is arrived with value of variables
as :
x1=50,x2=0
Max Z=150000