Linear Programming
Linear Programming
Linear Programming
Introduction
At the same time they have observed that this cost or profit is the linear
function of variables. The programming refers to the process of
determining a particular programme or plan of action.
Definition
Basically there are two different methods to solve the linear programming
problems namely graphical method and Simplex method.
If the number of variables are two one can solve the problem by either
graphical method or simplex method.
If the number of variables is more than two, one must use the simplex
method to solve the LPP.
In that case (No of variables > 2) we cannot represent all those variables on
a graph, so one must use simplex method.
PROPERTIES OF LINEAR PROGRAMMING MODEL
It is assumed that only one decision is required for the planning period.
Problem: A firm manufactures two types of products A and B and sells them
at a profit of Rs 2/- on type A and Rs 3/- on type B. Each product is
processed on two machines G and H. Product A requires 1 minute of
processing time on G and 2 minutes on H. Product B requires one minute
processing time on G and one minute on H. The machine G is available for
not more than 6 hours 40 minutes, while machine H is available for 10
hours during any working day. Formulate the problem as a linear
programming problem to maximize the profit
Solution
From the description of the problem one can understand that the objective is
to maximize the profit.
So one has to find out how many number of product A and product B items
to be produced to get the maximum profit.
As we don’t know the number of items of product A and Product B to be
produced, let us assume
Now the profit on one item of type A is Rs 2 and the number of items of type
A are x.
Similarly the profit on one item of type B is Rs 3 and the number of items of
type A are y.
Now the total profit on both Product A and B is = 2x + 3y, and it should be
maximized and let the total profit is Z
Maximize Z = 2x + 3y
Now with increase in the values of x and y the value of z or profit will goes
on increase
But there are the restrictions on the production time of machines G and H.
Let us see the restrictions now.
Number of items of type A produce are x and for each item processing time
required on machine G is 1 minute.
Number of items of type B produce are y and for each item processing time
required on machine G is 1 minute.
So 1𝑥 + 1𝑦 ≤ 400 or 𝑥 + 𝑦 ≤ 400
Similarly
So 2𝑥 + 𝑦 ≤ 600
At the same time one can produce the items but negative production is
meaning less and is not acceptable in OR.
Therefore 𝑥 ≥ 0, 𝑦 ≥ 0
Profit Rs 2 Rs 3
per Unit
𝑀𝑎𝑥 𝑍 = 2𝑥 + 3𝑦
𝑆𝑇 𝑥 + 𝑦 ≤ 400
2𝑥 + 𝑦 ≤ 600
𝑥, 𝑦 ≥ 0
A company produces two types of hats. Each type of the
first hat requires twice as much labor time as the second
type. If all hats are of the second type only, the company
can produce a total of 500 hats a day. The market limits
the daily first and second type to 150 and 250 hats.
Assuming that the profits per hat are Rs 8 for first type
and Rs 5 for second type. Formulate the problem.
Net profit = 8x + 5y
Based on time x = 2y
Max 𝑍 = 8𝑥 + 5𝑦
Subjected to
𝑥 ≤ 150
𝑦 ≤ 250
𝑥 = 2𝑦
𝑥, 𝑦 ≥ 0
A firm can produce 3 types of cloth A, B and C. Three kinds
of wool Red, Green and Blue are required for it. One unit
length of type A cloth requires 2 meters of red wool and 3
meters of blue wool. One unit length of type B cloth requires
3 meters of red wool, 2 meters of blue wool and 2 meters of
green wool. One unit of type C cloth needs 5 meters of green
wool and 4 meters of blue wool. There is 50 meters of red
wool, 80 meters of green wool and 60 meters of blue wool
available.It is assumed that the income obtained from one
unit length of type A cloth is Rs 3, of type B cloth is Rs 5 and
of type C cloth is Rs 4. Formulate the problem.
𝑀𝑎𝑥 𝑍 = 3𝑥 + 5𝑦 + 4𝑧
Subjected to
3𝑥 + 2𝑦 + 4𝑧 ≤ 60
0𝑥 + 2𝑦 + 5𝑧 ≤ 80
3𝑥 + 2𝑦 + 4𝑧 ≤ 60
𝑥, 𝑦, 𝑧 ≥ 0
Solve the following LPP
Max Z = 3x + 5y
Subjected to x + 2y ≤ 2000, x + y ≤ 1500, y ≤ 600 and x, y ≥ 0
As x and y are greater than or equal to zero, The solution space must be in the first
quadrant . Now go to the constraints
1st constraint is x + 2y ≤ 2000, The maximum limiting condition for this constraint
is
x + 2y = 2000
So the equation x + 2y = 2000 can be represented by a line joining the points (0,
1000) and (2000, 0)
Similarly the equation x + y = 1500, obtained from the second constraint can be
represented by the line joining the points (0, 1500) and (1500, 0)
In the same way by converting the in-equation given as the third constraint will be
converted into equation y = 600 and it can be represented by a horizontal line
passing through the point (0, 600) on y axis
3𝑥1 + 2𝑥2 ≥ 50
𝑥1 𝑎𝑛𝑑 𝑥2 ≥ 0
Solve the following LPP
Min Z = 1.5𝑥1 + 2.5 𝑥2 S.T 𝑥1 + 3𝑥2 ≥ 3, 𝑥1 + 𝑥2 ≥ 2, 𝑥1, 𝑥2 ≥ 0
𝐼𝑓 𝑥1 = 0, 3𝑥2 = 3 𝑎𝑛𝑑 𝑥2 = 1
𝐼𝑓 𝑥2 = 0, 𝑥1 = 3
𝐼𝑓 𝑥1 = 0, 𝑥2 = 2
𝐼𝑓 𝑥2 = 0, 𝑥1 = 2
𝑥1 − 𝑥2 = 1
If 𝑥1 = 0, 𝑥2 = −1 and if 𝑥2 = 0, 𝑥1 = 1
So the line joining the points (0, -1) and (1,0) represents the above
equation
𝑥1 + 𝑥2 = 3
If 𝑥1 = 0, 𝑥2 = 3 and if 𝑥2 = 0, 𝑥1 = 3
So the line joining the points (0, 3) and (3, 0) represents the above
equation
Represent the above lines on the graph
All the points on the line (a) satisfies the first equation and the points above the line
satisfies the first in equation or constraint
Similarly all the points on the line (b) satisfies the second equation and the points
above the line satisfies the second in equation or constraint
B
The problem is maximization type and there
is no limit for the upper boundary
𝑥1
Solve the following LPP 𝑴𝒂𝒙 𝒁 = 𝟑𝒙𝟏 − 𝟐𝒙𝟐 , ST 𝒙𝟏 + 𝒙𝟐 ≤ 𝟏, 𝟐𝒙𝟏 + 𝟐𝒙𝟐 ≥ 𝟒, 𝒙𝟏 , 𝒙𝟐 ≥ 𝟎
𝑥1 + 𝑥2 = 1
If 𝑥1 = 0, 𝑥2 = 1 and if 𝑥2 = 0, 𝑥1 = 1
So the line joining the points (0, 1) and (1,0) represents the above equation
2𝑥1 + 2𝑥2 = 4
If 𝑥1 = 0, 𝑥2 = 2 and if 𝑥2 = 0, 𝑥1 = 2
So the line joining the points (0, 2) and (2, 0) represents the above equation
All the points on the line CD satisfies the equation 2𝑥1 + 2𝑥2 = 4 and the points below
the line satisfies the in-equation 2𝑥1 + 2𝑥2 ≥4
B D 𝑥1
𝑀𝑎𝑥 𝑍 = 8000𝑥1 + 7000𝑥2
Subjected to 3𝑥1 + 𝑥2 ≤ 66 𝑥1 + 𝑥2 ≤45 𝑥1 ≤ 20 𝑥2 ≤ 40 𝑥1 , 𝑥2 ≥ 0
𝑀𝑎𝑥 𝑍 = 𝑥1 + 𝑥2
Subjected to 𝑥1 − 𝑥2 ≥ 0 −3𝑥1 + 𝑥2 ≥ 3 𝑥1 , 𝑥2 ≥ 0
Simplex Method
Algorithm
Step 1: Express the problem in standard form
➢ Convert the right hand side of the constraints into non-negative values.
➢ Convert the in- equations into equations by adding slack variables to the left hand
side of the constraints if the constraints are less than are equal to type. Subtract
the surplus variables from the left hand side of the constraints if the constraints
are greater than or equal to type.
➢ All the variables appear in the constraints should appear in the objective function.
So multiply the slack variables or surplus variables with zero and add it to the
objective function because there should not be any change in the objective
function due to slack or surplus variables.
➢ If the surplus variables are appears in the problem Artificial Variables should be
introduced (Discussed Later).
➢ As the minimum values of decision variables are zero, substitute zero in place of
decision variables and find out the values of slack variables. It becomes the IBFS.
Then form the simplex table.
Simplex Table
𝑐𝑗 𝑐1 𝑐2 𝑐3 𝑐4 𝑐5 b θ
𝑪𝑩 Basic Body matrix Identity matrix
Variables 𝑥1 𝑥2 𝑠1 𝑠2 𝑠3
0 𝑠1
0 𝑠2
𝑍𝑗 = 𝐶𝐵 𝑥𝑖𝑗
𝑐𝑗 − 𝑍𝑗
𝜃 = 𝑀𝑖𝑛𝑖𝑚𝑢𝑚 𝑟𝑎𝑡𝑖𝑜
𝑍𝑗 = 𝐶𝐵 𝑥𝑖𝑗
Significance of the above terms will be explained wile solving the problem
Step 3: Perform the optimality test
➢ Find the value of Zj for each column of the simplex table
➢ Select the row having minimum non negative θ value as key row
➢ Select the element at the intersection of key column and key row as key element
and made it Unity (1). Made all other elements of key column zero by conducting
row operations in the simplex table. Row operation will affect body matrix, identity
matrix and column b only.
➢ Again conduct the optimality test and repeat the above procedure till optimum
solution is obtained.
Problem: Solve the following LPP by Simplex Method
𝑀𝑎𝑥 𝑍 = 2𝑥1 + 5𝑥2
➢ In this problem all the values in the right hand side of the constraints is positive.
So there is no need of this step. Then Convert all the in-equations into equations.
➢ In this problem the constraints are ≤ type, so to convert the constraints into
equations by adding a variable to the left hand side of the constraints. These
variables added to the left hand side of the constraints are called slack variables.
As the slack variables are appears in the constraints those should be include in the
objective function by multiply those with zero, so that there is no change in the value
of objective function.
𝑥1 + 4𝑥2 + 𝑠1 = 24
3𝑥1 + 𝑥2 + 𝑠2 = 21
𝑥1 + 𝑥2 + 𝑠3 = 9
Now we need to identify whether this solution is optimum (or) it can be improved.
To check it form the simplex table with the above available data
The available data is
Basic variables are s1, s2 and s3 and their values are 24, 21 and 9 respectively
Non basic variables are x1 and x2 and both are equal to zero. With this data
form the simplex table
cj 2 0 0 0 b θ
5
CB Basic x1 x2 s1 s2 s3
variables (BV)
0 𝑠1 1 4 1 0 0 24
0 𝑠2 3 1 0 1 0 21
𝑠3
0 1 1 0 0 1 9
𝑐𝑗 2 5 0 0 0
𝐶𝐵 BV 𝑥1 𝑥2 𝑠1 𝑠2 𝑠3 b θ
0 𝑠1 1 4 1 0 0 24 24Τ4 = 6
KE
KR←
0 𝑠2 3 1 0 1 0 21 21Τ1 = 21
0 𝑠3 1 1 0 0 1 9 9Τ1 = 9
𝑍𝑗 0×1 0×4 0×1 0×0 0×0
+0×3 +0×1 +0×0 +0×1 +0×0
= 𝐶𝐵 𝑥𝑖𝑗 +0×1 +0×1 +0×0 +0×0 +0×1
=0 =0 =0 =0 =0
𝑐𝑗 − 𝑍𝑗 2 5 𝐊𝐂 ↑ 0 0 0
There are two non negative values 2 and 5 in 𝑐𝑗 − 𝑍𝑗 row. So IBFS is not optimum.
Select the column having highest non negative value as key column (column
corresponding to 𝑥2 ) and find out θ values for each row as 𝜃 = 𝑏 Τ𝐾𝐶
Select the row having least non negative value as key row (row corresponding to 𝑠1 )
Select the intersection of key column and key row as key element (Cell having 4)
Made the key element 1 by dividing the entire row with 4. During this step there is no
change in the remaining rows. So
𝑅1
𝑅1 =
4
cj 2 5 0 0 0 b θ
CB Basic x1 x2 s1 s2 s3
variables
0 s1 1/4 4/4=1 1/4 0/4=0 0/4=0 24/4=6
0 s2 3 1 0 1 0 21
0 s3 1 1 0 0 1 9
cj 2 5 0 0 0 b θ
CB Basic x1 x2 s1 s2 s3
variables
0 s1 1 1 1 0 0 6
4 4
0 s2 3 1 0 1 0 21
0 s3 1 1 0 0 1 9
Now made all other elements except key element of key column (x 2 column) zero by performing
only the row operations. Now s1 in the BV is outgoing variable and x 2 becomes incoming
variable. In this step replace s1 with x 2 and corresponding coefficient 0 with 5 in C B column.
There is no change in the other values of key row. The row operations to be performed are
𝑅2 = 𝑅2 − 𝑅1 𝑎𝑛𝑑 𝑅3 = 𝑅3 − 𝑅1
cj 2 5 0 0 0 b θ
CB Basic x1 x2 s1 s2 s3
variables
0 s1 1 1 1 0 0 6
4 4
0 s2 3 1 0 1 0 21
0 s3 1 1 0 0 1 9
cj 2 5 0 0 0 b θ
CB Basic x1 x2 s1 s2 s3
variables
5 x2 1 1 1 0 0 6
4 4
0 s2 1 11 1 1
3− = 1 - 1= 0 0− =− 1–0=1 0–0=0 21 – 6 = 15
4 4 4 4
0 s3 1 3 1 1
1− = 1 - 1= 0 0− =− 0–0=0 1–0=1 9–6=3
4 4 4 4
Still there is one positive value in 𝑐𝑗 − 𝑍𝑗 row (corresponding to x 1 ). So select the first
column having highest non negative value as key column and find the θ values
cj 2 5 0 0 0 b θ
CB Basic x1 x2 s1 s2 s3
variables
5 x2 1 1 1 0 0 6
4 4
0 s2 11 0 1 1 0 15
−
4 4
0 s3 𝟑 0 1 0 1 3
−
𝟒 4
4
Now by performing row operation 𝑅3 = 3 𝑅3 to made the key element as 1
cj 2 5 0 0 0 b θ
CB Basic x1 x2 s1 s2 s3
variables
5 x2 1 1 1 0 0 6
4 4
0 s2 11 0 1 1 0 15
−
4 4
0 s3
4 3 4 4 −1 −1 4 4 4 4
× =𝟏 ×0=0 × = × 1 =
3 4 3 3 4 3 3×0=0 3 3 3×
3
=4
cj 2 5 0 0 0 b θ
CB Basic x1 x2 s1 s2 s3
variables
5 x2 1 1 1 0 0 6
4 4
0 s2 11 0 1 1 0 15
−
4 4
0 s3 1 0 −1 0 4 4
3 3
Now perform the row operations to made other elements except key element of key
1 11
column zero. The row operations to be performed are 𝑅1 = 𝑅1 − 𝑅3 𝑎𝑛𝑑 𝑅2 = 𝑅2 − 𝑅3 .
4 4
Replace s3 with x 1 in BV column
cj 2 5 0 0 0 b
CB BV x1 x2 s1 s2 s3
5 x2 1 1 1 −
1
× 0 =1 1 1 1 1 1 1 4 −1 1
− ×1=0 4 + × = 0 − × 0=0 0 − × = 6 − 4=5
4 4 4 4 3 3 4 4 3 3
4
0 s2
11 11 11
−1 11 1
11
− ×1 0− × 0 =0 11 0 −
11
×
4
15 − 4
4 4 4 + × 1− ×0 4 3 4
4 4 3 4 −11
=0 2 = =4
= =1 3
3
2 x1 1 0 −1 0 4 4
3 3
The solution in the above table x 2 = 5 and x 1 = 4 is the third basic feasible solution.
Now check whether this solution is optimum or not by finding 𝑍𝑗 = σ 𝐶𝐵 𝑥𝑖𝑗 𝑎𝑛𝑑 𝑐𝑗 − 𝑍𝑗
cj 2 5 0 0 0 b
CB BV x1 x2 s1 s2 s3
5 x2 0 1 1 0 −1 5
3 3
0 s2 0 0 2 1 −11 4
3 3
2 x1 1 0 −1 0 4 4
3 3
Now all the values in the row 𝑐𝑗 − 𝑍𝑗 are non positive, so the solution x 2 = 5 and x 1 = 4
is the optimum solution.
CB Basic x1 x2 x3 s1 s2 s3
variables (BV)
0 𝑠1 2 3 2 1 0 0 440
0 𝑠2 4 0 3 0 1 0 470
0 𝑠3 2 5 0 0 0 1 430
Write the coefficients of the variable in the row cj using the objective function
𝑀𝑎𝑥 𝑍 = 4𝑥1 + 3𝑥2 + 6𝑥3 + 0𝑠1 + 0𝑠2 + 0𝑠3
Fill the second row (Row corresponding to 𝑠2) using the coefficients in the
second equation 4𝑥1 + 3𝑥3 + 𝑠2 = 470
Fill the third row (Row corresponding to 𝑠3) using the coefficients in the third
equation 2𝑥1 + 5𝑥2 + 𝑠3 = 430
Now to check whether the IBFS is optimum or not find 𝑍𝑗 = σ 𝐶𝐵 𝑥𝑖𝑗 𝑎𝑛𝑑 𝑐𝑗 − 𝑍𝑗
cj 4 3 6 0 0 0 b θ
CB Basic x1 x2 x3 s1 s2 s3
variables
0 s1 2 3 2 1 0 0 440 220
0 s2 4 0 3 0 1 0 470 470/3
KE KR←
0 s3 2 5 0 0 0 1 430 ∞
𝑍𝑗 = σ 𝐶𝐵 𝑥𝑖𝑗 0*2+0* 0*3+0* 0*2+0* 0*1+0* 0*0+0* 0*0+0*
4+0*2= 0+0*5= 3+0*0= 0+0*0= 1+0*0= 0+0*1=
0 0 0 0 0 0
𝑐𝑗 − 𝑍𝑗 4-0=4 3-0=3 6-0=6 0-0=0 0-0=0 0-0=0
𝐊𝐂 ↑
There are three non negative values in 𝑐𝑗 − 𝑍𝑗 row. So IBFS is not optimum.
To move towards optimum solution select the column having highest non
negative value as key column and find out θ values for each row as 𝜃 = 𝑏 Τ𝐾𝐶
Select the row having least non negative value as key row (row corresponding
to 𝑠1 ). Select the intersection of key column and key row as key element (Cell
having 4)
Made the key element 1 by dividing the entire row with 3. During this step
𝑅
there is no change in the remaining rows. So 𝑅2 = 2
3
cj 4 3 6 0 0 0 b θ
CB Basic variables x1 x2 x3 s1 s2 s3
0 s1 2 3 2 1 0 0 440
0 s2 4/3 0/3=0 3/3=1 0/3=0 1/3 0/3=0 470/3
0 s3 2 5 0 0 0 1 430
0 0 0 0 0 0
𝑍𝑗 = 𝐶𝐵 𝑥𝑖𝑗
𝑐𝑗 − 𝑍𝑗 4 3 6 0 0 0
cj 4 3 6 0 0 0 b θ
CB Basic variables x1 x2 x3 s1 s2 s3
0 s1 2 3 2 1 0 0 440
0 s2 4/3 0 1 0 1/3 0 470/3
0 s3 2 5 0 0 0 1 430
Now made all other elements except key element of key column zero. Now s 2
in the BV is outgoing variable and x3 becomes incoming variable. So replace
s2 with x3 and corresponding coefficient 0 with 6 in CB column.
There is no change in the values of key row. The row operations to be
performed is 𝑅1 = 𝑅1 − 2𝑅2 𝑎𝑛𝑑 there is no need to operate 𝑅3 because already
the corresponding element is Zero
cj 4 3 6 0 0 0 b θ
CB Basic x1 x2 x3 s1 s2 s3
variables
0 s1 2-2*4/3 3-2*0 2 - 2*1 1-2*0 0 – 2*1/3 0 – 2*0 440 − 2 ∗ 470Τ3
= - 2/3 =3 =0 =1 = - 2/3 =0 = 380Τ3
6 x3 4/3 0 1 0 1/3 0 470/3
0 s3 2 5 0 0 0 1 430
cj 4 3 6 0 0 0 b θ
CB Basic variables x1 x2 x3 s1 s2 s3
0 s1 - 2/3 3 KE 0 1 - 2/3 0 380/3 380/9
6 x3 4/3 0 1 0 1/3 0 470/3 KR←
∞
0 s3 2 5 0 0 0 1 430 86
𝑍𝑗 = 𝐶𝐵 𝑥𝑖𝑗 6 0 2 0
8 0
𝑐𝑗 − 𝑍𝑗
-4 3 0 0 -2 0
𝐊𝐂 ↑
cj 4 3 6 0 0 0 b θ
CB Basic variables x1 x2 x3 s1 s2 s3
0 s1 - 2/3 3 0 1 - 2/3 0 380/3
6 x3 4/3 0 1 0 1/3 0 470/3
0 s3 2 5 0 0 0 1 430
Made the key element unity by dividing entire key row with key element
𝑅1 = 𝑅1Τ3
cj 4 3 6 0 0 0 b θ
CB Basic variables x1 x2 x3 s1 s2 s3
0 s1 -2/9 1 0 1/3 -2/9 0 380/9
6 x3 4/3 0 1 0 1/3 0 470/3
0 s3 2 5 0 0 0 1 430
cj 4 3 6 0 0 0 b θ
CB Basic x1 x2 x3 s1 s2 s3
variables
3 x2 - 2/9 1 0 1/3 - 2/9 0 380/9
6 x3 4/3 0 1 0 1/3 0 470/3
0 s3
2 5– 0 – 5*0 0 − 5 0 1- 430 − 5
2−5∗ −
9 5*1 =0 1 2 5*0 380
∗ −5 − ∗
28 =0 3 9 =1 9
= 5 1970
9 =− 10 =
3 = 9
9
Again perform the optimality test to check whether this solution is optimum or
not
Again find out 𝑍𝑗 = σ 𝐶𝐵 𝑥𝑖𝑗 𝑎𝑛𝑑 𝑐𝑗 − 𝑍𝑗
cj 4 3 6 0 0 0 b θ
CB BV x1 x2 x3 s1 s2 s3
3 x2 - 2/9 1 0 1/3 - 2/9 0 380/9
6 x3 4/3 0 1 0 1/3 0 470/3
0 s3 28/9 0 0 -5/3 10/9 1 1970/9
2
1 − ∗3+
2 4 3*1+ 3*0+ ∗3+6 9
− ∗ 3+ ∗6 3 1 3*0+
𝑍𝑗 = 𝐶𝐵 𝑥𝑖𝑗 9 3 6*0+ 6*1+ 5 ∗6+
0*0= ∗0− 3 6*0+
28 𝟐𝟐 0*0= 3
+ ∗0= 3 6 10 𝟒 0*1=
9 𝟑 ∗0 = 1 ∗0 =
9 𝟑 0
𝑐𝑗 − 𝑍𝑗 - 10/3 0 0 -1 - 4/3 0
All the values in the row 𝑐𝑗 − 𝑍𝑗 are non positive, So the above solution is
optimum
3200
𝑍𝑚𝑎𝑥 =
3
𝑀𝑎𝑥 𝑍 = 2𝑥1 + 𝑥2
Subjected to
4𝑥1 + 3𝑥2 ≤ 12
4𝑥1 + 𝑥2 ≤ 8
4𝑥1 − 𝑥2 ≤ 8
𝑥1 , 𝑥2 ≥ 0
Solution
Convert the problem into standard form
Convert all the in equations into equations by adding slack
variables as all the constraints are less than or equal to type.
4𝑥1 + 3𝑥2 + 𝑠1 = 12
4𝑥1 + 𝑥2 + 𝑠2 = 8
4𝑥1 − 𝑥2 + 𝑠3 = 8
𝑥1 , 𝑥2 , 𝑠1 , 𝑠2 , 𝑠3 ≥ 0
4𝑥1 + 3𝑥2 + 𝑠1 = 12
4𝑥1 + 𝑥2 + 𝑠2 = 8
4𝑥1 − 𝑥2 + 𝑠3 = 8
𝑥1 , 𝑥2 , 𝑠1 , 𝑠2 , 𝑠3 ≥ 0
cj 2 0 0 0 b θ
1
CB Basic x1 x2 s1 s2 s3
variables (BV)
0 𝑠1 4 3 1 0 0 12
0 𝑠2 4 1 0 1 0 8
𝑠3
0 4 -1 0 0 1 8
𝑐𝑗 2 1 0 0 0
𝐶𝐵 BV 𝑥1 𝑥2 𝑠1 𝑠2 𝑠3 b θ
0 𝑠1 4 3 1 0 0 12 12Τ4 = 3
0 𝑠2 4 1 0 1 0 8 8Τ4 = 2
0 𝑠3 4 KE -1 0 0 1 8 8Τ4 = 2
𝑍𝑗 0×4 0×1 0×0 0×0 KR←
0 ×3 +0
+0×4 +0×0 +0×1 +0×0
×1+ 0
= 𝐶𝐵 𝑥𝑖𝑗 +0×4 +0×0 +0×0 +0×1
× (−1) = 0
=0 =0 =0 =0
𝑐𝑗 − 𝑍𝑗 2 𝐊𝐂 ↑ 1 0 0 0
There are two non negative values 2 and 1 in 𝑐𝑗 − 𝑍𝑗 row. So IBFS is not optimum.
cj 2 1 0 0 0 b θ
CB Basic x1 x2 s1 s2 s3
variables
0 s1 4 3 1 0 0 12
0 s2 4 1 0 1 0 8
0 s3 4/4=1 -1/4 0/4=0 0/4=0 1/4 8/4=2
cj 2 1 0 0 0 b θ
CB Basic x1 x2 s1 s2 s3
variables
0 s1 4 3 1 0 0 12
0 s2 4 1 0 1 0 8
0 s3 1 - 1/4 0 0 1/4 2
Made other elements of key element of key column zero by performing the
following row operations. Now s3 in the BV is outgoing variable and x 1 is
incoming variable. So replace s3 with x 1 and corresponding values of CB. The
row operations to be performed are
𝑅1 = 𝑅1 − 4𝑅3 𝑎𝑛𝑑 𝑅2 = 𝑅2 − 4𝑅3
cj 2 1 0 0 0 b θ
CB Basic x1 x2 s1 s2 s3
variables
0 s1 4 3 1 0 0 12
0 s2 4 1 0 1 0 8
0 s3 1 - 1/4 0 0 1/4 2
cj 2 1 0 0 0 b θ
CB Basic x1 x2 s1 s2 s3
variables
0 s1 1
3−4 − 1- 4*0 0 - 4*0 0− 12 -
4 – 4*1=0 4 1
=1 =0 4 4 = - 1 4*2 = 4
=4
0 s2 1 0−
4 – 4*1=0 1−4 − 0 - 4*0 1 - 4*0 1 8 - 4*2
4 4 4 =-1
=0 =1 =0
=2
2 x1 1 - 1/4 0 0 1/4 2
cj 2 1 0 0 0 b θ
CB Basic x1 x2 s1 s2 s3
variables
0 s1 0 4 1 0 -1 4
0 s2 0 2 0 1 -1 0
2 x1 1 - 1/4 0 0 1/4 2
0*4+0*2 0*(-1)
𝑍𝑗 = 𝐶𝐵 𝑥𝑖𝑗 0*0+0*0 0*1+0*0 0*0+0*1
-2*1/4= +0*(-1)
+2*1= 2 +2*0= 0 +2*0= 0 +2*1/4=
-1/2
1/2
𝑐𝑗 − 𝑍𝑗 0 3/2 0 0 -1/2
KC↑
cj 2 1 0 0 0 b θ
CB Basic x1 x2 s1 s2 s3
variables
0 s1 0 4 1 0 -1 4
0 s2 0 2 0 1 -1 0
2 x1 1 - 1/4 0 0 1/4 2
𝑅2
Made the key element unity by performing the row operation 𝑅2 =
2
cj 2 1 0 0 0 b θ
CB Basic x1 x2 s1 s2 s3
variables
0 s1 0 4 1 0 -1 4
0 s2 0/2=0 2/2=1 0/2=0 1/2 - 1/2 0/2=0
2 x1 1 - 1/4 0 0 1/4 2
Now made all other elements of the key column zero by performing the row
1
operation 𝑅1 = 𝑅1 − 4𝑅2 and 𝑅3 = 𝑅3 + 𝑅2
4
Replace s2 with x2
cj 2 1 0 0 0 b θ
CB Basic x1 x2 s1 s2 s3
variables
0 s1 0 4 1 0 -1 4
0 s2 0 1 0 1/2 - 1/2 0
2 x1 1 - 1/4 0 0 1/4 2
1
𝑅1 = 𝑅1 − 4𝑅2 and 𝑅3 = 𝑅3 + 𝑅2
4
cj 2 1 0 0 0 b θ
CB Basic x1 x2 s1 s2 s3
variables KR ←
0 s1 0 1 -2 1 KE 4 4/1=4
0
1 x2 0 1 0 1/2 - 1/2 0 0/(-0.5)=
- ve
2 x1
2/(1/8)
1 0 0 1/8 1/8 2 = 16
𝑍𝑗 = 𝐶𝐵 𝑥𝑖𝑗 2 1 0 3/4 -1/4
𝑐𝑗 − 𝑍𝑗 0 0 0 -3/4 1/4
KC↑
Made the key element unity. But the key element is already 1. So made the
other elements of key column zero . Replace s1 with s3
cj 2 1 0 0 0 b θ
CB BV x1 x2 s1 s2 s3
0 s3 0 0 1 -2 1 4
1 x2 0 1 0 1/2 - 1/2 0
2 x1 1 0 0 1/8 1/8 2
1 1
Row operations should be performed are 𝑅2 = 𝑅2 + 𝑅1 and 𝑅3 = 𝑅3 − 𝑅1
2 8
cj 2 1 0 0 0 b θ
CB BV x1 x2 s1 s2 s3
0 s3 0 0 1 -2 1 4
1 x2 0 1 1/2 -1/2 0 2
2 x1 1 0 3/8 0 3/2
-1/8
𝑍𝑗 = 𝐶𝐵 𝑥𝑖𝑗
2 1 1/4 1/4 0
𝑐𝑗 − 𝑍𝑗 0 0 -1/4 -1/4 0
3
All the values in the row 𝑐𝑗 − 𝑍𝑗 are non positive, so 𝑠3 = 4, 𝑥2 = 2, 𝑥1 = ,
2
𝑠1 = 𝑠2 = 0. And 𝑍𝑚𝑎𝑥 = 5
Solve the following LPP by simplex
method
Subjected to
3𝑥1 − 𝑥2 + 2𝑥3 ≤ 7
2𝑥1 + 4𝑥2 ≥ −12
−4𝑥1 + 3𝑥2 + 8𝑥3 ≤ 10
𝑥1 , 𝑥2 , 𝑥3 ≥ 0
Solution
In the second constraint the right hand side is negative, so first of all
convert it to positive by multiplying both sides of the constraint with –
1. Then the constraints becomes
3𝑥1 − 𝑥2 + 2𝑥3 ≤ 7
−2𝑥1 − 4𝑥2 ≤ 12
−4𝑥1 + 3𝑥2 + 8𝑥3 ≤ 10
𝑥1 , 𝑥2 , 𝑥3 ≥ 0
Problem is minimization type, so change the problem into
maximization type by multiplying the objective function with – 1. So
the problem becomes
−2𝑥1 − 4𝑥2 + 𝑠2 = 12
𝑥1 , 𝑥2 , 𝑥3 , 𝑠1 , 𝑠2 , 𝑠3 ≥ 0
cj -1 3 -3 0 0 0 b θ
CB BV x1 x2 x3 s1 s2 s3
0 s1 3 -1 2 1 0 0 7
0 s2 -2 -4 0 0 1 0 12
0 s3 -4 3 8 0 0 1 10
𝑐𝑗 − 𝑍𝑗 -1 3 KC↑ -3 0 0 0
cj -1 3 -3 0 0 0 b θ
CB BV x1 x2 x3 s1 s2 s3
0 s1 3 -1 2 1 0 0 7
0 s2 -2 -4 0 0 1 0 12
0 s3 -4/3 1 8/3 0 0 1/3 10/3
Made all other elements of key column zero by performing row operations
𝑅1 = 𝑅1 + 𝑅3 and 𝑅2 = 𝑅2 + 4𝑅3
cj -1 3 -3 0 0 0 b θ
CB BV x1 x2 x3 s1 s2 s3
0 s1 3 -1 2 1 0 0 7
0 s2 -2 -4 0 0 1 0 12
0 s3 -4/3 1 8/3 0 0 1/3 10/3
𝑅1 = 𝑅1 + 𝑅3 and 𝑅2 = 𝑅2 + 4𝑅3
cj -1 3 -3 0 0 0 b θ
CB BV x1 x2 x3 s1 s2 s3
0 s1 5/3 KE 0 14/3 1 0 1/3 31/3 31/5 KR←
0 s2 -22/3 0 32/3 0 1 4/3 76/3 - 38/11
3 x2 -4/3 1 8/3 0 0 1/3 10/3 -5/2
𝑍𝑗 = 𝐶𝐵 𝑥𝑖𝑗 -4 3 8 0 0 1
𝑐𝑗 − 𝑍𝑗 3 0 -11 0 0 -1
KC↑
Still there is a positive value in the last row. So this solution is not optimum.
So again go for the selection of key element and continue the procedure.
cj -1 3 -3 0 0 0 b θ
CB BV x1 x2 x3 s1 s2 s3
0 s1 5/3 0 14/3 1 0 1/3 31/3
0 s2 -22/3 0 32/3 0 1 4/3 76/3
3 x2 -4/3 1 8/3 0 0 1/3 10/3
3
Made key element unity by performing row operation 𝑅1 = 𝑅1
5
cj -1 3 -3 0 0 0 b θ
CB BV x1 x2 x3 s1 s2 s3
0 s1 1 0 14/5 3/5 0 1/5 31/5
0 s2 -22/3 0 32/3 0 1 4/3 76/3
3 x2 -4/3 1 8/3 0 0 1/3 10/3
Made other two elements of the key column zero by performing row
22 4
operation 𝑅2 = 𝑅2 + 𝑅1 and 𝑅3 = 𝑅3 + 𝑅1. In this step replace 𝑠1 with 𝑥1
3 3
cj -1 3 -3 0 0 0 b θ
CB BV x1 x2 x3 s1 s2 s3
0 s1 1 0 14/5 3/5 0 1/5 31/5
0 s2 -22/3 0 32/3 0 1 4/3 76/3
3 x2 -4/3 1 8/3 0 0 1/3 10/3
22 4
𝑅2 = 𝑅2 + 𝑅 and 𝑅3 = 𝑅3 + 𝑅1
3 1 3
cj -1 3 -3 0 0 0 b θ
CB BV x1 x2 x3 s1 s2 s3
-1 x1 1 0 14/5 3/5 0 1/5 31/5
0 s2 0 0 156/5 22/5 1 14/5 354/5
3 x2 0 1 32/5 4/5 0 3/5 58/5
31 354 58 31 58 143
𝑥1 = 5
, 𝑠2 = 5
, 𝑥2 = 5
, 𝑥3 = 𝑠1 = 𝑠3 = 0. And 𝑀𝑎𝑥 𝑍 1 = −1 ∗ 5
+ 3∗ 5
= 5
143
Now 𝑀𝑖𝑛𝑖𝑚𝑢𝑚 𝑍 = − 𝑀𝑎𝑥𝑖𝑚𝑢𝑚 𝑍 1 = −
5
𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑍 = 2𝑥1 + 3𝑥2 + 4𝑥3
Subjected to
3𝑥1 + 𝑥2 + 4𝑥3 ≤ 600
2𝑥1 + 4𝑥2 + 2𝑥3 ≥ 480
2𝑥1 + 3𝑥2 + 3𝑥3 = 540
𝑥1 , 𝑥2 , 𝑥3 ≥ 0
cj 2 3 4 0 0 b θ
CB Basic variables x1 x2 x3 s1 s2
0 s1 3 1 4 1 0 600
0 s2 2 4 2 0 - 1 - 480
2 3 3 0 0 540
Here the problem is there are three constraints, but there are having only
two basic variables.
Another thing is while forming the first simplex table there must be one
identity (Unit) matrix. But here in the simplex table there is no identity
matrix.
There are two methods to solve the problems having artificial variables (i) Big
– M method, (ii) Two Phase simplex method.
Big – M method
𝑥1 , 𝑥2 , 𝑥3 , 𝑠1 , 𝑠2 , 𝐴1 , 𝐴2 ≥ 0
To find the IBFS take the decision variables and surplus variables as
zero.
Now basic variables are 𝑠1 , 𝐴1 𝑎𝑛𝑑 𝐴2 . With this data form the simplex
table.
cj 2 3 4 0 0 -M -M b θ
CB BV x1 x2 x3 s1 s2 A1 A2
0 𝑠1 3 1 4 1 0 0 0 600
-M 𝐴1 2 4 2 0 -1 1 0 480
-M 𝐴2 2 3 3 0 0 0 1 540
Take the first equation / constraint 3𝑥1 + 𝑥2 + 4𝑥3 + 𝑠1 = 600 and using the
coefficients of variables fill the first row of the matrix
Take the second equation / constraint 2𝑥1 + 4𝑥2 + 2𝑥3 − 𝑠2 + 𝐴1 = 480 and
using the coefficients of variables fill the second row of the matrix
Take the third equation / constraint 2𝑥1 + 3𝑥2 + 3𝑥3 + 𝐴2 = 540 and using the
coefficients of variables fill the third row of the matrix
From the table one can say that 𝑠1 = 600 𝐴1 = 600 𝐴2 = 600
Select the key column having highest positive value. So the column
corresponding to 𝑥2 is the key column
Second row is having θ value 120 (min). So second row becomes key row and
the value 4 in the cell 𝑥2 X 𝐴1 is the key is the key element 1
cj 2 3 4 0 0 -M -M b θ
CB BV x1 x2 x3 s1 s2 A1 A2
0 s1 3 1 4 1 0 0 0 600
-M A1 2 4 2 0 -1 1 0 480
-M A2 2 3 3 0 0 0 1 540
𝑅2
Now made the key element unity by performing row operation 𝑅2 =
4
cj 2 3 4 0 0 -M -M b θ
CB BV x1 x2 x3 s1 s2 A1 A2
0 s1 3 1 4 1 0 0 0 600
-M A1 2 1 4 2 1 0 −1 1 0 480
= =1 = =0 =0 =120
4 2 4 4 2 4 4 4 4 4
-M A2 2 3 3 0 0 0 1 540
cj 2 3 4 0 0 -M -M b θ
CB BV x1 x2 x3 s1 s2 A1 A2
0 s1 3 1 4 1 0 0 0 600
-M A1 1/2 1 1/2 0 -1/4 1/4 0 120
-M A2 2 3 3 0 0 0 1 540
cj 2 3 4 0 0 -M -M b θ
CB BV x1 x2 x3 s1 s2 A1 A2
0 s1 3 1 4 1 0 0 0 600
-M A1 1/2 1 1/2 0 -1/4 1/4 0 120
-M A2 2 3 3 0 0 0 1 540
Make all other elements in the key column zero. The row operations to be
performed are 𝑅1 = 𝑅1 − 𝑅2, 𝑅3 = 𝑅3 − 3𝑅2
Replace 𝐴1 with 𝑥2
cj 2 3 4 0 0 -M -M b θ
CB BV x1 x2 x3 s1 s2 A1 A2
0 s1 𝟏 𝟓 𝟏 𝟕 𝟏 𝟏 𝟏 −𝟏 0- 600-
𝟑− = 1-1=0 4− = 1-0=1 𝟎 − (− ) = 𝟎− = 120=
𝟐 𝟐 𝟐 𝟐 𝟒 𝟒 𝟒 𝟒 0=0
480
3 x2 1/2 1 1/2 0 -1/4 1/4 0 120
-M A2 2−𝟑 ∗ 𝟏 𝟏
3-3*1 𝟑−𝟑∗ 𝟏 𝟏
𝟐 𝟐 0-3*0 𝟎 − 𝟑(− ) 𝟎−𝟑 1-3*0 540-
=0 𝟒 𝟒
𝟏 =0 𝟑 =1 3*120
= 𝟑 = −𝟑
=180
𝟐 = 𝟒 =
𝟐 𝟒
cj 2 3 4 0 0 -M -M b θ
CB BV x1 x2 x3 s1 s2 A1 A2
0 s1 5/2 0 7/2 1 1/4 -1/4 0 480
3 x2 1/2 1 1/2 0 -1/4 1/4 0 120
-M A2 1/2 0 3/2 0 3/4 -3/4 1 180
cj 2 3 4 0 0 -M -M b θ
CB BV x1 x2 x3 s1 s2 A1 A2
0 s1 5/2 0 7/2 1 1/4 -1/4 0 480 960/7
3 x2 1/2 1 1/2 0 -1/4 1/4 0 120 240
-M A2 1/2 0 3/2KE 0 3/4 -3/4 1 180 120
𝑍𝑗 = σ 𝐶𝐵 𝑥𝑖𝑗 KR←
3−𝑀 3 3 − 3𝑀 0 −3 − 3𝑀 3𝑀 + 3 -M
2 2 4 4
𝑐𝑗 − 𝑍𝑗
1+𝑀 5 + 3𝑀 3 + 3𝑀 −7𝑀 − 3 0
0 0
2 2 4 4
KC↑
cj 2 3 4 0 0 -M -M b θ
CB BV x1 x2 x3 s1 s2 A1 A2
0 s1 5/2 0 7/2 1 1/4 -1/4 0 480
3 x2 1/2 1 1/2 0 -1/4 1/4 0 120
-M A2 1/2 0 3/2 0 3/4 -3/4 1 180
2
Make the key element unity by operate the row 3 as 𝑅3 = 𝑅3
3
cj 2 3 4 0 0 -M -M b θ
CB BV x1 x2 x3 s1 s2 A1 A2
0 s1 5/2 0 7/2 1 1/4 -1/4 0 480
3 x2 1/2 1 1/2 0 -1/4 1/4 0 120
-M A2 1 2 1 2 3 2 2 3 2 𝟏 −3 ∗ 2 2 2 2
∗ = 0 ∗ = 0 ∗ = 10 ∗ = 0 4 ∗ 3 = 𝟐 4 3 1∗ = 180 ∗ =
2 3 3 3 2 3 3 −𝟏 3 3 3
= 120
𝟐
cj 2 3 4 0 0 -M -M b θ
CB BV x1 x2 x3 s1 s2 A1 A2
0 s1 5/2 0 7/2 1 1/4 -1/4 0 480
3 x2 1/2 1 1/2 0 -1/4 1/4 0 120
-M A2 1/3 0 1 0 1/2 -1/2 2/3 120
cj 2 3 4 0 0 -M -M b θ
CB BV x1 x2 x3 s1 s2 A1 A2
0 s1 5/2 0 7/2 1 1/4 -1/4 0 480
3 x2 1/2 1 1/2 0 -1/4 1/4 0 120
-M A2 1/3 0 1 0 1/2 -1/2 2/3 120
cj 2 3 4 0 0 -M -M b θ
CB BV x1 x2 x3 s1 s2 A1 A2
0 s1 4/3 0 0 1 -3/2 3/2 -7/3 60
3 x2 1/3 1 0 0 -1/2 1/2 -1/3 60
4 x3 1/3 0 1 0 1/2 -1/2 2/3 120
𝑐𝑗 − 𝑍𝑗 -1/3 0 0
−2𝑀 + 1 −3𝑀 − 2
0 -1/2
2 3
Here all the values are non positive as “– M” is very large negative number.
So the above solution is optimum
cj 0 0 0 0 0 0 -1 b θ
CB BV x1 x2 x3 s1 s2 s3 A1
0 s1 5 7 4 1 0 0 0 7
0 s2 4 -7 -5 0 1 0 0 2
-1 A1 3 4 -6 0 0 -1 1 29/7
Now check whether the above solution is optimum or not by conducting optimality test
cj 0 0 0 0 0 0 -1 b θ
CB BV x1 x2 x3 s1 s2 s3 A1
0 s1 5 7KE 4 1 0 0 0 7 7/7=1
0 s2 4 -7 -5 0 1 0 0 2 -2/7
-1 A1 3 4 -6 0 0 -1 1 29/7
29/28
0*3+0* 0*7+0* 0*4+0* 0*1+0* 0*0+0* 0*0+0* 0*0+0*
𝑍𝑗 = 𝐶𝐵 𝑥𝑖𝑗
4 - 1*3 -7 -1*4 5 -1*-6 0 -1*0 1-1*0 0 -1*-1 0 -1*1
=-3 =-4 =6 = 0 =1 = -1 KR←
=0
𝑐𝑗 − 𝑍𝑗 3 4 -6 0 0 -1 0
KC↑
𝑅1
Now make the key element 1 by operate the 1st row as 𝑅1 = 7
cj 0 0 0 0 0 0 -1 b θ
CB BV x1 x2 x3 s1 s2 s3 A1
0 s1 5/7 7/7=1 4/7 1/7 0/7=0 0/7=0 0/7=0 7/7=1
0 s2 4 -7 -5 0 1 0 0 2
-1 A1 3 4 -6 0 0 -1 1 29/7
cj 0 0 0 0 0 0 -1 b θ
CB BV x1 x2 x3 s1 s2 s3 A1
0 s1 5/7 1 4/7 1/7 0 0 0 1
0 s2 4 -7 -5 0 1 0 0 2
-1 A1 3 4 -6 0 0 -1 1 29/7
Now make all other elements of key column zero. For that the row operations
to be performed are 𝑅2 = 𝑅2 + 7𝑅1 and 𝑅3 = 𝑅3 − 4𝑅1
cj 0 0 0 0 0 0 -1 b θ
CB BV x1 x2 x3 s1 s2 s3 A1
0 x2 5/7 1 4/7 1/7 0 0 0 1
0 s2 9 0 -1 1 1 0 0 9
-1 A1 1/7 0 -58/7 -4/7 0 -1 1 1/7
cj 0 0 0 0 0 0 -1 b θ
CB BV x1 x2 x3 s1 s2 s3 A1
0 x2 5/7 1 4/7 1/7 0 0 0 1
0 s2 9 0 -1 1 1 0 0 9
-1 A1
1 0 -58 -4 0 -7 7 1
5
Make all other elements of key column zero by row operations 𝑅1 = 𝑅1 − 𝑅3 and
7
𝑅2 = 𝑅2 − 9𝑅3
cj 0 0 0 0 0 0 -1 b θ
CB BV x1 x2 x3 s1 s2 s3 A1
0 x2 5/7 1 4/7 1/7 0 0 0 1
0 s2 9 0 -1 1 1 0 0 9
-1 A1 1 0 -58 -4 0 -7 7 1
5
𝑅1 = 𝑅1 − 7 𝑅3 and 𝑅2 = 𝑅2 − 9𝑅3 Replace 𝐴1 with 𝑥1
cj 0 0 0 0 0 0 -1 b θ
CB BV x1 x2 x3 s1 s2 s3 A1
0 x2 0 1 42 3 0 5 -5 2/7
0 s2 0 0 521 37 1 63 -63 0
0 x1 1 0 -58 -4 0 -7 7 1
Now all the artificial variables are eliminated from BV column. So this is the
end of the first phase
In the second phase take this final simplex table of the first phase by
excluding artificial variables columns and original values of 𝑐𝑗
cj 3 2 2 0 0 0 b θ
CB BV x1 x2 x3 s1 s2 s3
2 x2 0 1 42 3 0 5 2/7
0 s2 0 0 521 37 1 63 0
3 x1 1 0 -58 -4 0 -7 1
cj 3 2 2 0 0 0 b θ
CB BV x1 x2 x3 s1 s2 s3
2 x2 0 1 42 3 0 5 2/7 1/147
0 s2 0 0 521 KE 37 1 63 0 0 KR←
3 x1 1 0 -58 -4 0 -7 1 - 1/58
𝑍𝑗 = 𝐶𝐵 𝑥𝑖𝑗 3 2 - 90 -6 0 - 11
𝑐𝑗 − 𝑍𝑗 0 92 6 0 11
0
KC↑
𝑅2 = 𝑅2Τ521
cj 3 2 2 0 0 0 b θ
CB BV x1 x2 x3 s1 s2 s3
2 x2 0 1 42 3 0 5 2/7
0 s2 0 0 1 37/521 1/521 63/521 0
3 x1 1 0 -58 -4 0 -7 1
Replace 𝑠2 with 𝑥3
cj 3 2 2 0 0 0 b θ
CB BV x1 x2 x3 s1 s2 s3
2 x2 0 1 42 3 0 5 2/7
2 x3 0 0 1 37/521 1/521 63/521 0
3 x1 1 0 -58 -4 0 -7 1
cj 3 2 2 0 0 0 b θ
CB BV x1 x2 x3 s1 s2 s3
2 x2 0 1 0 9/521 -42/521 -41/521 2/7
2 x3 0 0 1 37/521 1/521 63/521 0
3 x1 1 0 0 62/521 58/521 7/521 1
All the values in the row 𝑐𝑗 − 𝑍𝑗 are non positive. So this solution is optimum
2
The solution is 𝑥1 = 1, 𝑥2 = 7 , 𝑥3 = 0
2 25
𝑍𝑚𝑎𝑥 = 3 ∗ 1 + 2 ∗ + 2 ∗ 0 =
7 7
𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑍 = 4𝑥1 + 5𝑥2
Subjected to
𝑥1 + 𝑥2 ≥ 1
−2𝑥1 + 𝑥2 ≤ 1
4𝑥1 − 𝑥2 ≥ 1
𝑥1 , 𝑥2 ≥ 0
𝑥1 + 𝑥2 − 𝑠1 + 𝐴1 = 1
−2𝑥1 + 𝑥2 + 𝑠2 = 1
4𝑥1 − 𝑥2 − 𝑠3 + 𝐴2 = 1
𝑥1 , 𝑥2 , 𝑠1 , 𝑠2 , 𝑠3 , 𝐴1 , 𝐴2 ≥ 0
Find out Initial Basic Feasible Solution by taking the values of all decision
and surplus variables as zero.
𝑥1 = 𝑥2 = 𝑠1 = 𝑠3 = 0
𝑥1 + 𝑥2 − 𝑠1 + 𝐴1 = 1
−2𝑥1 + 𝑥2 + 𝑠2 = 1
4𝑥1 − 𝑥2 − 𝑠3 + 𝐴2 = 1
𝑥1, 𝑥2, 𝑠1 , 𝑠2 , 𝑠3 , 𝐴1 , 𝐴2 ≥ 0
𝑐𝑗 4 5 0 0 0 -M -M b θ
𝐶𝐵 BV 𝑥1 𝑥2 𝑠1 𝑠2 𝑠3 𝐴1 𝐴2
-M 𝐴1 1 1 -1 0 0 1 0 1
0 𝑠2 -2 1 0 1 0 0 0 1
-M 𝐴2 4 -1 0 0 -1 0 1 1
𝑐𝑗 4 5 0 0 0 -M -M b θ
𝐶𝐵 BV 𝑥1 𝑥2 𝑠1 𝑠2 𝑠3 𝐴1 𝐴2
-M 𝐴1 0 5/4 -1 0 1/4 1 -1/4 3/4
0 𝑠2 0 1/2 0 1 -1/2 0 1/2 3/2
4 𝑥1 1 -1/4 0 0 -1/4 0 1/4 1/4
𝑐𝑗 4 5 0 0 0 -M -M b θ
𝐶𝐵 BV 𝑥1 𝑥2 𝑠1 𝑠2 𝑠3 𝐴1 𝐴2
-M 𝐴1 0 5/4 -1 0 1/4 1 -1/4 3/4
0 𝑠2 0 1/2 0 1 -1/2 0 1/2 3/2
4 𝑥1 1 -1/4 0 0 -1/4 0 1/4 1/4
𝑐𝑗 4 5 0 0 0 -M -M b θ
𝐶𝐵 BV 𝑥1 𝑥2 𝑠1 𝑠2 𝑠3 𝐴1 𝐴2
KR
-M 𝐴1 0 5/4KE -1 0 1/4 1 -1/4 3/4 3/5
0 𝑠2 0 1/2 0 1 -1/2 0 1/2 3/2 -1
4 𝑥1 1 -1/4 0 0 -1/4 0 1/4 1/4 -1
−5𝑀 − 4 −𝑀 − 4 -M 𝑀+4
𝑍𝑗 = 𝐶𝐵 𝑥𝑖𝑗
4 4
-M 0 4 4
𝑐𝑗 − 𝑍𝑗 5𝑀 + 24 𝑀+4 −5𝑀 − 4
0 M 0 0
4 4 4
KC
𝑐𝑗 4 5 0 0 0 -M -M b θ
𝐶𝐵 BV 𝑥1 𝑥2 𝑠1 𝑠2 𝑠3 𝐴1 𝐴2
-M 𝐴1 0 5/4 -1 0 1/4 1 -1/4 3/4
0 𝑠2 0 1/2 0 1 -1/2 0 1/2 3/2
4 𝑥1 1 -1/4 0 0 -1/4 0 1/4 1/4
4
Make the key element 1 by row operation by 𝑅1 = 𝑅1
5
𝑐𝑗 4 5 0 0 0 -M -M b θ
𝐶𝐵 BV 𝑥1 𝑥2 𝑠1 𝑠2 𝑠3 𝐴1 𝐴2
-M 𝐴1 0 1 -4/5 0 1/5 4/5 -1/5 3/5
0 𝑠2 0 1/2 0 1 -1/2 0 1/2 3/2
4 𝑥1 1 -1/4 0 0 -1/4 0 1/4 1/4
1 1
𝑅2 = 𝑅2 − 𝑅1 and 𝑅3 = 𝑅3 + 𝑅1
2 4
𝑐𝑗 4 5 0 0 0 -M -M b θ
𝐶𝐵 BV 𝑥1 𝑥2 𝑠1 𝑠2 𝑠3 𝐴1 𝐴2
5 𝑥2 0 1 -4/5 0 1/5 4/5 -1/5 3/5
0 𝑠2 0 0 -2/5 1 -2/5 2/5 2/5 4/5
4 𝑥1 1 0 -1/5 0 -1/5 1/5 1/5 2/5
Now all the values in the minimum ratio column (θ) are negative. So
we can not select the key row. So the solution is unbounded
𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑍 = 5𝑥1 + 3𝑥2
Subjected to
2𝑥1 + 𝑥2 ≤ 1
𝑥1 + 4𝑥2 ≥ 6
𝑥1 , 𝑥2 ≥ 0
2𝑥1 + 𝑥2 + 𝑠1 = 1
𝑥1 + 4𝑥2 − 𝑠2 + 𝐴1 = 6
𝑥1 , 𝑥2 , 𝑠1 , 𝑠2 , 𝐴1 ≥ 0
𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑍 = 5𝑥1 + 3𝑥2 + 0𝑠1 + 0𝑠2 − 𝑀𝐴1
2𝑥1 + 𝑥2 + 𝑠1 = 1
𝑥1 + 4𝑥2 − 𝑠2 + 𝐴1 = 6
𝑥1 , 𝑥2 , 𝑠1 , 𝑠2 , 𝐴1 ≥ 0
𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑍 = 5𝑥1 + 3𝑥2 + 0𝑠1 + 0𝑠2 − 𝑀𝐴1
𝑐𝑗 5 3 0 0 -M b θ
𝐶𝐵 BV 𝑥1 𝑥2 𝑠1 𝑠2 𝐴1
0 𝑠1 2 1 1 0 0 1
-M 𝐴1 1 4 0 -1 1 6
𝑐𝑗 − 𝑍𝑗 5+M 3+4M 0 -M 0
KC
Key element is already zero. So make all other elements of the
key column zero. The operation to be performed is 𝑅2 = 𝑅2 − 4𝑅1
𝑐𝑗 5 3 0 0 -M b θ
𝐶𝐵 BV 𝑥1 𝑥2 𝑠1 𝑠2 𝐴1
3 𝑥2 2 1 1 0 0 1
-M 𝐴1 -7 0 -4 -1 1 2
Check for optimality of the above solution
𝑐𝑗 5 3 0 0 -M b θ
𝐶𝐵 BV 𝑥1 𝑥2 𝑠1 𝑠2 𝐴1
3 𝑥2 2 1 1 0 0 1
-M 𝐴1 -7 0 -4 -1 1 2
𝑍𝑗 = 𝐶𝐵 𝑥𝑖𝑗 7M+6 3 4M+3 M -M
𝑐𝑗 − 𝑍𝑗 -7M-1 0 -4M-3 -M 0
Here all the values in 𝑐𝑗 − 𝑍𝑗 are non positive , but still the
artificial variables are not eliminated from the simplex table.
So the solution is infeasible
Duality in Linear Programming
The maximization problem of primal must have all ≤ type constraints and the
minimization have all ≥ type constraints.
The constants 𝑏1 , 𝑏2, 𝑏3,..….. in the constraints of the primal appears in the
objective function of the dual.
Duality
The primal is having 2 variables and 4 constraints, so the dual
will have 4 variables and 2 constraints.
Here in the problem all the variables are less than or equal to
type. So there is no need of conversion.
𝑦1 , 𝑦2 , 𝑦3 , 𝑦4 ≥ 0
Construct the dual of the problem
𝑀𝑖𝑛𝑖𝑚𝑖𝑧𝑒 𝑍 = 3𝑥1 − 2𝑥2 + 4𝑥3
Subjected to
3𝑥1 + 5𝑥2 + 4𝑥3 ≥ 7
6𝑥1 + 𝑥2 + 3𝑥3 ≥ 4
7𝑥1 − 2𝑥2 − 𝑥3 ≤ 10
𝑥1 − 2𝑥2 + 5𝑥3 ≥ 3
4𝑥1 + 7𝑥2 − 2𝑥3 ≥ 2
𝑥1 , 𝑥2 , 𝑥3 ≥ 0
6𝑥1 + 𝑥2 + 3𝑥3 ≥ 4
𝑥1 − 2𝑥2 + 5𝑥3 ≥ 3
𝑥1 , 𝑥2 , 𝑥3 ≥ 0
Let the objective function in the dual is indicated by W
𝑦1 , 𝑦2 , 𝑦3 , 𝑦4, 𝑦5 ≥ 0