Linear Programming
Linear Programming
Linear Programming
Linear Programming *349*
Computational Methods
*350* Solution Manual to Basic Mathematics
Linear Programming
Linear Programming *351*
The initial simplex tableau with the coefficients of the objective function in the last row is,
B.V. x y r s U RHS Ratio
r 1 1 0 0 21 21/3 = 7
s 2 3 0 1 0 24 24/3 = 8
– 25 –45 0 0 1 0 7<8
Here, the last row contain negative entry. So, U = 0 is not the optimal solution.
solution Since – 4 is the
most negative entry,, the second column is pivot column and first row is pivot row hence 3 is
pivot element.
R1
Applying R1 , we get
3
B.V. x y r s U RHS Ratio
y 1/3 1 1/3 0 0 7 ……..
s 2 3 0 1 0 24 ……..
– 25 –45 0 0 1 0 ……
Applying R2 R2 – 3R1 and R3 R3 + 45R1, we get
B.V. x y r s U RHS Ratio
y 1/3 1 1/3 0 0 7 7/1/3 = 21
s 0 –1 1 0 3 3/1 = 3
– 10 0 15 0 1 315 3 < 21
Here, the last row still contains negative value – 10. So, the first columnn is pivot column and
second row is pivot row hence 1 is pivot element.
Applying R1 R1 – 1/3R2 and R3 R3 + 10R2, we get
B.V. x y r s U RHS Ratio
y 0 1 2/3 –1/3 0 6 ……….
x 1 0 -1 1 0 3 ……….
0 0 5 10 1 345 …….
Since all entries in the last row are non
non-negative,
negative, so the solution is optimal.
max. U = 345 when x = 3, y = 6 such that
U = 25x + 45y 345 = 253
3 +456
345 = 345 (true)
f) Maximize P = 8x + 10y s.t. x + 2y ≤ 30, 2x + 2y ≤ 40,
Soln: Let r and s be non-negative
negative slack variable
variables, then the standard form of given LPP is
x + 2y + r.1 + s.0 + p.0 = 30
2x + 2y + r.0 + s.1 + p.0 = 40
– 8x – 10y + r.0 + s.0 + p.1 = 0
The initial simplex tableau with the coefficients of the objective function in the last row is,
B.V. x y r s P RHS Ratio
r 1 1 0 0 30 30/2 = 15
s 2 2 0 1 0 40 40/2 = 20
–8 –10 0 0 1 0 15 < 20
Computational Methods
*352* Solution Manual to Basic Mathematics
Here, the last row contain negative entry. So, P = 0 is not the optimal solution.
solution Since – 10 is the
most negative entry, the second column is pivot column and first row is pivot row hence 2 is
pivot element.
R1
Applying R1 , we get
2
B.V. x y r s P RHS Ratio
y 1/2 1 1/2 0 0 15 ……..
s 2 2 0 1 0 40 ……..
–8 –10 0 0 1 0 ……
Applying R2 R2 – 2R1 and R3 R3 + 10R1, we get
B.V. x y r s P RHS Ratio
y 1/2 1 1/2 0 0 15 15/1/2 =
30
s 0 –1 1 0 10 10/1 = 10
–3 0 5 0 1 150 10 < 30
Here, the last row still contains negative value – 3. So, the first column is pivot column and
second row is pivot row hence 1 is pivot element.
Applying R1 R1 – 1/2R2 and R3 R3 + 3R2, we get
B.V. x y r s P RHS Ratio
y 0 1 1 –1/2 0 10 ……….
s 1 0 -1 1 0 10 ……….
0 0 2 3 1 180 …….
Since all entries in the last row are non
non-negative,
negative, so the solution is optimal.
max. P = 180 when x = 10, y = 10 such that
P = 8x + 10y 180 = 810 +1010 180 = 180 (true)
g) Maximize F = 5x1 + 3x2 s.t. 2x1 + x2 ≤ 40, x1 + 2x2 ≤ 50,
Soln: Let r and s be non-negative
negative slack variable
variables, then the standard form of given LPP is
2x1 + x2 + r.1 + s.0 + F.0 = 40
x1 + 2x2 + r.0 + s.1 + F.0 = 50
– 5x1 – 3x2 + r.0 + s.0 + F.1 = 0
The initial simplex tableau with the coefficients of the objective function in the last row is,
B.V. x1 x2 r s F RHS Ratio
R 1 1 0 0 40 40/2 = 20
S 1 2 0 1 0 50 50/1 = 50
–5 –3 0 0 1 0 20 < 50
Here, the last row contain negative entry. So, F = 0 is not the optimal solution.
solution Since – 5 is the
most negative entry in the last row, the first column is pivot column and first row is pivot row
hence 2 is pivot element.
Linear Programming
Linear Programming *353*
R1
Applying R1 , we get
2
B.V. x1 x2 r s F RHS Ratio
x1 1 1/2 1/2 0 0 20 ……..
S 1 2 0 1 0 50 ……..
–5 –3 0 0 1 0 ……
Applying R2 R2 – R1 and R3 R3 + 5R1, we get
B.V. x1 x2 r s F RHS Ratio
x1 1 1/2 1/2 0 0 20 20/1/2 = 40
S 0 3/2 -1/2 1 0 30 30/3/2 = 20
0 -1/2 5/2 0 1 100 20 < 40
Here, the last row still contains negative value – 1/2. So, the second column is pivot column
and second row is pivot row hence 3/2 is pivot element.
Applying R2 R2 2/3, we get
B.V. x1 x2 r s F RHS Ratio
x1 1 1/2 1/2 0 0 20 ……….
x2 0 1 -1/3 2/3 0 20 ……….
0 -1/2 5/2 0 1 100 …….
Applying R1 R1 – 1/2
1/2 R1 and R3 R3 + 1/2 R2, we get
B.V. x1 x2 r s F RHS Ratio
x1 1 0 2/3 -1/3 0 10 ……….
x2 0 1 -1/3 2/3 0 20 ……….
0 0 7/3 1/3 1 110 …….
Since all entries in the last row are non
non-negative,
negative, so the solution is optimal.
max. F = 110 when x1 = 10, x2 = 20 such that
F = 5x1+3x2 110 = 510 +320 110 = 110 (true)
h) Maximize C = 7x + 5y s.t. 4x + 3y ≤ 48, 2x + y ≤ 20,
Soln: Let r and s be non-negative
negative slack variable
variables, then the standard form of given LPP is
4x + 3y + r.1 + s.0 + C.0 = 48
2x + y + r.0 + s.1 + C.0 = 20
– 7x – 5y + r.0 + s.0 + C.1 = 0
The initial
itial simplex tableau with the coefficients of the objective function in the last row is,
B.V. x y r s C RHS Ratio
r 4 3 1 0 0 48 48/4 = 12
s 1 0 1 0 20 20/2 = 10
–7 –5 0 0 1 0 10 < 12
Here, the last row contain negative entry. So, C = 0 is not the optimal solution.
solution Since – 7 is the
most negative entry in the last row
row, the first column is pivot column and second row is pivot
row hence 2 is pivot element.
R2
Applying R2 , we get
2
B.V. x y r s C RHS Ratio
r 4 3 1 0 0 48 ……..
y 1 1/2 0 1/2 0 10 ……..
–7 –5 0 0 1 0 ……
Computational Methods
*354* Solution Manual to Basic Mathematics
Linear Programming
Linear Programming *355*
R2
Applying R2 , we get
2
B.V. x y R s Z RHS Ratio
x 1 1/2 ½ 0 0 10 ……..
y 0 1 -1/4 1/2 0 2 ……..
0 -5/2 5/2 0 1 50 ……
Again, applying R1 R1 – 1/2R2 and R3 R3 + 5/2R2, we get
B.V. x y R s Z RHS Ratio
x 1 0 -3/4 -1/4 0 9 ……….
y 0 1 -1/2 1/2 0 2 ……….
0 0 5/4 5/4 1 55 …….
Since all entries in the last row are non
non-negative,
negative, so the solution is optimal.
Max. Z = 555 when x = 9, y = 2 such that
Z = 5x +5y 55 = 559 +52 55 = 55 (true)
Computational Methods
*356* Solution Manual to Basic Mathematics
3
Applying R1 × R1, we get
5
B.V. x1 x2 r S Z RHS Ratio
x2 2 1 1 0 0 13 ……..
3 3 3
x1 1 0 2 3 0 2 ………..
-
5 5
-1 0 7 0 1 91 ………
3 3 3
2 1
Applying R1 R1 - R and R3 R3 + R2, we get
3 2 3
B.V. x1 x2 r s Z RHS
x2 0 1 3/5 - 2/5 0 3
x1 1 0 - 2/5 3/5 0 2
0 0 11/5 1/5 1 31
Since all entries in the last row are non – negative, the solution of the given LP problem is
optimal.
Max. Z = 31 when x1 = 2 and x2 = 3 such that
Z = 5x1 + 7x2 31 = 5 2 + 73 31 = 31 (true)
k) Maximize g = 15x + 12y s.t. 2x + 3y ≤ 21, 3x + 2y ≤ 24,
Soln: Let r and s be non-negative slack variables, then the standard form of given LPP is
2x + 3y + r.1 + s.0 + g.0 = 20
2x + 3y + r.0 + s.1 + g.0 = 24
– 15x – 12y + r.0 + s.0 + g.1 = 0
The initial simplex tableau with the coefficients of the objective function in the last row is,
B.V. x y r s g RHS Ratio
r 2 3 1 0 0 21 21/2 = 10.5
s 3 2 0 1 0 24 24/3 = 8
– 15 – 12 0 0 1 0 8 < 10.5
Here, the last row contain negative entry. So, g = 0 is not the optimal solution. Since – 15 is the
most negative entry in the last row, the first column is pivot column and second row is pivot
row hence 2 is pivot element.
R2
Applying R2 , we get
3
B.V. x y r s g RHS Ratio
r 2 3 1 0 0 21 ……..
x 1 2/3 0 1/3 0 8 ……..
– 15 – 12 0 0 1 0 ……
Applying R1 R1 – 2R2 and R3 R3 + 15R2, we get
B.V. x y r s g RHS Ratio
r 0 5/3 1 -2/3 0 5 5/5/3 = 3
x 1 2/3 0 1/3 0 8 8/2/3 = 12
0 –2 0 5 1 120 3 < 12
Here, the last row still contains negative value – 2. So, the second column is pivot column and
first row is the pivot row hence 5/3 is pivot element.
Linear Programming
Linear Programming *357*
3
Applying R1 R1, we get
5
B.V. X y R s g RHS Ratio
y 0 1 3/5 -2/5 0 3 ……..
x 1 2/3 0 1/3 0 8 ……..
0 –2 0 5 1 120 ……
Applying R2 R2 – 2/3R1 and R3 R3 + 2R1, we get
B.V. g y R s g RHS Ratio
y 0 1 3/5 -2/5 0 3 ……….
x 1 0 2/5 3/5 0 6 ……….
0 0 6/5 21/5 1 126 …….
Since all entries in the last row are non-negative, so the solution is optimal.
Max. g = 126 when x = 6, y = 3 such that
g= 15x + 12y 126 = 15 6 + 12 3 126 = 126 (true)
l) Maximize z = 10x1 + 12x2 s.t. 3x1 + x2 ≤ 12, x1 + 2x2 ≤ 14,
Soln: Let r and s be non-negative slack variables, then the standard form of given LPP is
3x1 + x2 + 1.r + 0.s + 0.z = 12
x1 + 2x2 + 0.r + 0.s + 0.z = 14
- 10x1 - 12x2 + 0.r + 0.s + 1.z = 0
The initial simplex tableau is given below:
B.V. x1 x2 R s z RHS Ratio
r 3 1 1 0 0 12 12/1 = 12
s 1 2 0 1 0 14 14/2 = 7
– 10 – 12 0 0 1 0 7 < 12
Here, the last row contain negative entry. So, z = 0 is not the optimal solution. Since – 12 is the
most negative entry in the last row, the second column is pivot column and second row is pivot
row hence 2 is pivot element.
R2
Applying R2 , we get
2
B.V. x1 x2 R s z RHS Ratio
r 3 1 1 0 0 12 ………
x2 1/2 1 0 1/2 0 7 ………
– 10 – 12 0 0 1 0 ………
Applying R1 R1 – R2 and R3 R3 + 12R2, we get
B.V. x1 x2 R s z RHS Ratio
5
r 5/2 0 1 –1/2 0 5 =2
5/2
7
x2 1/2 1 0 1/2 0 7 = 14
1/2
–4 0 0 6 1 84 2 < 14
Here, the last row still contains negative value – 4. So, the first column is pivot column and
first row is the pivot row hence 5/2 is pivot element.
2
Applying R2 × R2, we get
5
B.V. x1 x2 R S z RHS Ratio
x1 1 0 2/5 –1/5 0 2 ……..
x2 1/2 1 0 1/2 0 7 ………..
–4 0 0 6 1 84 ………
Computational Methods
*358* Solution Manual to Basic Mathematics
2 1 8
AT = 6 6 36
18 12 0
3 1 30
AT = 1 3 20
15 12 0
Linear Programming
Linear Programming *359*
2 5 20
AT = 2 1 12
20 5 0
Computational Methods
*360* Solution Manual to Basic Mathematics
R1: R1 – 2R2, R3 : R3 + 20 R2
Basic variables u v x y z* R.H.S.
x 0 4 1 –1 0 8
1 1
u 1 0 0 6
2 2
0 5 0 10 1 120
Since all entries in the last row are non-negative, the solution is optimal
Max. Z* = 120 at u = 6, v = 0 Min. Z = 120 when x = 0, y = 10
b) Minimize Z = 24x + 6y s.t.
3x + y 40
4x + 2y 25
x, y 0
The augmented matrix form of given LPP is
3 1 40
A= 4 2 25
24 6 0
3 4 24
AT = 1 2 6
40 25 0
Linear Programming
Linear Programming *361*
2 3 6
AT = 1 –1 20
6 9 0
Computational Methods
*362* Solution Manual to Basic Mathematics
5 1
y 3 0 1 0 22
3
0 0 3 0 1 18
Since all entries in the last row are non-negative, the solution is optimal
Max.P* = 18 at u = 0, v = 2 Min P = 18 at x = 3, y = 0
d) Minimize C = 8x + 10y s.t.
x + 2y 3
2x + 2y 4
x, y 0
The augmented matrix of given LPP is
1 2 3
A= 2 2 4
8 10 0
1 2 8
AT = 2 2 10
3 4 0
Linear Programming
Linear Programming *363*
1 1 4
v 1 0 0 4 8
2 2 1/ 2
2
y 1 0 -1 1 0 2 2
1
-1 0 2 0 1 16
Since all entries in the last row are not non-negative, the solution is not optimal. Again, the most
negative entry is last row is – 1 u-column is pivot column and the least ratio dividing R.H.S. by
2
pivot column element is row second is pivot row. Hence 1 is the pivot entry.
1
1
R1: R1 - R2, R3 : R3 + R2
2
Computational Methods
*364* Solution Manual to Basic Mathematics
1
v 0 1 1 - 0 3
2
u 1 0 -1 1 0 2
0 0 1 1 1 18
Max.C* = 18 at u = 2, v = 3 Min. C = 18 at x = 1, y = 1
e) Minimize U = 3x1 + x2s.t.
2x1 + x2 14
x1 – x2 4
x1, x2 0
The augmented matrix form of given LPP is
2 1 14 2 1 3
A= 1 –1 4 AT = 1 –1 1
3 1 0 14 4 0
The dual of given LPP is
Maximize U* = 14u + 4v s.t.
2u + v 3
u – v 1
u, v 0
Introducing the non-negative slack variables x1 and x2, the LP problem is
2u + v + x1 = 3
u - v + x2 = 1
14u + 4v = U*
i.e. 2u + v + x1 + 0.x2 + 0.U* = 3
u - v + 0.x1 + x2 + 0.U* = 1
– 14u - 4v + 0.x1 + 0.x2 + U* = 0
The initial simplex table of the problem is given by
Basic variables u v x1 x2 U* R.H.S. Ratio
3
x1 2 1 1 0 0 3
2
1
x2 1 -1 0 1 0 1
1
– 14 -4 0 0 1 0
The most negative entry is last row is – 14 u-column is pivot column and least ratio dividing
1
R.H.S. by pivot column element is row second is pivot row. Hence 1 is the pivot entry.
1
1
x1 0 3 1 -2 0 1
3
1
u 1 -1 0 1 0 1
1
0 -18 0 14 1 14
Linear Programming
Linear Programming *365*
Since all entries in the last row are not non-negative, the solution is not optimal. Again, the most
negative entry is last row is – 18 v-column is pivot column and only the positive ratio dividing
1
R.H.S. by pivot column element is row first is pivot row. Hence 3 is the pivot entry.
3
1
R1: R1
3
Basic variables u v x1 x2 U* R.H.S.
1 2 1
v 0 1 - 0
3 3 3
u 1 -1 0 1 0 1
0 -18 0 14 1 14
Operating R2: R2 + R1 R3: R3 + 18R1
Basic variables u v x1 x2 U* R.H.S.
1 1 1
v 0 1 - 0
3 3 3
1 1 4
u 1 0 0
3 3 3
0 0 6 2 1 20
4 1
Max.U* = 20 at u = , v = Min. U = 20 at x = 6, y = 2
3 3
f) Minimize Z = 4x + 8y s.t.
2x + y 6
x + 2y 6
x, y 0
The augmented matrix form of given LPP is
2 1 6 2 1 4
A= 1 2 6 AT = 1 2 8
4 8 0 6 6 0
The dual of given LPP is
Maximize Z* = 6u + 6v s.t.
2u + v 4
u + 2v 8
u, v 0
Introducing the non-negative slack variables x and y, the LP problem is
2u + v + x = 4
u + 2v + y = 8
6u + 6v = Z*
i.e. 2u + v + x + 0.y + 0.Z* = 4
u + 2v + 0.x + y + 0.Z* = 8
– 6u – 6v + 0.x + 0.y + Z* = 0
The initial simplex table of the problem is given by
Basic variables u v x y Z* R.H.S. Ratio
4
x 2 1 1 0 0 4
2
8
y 1 2 0 1 0 8
1
-6 -6 0 0 1 0
Computational Methods
*366* Solution Manual to Basic Mathematics
The negative entry is last row are both – 6. So, let us take u-column is pivot column and least ratio
4
dividing R.H.S. by pivot column elements is row first is pivot row. Hence 2 is the pivot entry.
2
1
R1: R1,
2
Basic variables u v x y Z* R.H.S.
1 1
u 1 0 0 2
2 2
y 1 2 0 1 0 8
-6 -6 0 0 1 0
R2: R2 – R1, R3: R3 + 6R1
Basic variables u v x y Z* R.H.S.
1 1 2
u 1 0 0 2 =4
2 2 1/ 2
3 1 6
y 0 - 1 0 6 =4
2 2 3/ 2
0 -3 3 0 1 12
Since all entries in the last row are not non-negative, the solution is not optimal. Again, the most
negative entry is last row is – 3 v-column is pivot column and the ratios dividing R.H.S. by pivot
3
column element are both 4 row second shall be now the pivot row. Hence is the pivot entry.
2
2
R2: R2
3
Basic variables u v x y Z* R.H.S.
1 1
u 1 0 0 2
2 2
1 2
v 0 1 0 4
3 3
0 -3 3 0 1 12
1
R1: R1– R2, R3: R3 + 3R2
2
Basic variables u v x y Z* R.H.S.
2 1
u 1 0 0 0
3 3
1 2
v 0 1 0 4
3 3
0 0 2 2 1 24
Max.C* = 24 at u = 0, v = 4 Min. C = 24 at x = 2, y = 2
g) Minimize U = 24x + 16y s.t.
2x + y 10
8x + 8y 64
x 0, y 0
The augmented matrix form of given LPP is
2 1 10 2 8 24
A= 8 8 64 AT = 1 8 16
24 16 0 10 64 0
Linear Programming
Linear Programming *367*
Computational Methods
*368* Solution Manual to Basic Mathematics
1
R2: R2,
3
Linear Programming
Linear Programming *369*
Computational Methods
*370* Solution Manual to Basic Mathematics
Linear Programming
Linear Programming *371*
b) A farmer can obtain two types of fertilizers. A bag of fertilizer M cost Rs. 50 and contains
6 kg of Nitrogen and 3kg of Potassium. A bag of fertilizer N costs Rs. 40 and contains 3 kg
of Nitrogen and 3kg of Potassium. If a farmer wants to add at least 30 kg of Nitrogen and
at least 18 kg of Potassium to each plot of land, how many bags of each types of fertilizer
should be used to minimize the cost of fertilizing a plot of land? Also find the minimum
cost.
Let x and y are no. of bags of fertilizer M and N.
Since each bag of fertilizer M cost Rs. 50 and fertilizer N cost Rs. 40, the cost function C = 50x
+ 40y
Each bag of fertilizer M has 6 kg Nitrogen and fertilizer N has 3kg Nitrogen and at least 30 kg
of Nitrogen is to add then we have
6x + 3y 30
2x + y 10
Similarly, each bag of fertilizer M has 3 kg potassium and fertilizer N has 3 kg potassium and
at least 18 kg of potassium is to add, then
3x + 3y 18
x+y6
The LPP for given problem is
Minimize C = 50x + 40y s.t.
2x + y 10
x+y6
x, y 0.
Now, we solve the problem using simplex. The augmented matrix form of given LPP is
2 1 10 2 1 50
A= 1 1 6 AT = 1 1 40
50 40 0 10 6 0
The dual of given LPP is
Maximize C* = 10u + 6v s.t.
2u + v 50
u + v 40
u, v 0
Introducing non-negative slack variables x and y we have
2u + v + x = 50
u + v + y = 40
– 10u –6v = C*
i.e. 2u + v + x + 0.y + 0.C* = 50
u + v + 0.x + y + 0.C* = 40
– 10u – 6v + 0.x + 0.y + C* = 0
The initial simplex table to solve the problem is
Basic variable u v x y C* R.H.S. Ratio
x 2 1 1 0 0 50 50/2 = 25
y 1 1 0 1 0 40 40/1 = 40
–10 –6 0 0 1 0
The most negative in last raw is – 10u- column is pivot column. The least ratio dividing
R.H.S. by pivot column element is 50/2= 25 row second is pivot element
R1: 1/2R1
Computational Methods
*372* Solution Manual to Basic Mathematics
Linear Programming