STUDY182@504444
STUDY182@504444
Prof. V. S. Verma
Department of Mathematics and Statistics
D.D.U. Gorakhpur University, Gorakhpur
The steps of the simplex algorithm to obtain an optimal solution (if it exists) to
a linear programming problem are as follows :
Step 1 : Formulation of the Mathematical Model
(i) Formulate the mathematical model of the given linear programming
problem.
(ii) Check whether the objective function is to be maximized or minimized.
If the objective function Z = c1x1 + c2x2 + ... + cnxn is to be minimized,
then convert it into a problem of maximization by using the following
relationship :
Minimize Z = Maximize Z where Z = – Z = – c1x1 – c2x2 – ... – cnxn
(iii) Check whether all the bi (i = 1, 2, ...,m) values are positive. If any one of
them is negative, then multiply the corresponding constraint by – 1 in
order to make bi > 0. In doing so, remember to change a less then equal
() type of constraint to a greater than or equal type of constraint and
vice-versa.
Step 2 : Express the LPP in Standard Form
(i) Express the mathematical model of the given LPP in the standard form
by adding additional variables (i.e. by introducing slack/surplus
variables) si to the left hand side of each inequality constraint to convert
into equality constraint (i.e. equation) and by assigning a zero cost
coefficient to these in the objective function.
(ii) Replace each unrestricted variable with the difference of two non-
negative variables. Also, replace each non-positive variable with a new
non-negative variable whose value is the negative of the original
variable.
Step 3 : Set-up the Initial Basic Feasible Solution
If there are m equality constraints involving n unknown variables in the
standard form of the LPP, then assign zero values to any (n – m) of the
variables for finding a solution. Starting with a basic solution for which xj,
j = 1, 2, ... (n – m), are each zero, find all the additional variables si. If all si are
greater than or equal to zero, then the basic solution is feasible and non-
degenerate and if one or more of the si values are zero, then the solution is
degenerate.
Now, put the above information in tabular form, as shown in Table 1 to
get an initial basic feasible solution.
After having set up the initial simplex table, locate the identity matrix
and column variables involved in it. This matrix contains all zero except
positive element 1 on the diagonal. This identity matrix is always a square
matrix and its size is determined by the number of constraints given in the
problem.
The identity matrix so obtained is also called a basis matrix because
basic feasible solution is represented by B = Im. Assign the values of the
–1
constants bi's to the column variables in the identity matrix because XB = B b
= Imb = b.
The variables corresponding to the columns of the identity matrix are
called basic variables and the remaining ones are called non-basic variables. In
general, if an LPP has n variables and m (<n) constraints, then m variables
would be basic and n–m variables would be non-basic. The simplex algorithm
works with the basic feasible solutions which are algebraic versions of
extreme points (vertices). A basic feasible solution is a feasible solution
obtained by choosing one basic variable for each equality constraint and
remaining ones are non-basic and have zero value. However, in certain cases
i.e. in the case of degeneracy, some basic variables may also have zero values.
The first row in Table 1 indicates the coefficients cj of unknown
variables in the objective function which remain the same in successive
simplex Table. These values represent the cost or profit per unit to the
objective function of each of the variables and are used to determine the
variable to be entered into the basis matrix B.
The second row provides the major column headings for the simplex
table. Column 'CB' lists the coefficients of the current basic variables in the
objective function. These values are used to calculate the value of Z when one
unit of any variable is brought into the solution. Column headed by XB
represents the current values of the corresponding variables in the basis.
The identity matrix (or basis matrix) represents the coefficients of slack
variables which have been added to the constraints. Each column of the
identity matrix also represents a basic variable to be listed in column B.
Numbers or entries aij in the columns under each variable are also called
substitution rates or exchange coefficients because these represent the rate at
which resource i (i = 1, 2, ...,m) is consumed by each unit of an activity j (j = 1,
2, ..., n).
The values Zj represent the amount by which the value of the objective
function Z would be decreased or increased if one unit of given variable is
added to the new solution. Each of the values in j = Zj – cj row, represents
the net amount of decrease or increase in the objective function that would
occur when one unit of variable represented by the column head is introduced
into the solution.
Step 4 : Apply Optimality Test
Compute the net evaluation j for each variable 𝑥𝑗 (of the column vector
𝑋𝑗 ) by using the following formula :
j = Zj – cj = CBXj – cj
Now, examine the values of j. regarding the solution of LPP under
consideration using the following criteria :
(i) Optimality Criterion : If all j (= Zj – cj) 0, then the basic feasible
solution of a linear programming problem under the test is unique and
optimal.
(ii) Improvement Criterion : If at least one j is negative i.e. at least one
j = (Zj – cj) < 0, then the basic feasible solution of the LPP under the test is
not optimal and we proceed to improve the solution in the next step.
(iii) Unboundedness Criterion : If corresponding to any negative j (= Zj–
cj), all the elements (entries) of the column Xj are negative or zero (i.e. 0),
then the basic feasible solution of the LPP under test is unbounded.
(iv) Multiplicity Criterion : If at the optimal stage, there exists some columns
corresponding to non-basic variables, where j = Zj – cj = 0 and at least one
element (entry) of the column Xj is positive (i.e. > 0), then the optimal basic
feasible solution of the LPP under the test is not unique, but there are multiple
optimal solutions.
Step 5 : Improvement in Basic Feasible Solution
This step consists of two sub-steps as given below :
(i) Identification of Incoming and Outgoing Variables : In order to improve
the basic feasible solution, the vector entering the basis matrix and the vector
to be removed from the basis matrix are determined by the following rules.
Such vectors are usually named as 'incoming vector' and 'outgoing vector'
respectively.
If there are more than one negative j, then the incoming variable is the
one that heads the column containing the most negative value of j, say k.
The column containing it, is known as the key column or pivot column. The
key column is marked by an upward arrow () at the bottom in the simplex
table. If more than one variable has the same most negative value of j, then
any of these variables may be selected arbitrarily as the incoming variable.
Thus, the incoming vector Xk is always selected corresponding to the most
negative value of j.
Now, divide the elements (entries) under XB column by the
corresponding elements (entries) of the key column and select the row
containing the minimum positive ratio. Then replace the corresponding basic
variable which is termed as the outgoing variable by making its value zero.
The corresponding row is called the key row or pivot row. The rule (i.e. the
criterion) for selecting the pivot row is known as the bottleneck criterion. The
key row is marked by a downward arrow () at the bottom in the simplex
table. The element at the intersection of the key row and the key column is
called the key element or pivot element. The key element is marked in the
simplex table by enrectangling it in a box ''.
Thus, the outgoing vector r is selected corresponding to the minimum
ratio of elements (entries) of XB by the corresponding positive elements
(entries) of the predetermined incoming vector Xk. The rule for determining
the key element is called the minimum ratio rule.
(ii) Iteration towards Optimal Solution : Drop the outgoing variable and
introduce the incoming variable along with its associated value under CB
column. Now, if the key element is unity, then the row remains the same in the
new simplex table. If the key elements other than unity, then convert it to unity
by dividing the key row by the key element. Then, subtract appropriate
multiples of this new row from the other (remaining) rows, so as to obtain
zeros in the remaining positions of the key column. The operations involved in
making the elements zero in remaining positions of the key column are called
elementary row operations. The new entries in the key row and in the
remaining rows are updated in the new simplex table.
Now, the new entries in CB and XB columns are updated in the new
simplex table of the current solution.
Step 6 : Repeat the Procedure
Go to step 4 and repeat the procedure until all entries in j (= Zj – cj)
row are either negative or zero i.e. we repeat the computational procedure until
an optimal or an unbounded solution is obtained.
Now, we shall consider the following illustrative examples to understand
the simplex algorithm.
ILLUSTRATIVE EXAMPLES
Example 1. Using simplex method, solve the following LPP :
Maximize Z = 3x1 + 2x2 subject to x1 + x2 4, x1 – x2 2 and x1 0, x2 0.
Solution. Introducing the slack variables s1 and s2, the given LPP can be
written in standard form as :
Maximize Z = 3x1 + 2x2 + 0s1 + 0s2 ...(i)
subject to the constraints x1 + x2 + s1 + 0s2 = 4 ...(ii)
x1 – x2 + 0s1 + s2 = 2 ...(iii)
and x1 0, x2 0, s1 0, s2 0 ...(iv)
Remembering that the starting simplex table has the values of non-basic
variables zero always, we take 𝑥1 = 𝑥2 = 0. Therefore, the complete starting
(initial) basic feasible solution is obtained by putting 𝑥1 = 𝑥2 = 0 in the
constraint equations (ii) and (iii) which give us s1 = 4 and s2 = 2.
The value of the objective function Z given by (i) is Z = 0.
Thus, the complete initial basic feasible solution of the LPP is :
x1 = x2 = 0 (non-basic solution)
and s1 = 4, s2 = 2 (basic solution) with Z = 0.
We, now construct the starting Simplex Tables I as follows :
Table I : Starting Simplex Table
Basic cj→ 3 2 0 0 Minimum
Variables Ratio
CB XB X1 X2 X3(or S1) X4(or S2) 𝑋
= 𝐵 , Xk>0
𝑋𝑘
(= 1) (= 2)
s1 0 4 1 1 1 0
s2 0 2 1 –1 0 1
𝑥 𝑥 𝑥 4 2 2
For k = 1, we have 𝑥 𝐵 = min [ 𝑥𝐵1 , 𝑥𝐵2 ] = min[1 , 1] = 1.
𝑟𝑙 11 21
𝑥𝐵𝑟 2 𝑥𝐵2
or = =
𝑥𝑟𝑙 1 𝑥21
Comparing both sides of this equation, we get r = 2. So, the vector 2
i.e. X4 (= S2) marked with downward arrow () in the Simplex Table II-A
should be removed from the basis matrix.
Now, we construct the simplex table II-A which is a modified form of
the simplex table I.
Table II-A : Modified Simplex Table
0
Now, in order to bring 2 = [ ] in place of incoming (entering) vector
1
1
X1= [ ], the unit element must occupy in the marked position '□' and zero at
1
all other places of column vector X1. If the number in marked position '□' is
other than unity, then we divide all elements of that row by the key element.
The element at the intersection of minimum ratio arrow () and incoming
Leaving Vector
vector arrow () is calledEntering
the key Vector
element or pivot element.
(Outgoing Vector)
(Incoming Vector)
Now, we subtract the appropriate multiplies of this new row from the
other (remaining) rows, so as to obtain zeros in the remaining positions (other
than the key element position) of the column X1.
Thus, the process can be fortified by simple matrix transformation as
follows :
The intermediate coefficient matrix is given as follows :
Row XB X1 X2 X3(=S1 = 1) X4(=S2 = 2)
R1 4 2 1 1 0
R2 2 1 –1 0 1
Therefore, we remove the vector 1 from the basis matrix. Hence, the
key element is 2. Therefore, we divide the first row of the Simplex Table II-B
by the key element 2 to have the following intermediate coefficient matrix :
From the above Simplex Table III, we see that all j's are 0, therefore,
the improved solution read from the Simplex Table III is given by
x1 = 3, x2 = 1, s1 = 0, s2 = 0 with Z = 11
The above computations may be put in a single table as given below :
Variables
CB XB X1 X2 S1 S2 =𝑋𝑋𝐵, Xk>0
𝑘
s1 0 4 1 1 1 0 4/1
Simplex Table 1
s2 0 2 1 –1 0 1 2/1, min.
x1 = x2 = 0 Z=CB XB = 0 0 0 0 0 Zj=CBXj
(non-basic
–3↑ –2 0 0↓ j= Zj – cj
variables)
3 2 2/(–1), negative
→ x1 1 –1 0 1
(not to be taken)
x2 = s2 = 0 Z= CB XB = 6 3 –3 0 3 Zj=CBXj
(non-basic
0 –5 0 3 j= Zj – cj
variables)
→x2 2 1 0 1 1/2 –1/2 No need to calculate
Simplex Table 3
Thus, from the last simplex table, it is clear that all j's are 0,
indicating that we have arrived at optimal solution which is given by x1 = 3,
x2 = 1 and Zmax = 11.
This solution is the optimal solution because all j's are non-negative in
this case. Hence, the optimal solution of the given LPP by simplex method is
given by x1 = 3 and x2 = 1 with Zmax = 11.
Remarks for Quick Solution in Simplex Algorithm :
1. In the first iteration only, since j's are the same as –cj's, so there is no need
of calculating them separately by using the formula j = CBXj – cj = Zj – cj.
2. Mark min (j) by '' which at once indicates the column Xk needed for
computing the minimum ratio (XB/Xk).
3. Key element is found at the place where the upward directed arrow of min
j and the left directed arrow () of minimum ratio (XB/Xk) intersect each
other in the simplex table.
4. Key element indicates that the current table must be transformed in such a way
that the key element becomes 1 and all other elements in that column become 0.
5. Since j's corresponding to unit column vectors are always zero, there is no
need of calculating them.
6. While transforming the table by elementary row operations, the value of Z
and corresponding j's are also computed at the same time. Thus, a lot of time
and labour can be saved in adopting this technique.
7. Sometimes, the lower bounds may be specified in a linear programming
problem. For example, it may be stipulated that x1 cannot be less than c1 and
x2 cannot be less than c2 i.e. x1 c1 and x2 c2. Such constraints can be easily
handled by substituting x1 = c1 + y1 and x2 = c2 + y2 in the model and then
solving it in terms of y1 and y2.
8. Sometimes, the objective function of an LPP contains a constant term. In
this case, the simplex method may be applied by excluding the constant and
the optimal solution may be obtained. The constant is then added at the end to
find the optimal value of the objective function.
9. In all the simplex tables, there must be an identity matrix of size m × m,
where m is the number of constraints in the given LPP. The columns that
constitute such an identity matrix need not be adjacent columns.
Example 2. Using simplex method, solve the following LPP :
Maximize Z = 3x1 + 2x2 + 5x3 subject to x1 + 2x2 + x3 430,
3x1 + 0x2 + 2x3 460, x1 + 4x2 + 0x3 420 and x1 0, x2 0, x3 0.
Solution. Introducing the slack variables s1, s2 and s3, the given LPP can be
written in standard form as :
Maximize Z = 3x1 + 2x2 + 5x3 + 0s1 + 0s2 + 0s3 ...(i)
subject to 1x1 + 2x2 + 1x3 + 1s1 + 0s2 + 0s3 = 430 ...(ii)
3x1 + 0x2 + 2x3 + 0s1 + 1s2 + 0s3 = 460 ...(iii)
1x1 + 4x2 + 0x3 + 0s1 + 0s2 + 1s3 = 420 ...(iv)
and x1 0, x2 0, x3 0, s1 0, s2 0, s3 0 ...(v)
The initial basic feasible solution of the above LPP is obtained (by
putting x1 = x2 = x3 = 0) as follows : s1 = 430, s2 = 460, s3 = 420 with Z = 0.
Now, we construct the simplex table as follows :
Basic cj→ 3 2 5 0 0 0 Minimum Ratio
Table No.
Simplex
𝑋
Variables = 𝐵, Xk>0
CB XB X1 X2 X3 S1 S2 S3 𝑋𝑘
x1 = s1 = s2 = 0 Z=CBXB 7 2 5 1 2 0 Zj=CBXj
(non-basic = 1350
4 0 0 1 2 0 j= Zj – cj
variables)
From the last Simplex Table (Simplex Table No 3), we see that all
entries in net evaluation row are 0 i.e. all j 0. Therefore, we have arrived
at the optimal solution given as follows :
x1 = 0, x2 = 100, x3 = 230 and Zmax = 1350.
Example 3. Using simplex method, solve the following linear programming
problem :
Minimize Z = x1 – 3x2 + 2x3 subject to 3x1 – x2 + 3x3 7,
– 2x1 + 4x2 12, – 4x1 + 3x2 + 8x3 10 and x1 0, x2 0, x3 0.
Solution. The given LPP is of minimization type. Therefore, converting the
objective function of it from minimization to maximization type, we have
Maximize Z = Maximize (– Z) = – x1 + 3x2 – 2x3
Again, introducing the slack variables s1, s2 and s3, the given LPP can be
written in standard form as :
Maximize Z = – x1 + 3x2 – 2x3, where Z = – Z ...(i)
subject to the constraints :
3x1 – x2 + 3x3 + s1 + 0s2 + 0s3 = 7 ...(ii)
– 2x1 + 4x2 + 0x3 + 0s1 + s2 + 0s3 = 12 ...(iii)
– 4x1 + 3x2 + 8x3 + 0s1 + 0s2 + s3 = 10 ...(iv)
and x1 0, x2 0, x3 0, s1 0, s2 0, s3 0 ...(v)
The initial basic feasible solution is obtained (by putting x1 = x2 = x3 = 0)
as follows :
s1 = 7, s2 = 12, s3 = 10 with Z = 0 and Z = 0.
Now, we construct the simplex table as follows :
Basic cj→ -1 3 -2 0 0 0 Minimum Ratio
Table No.
Simplex
𝑋
Variables = 𝐵, Xk>0
CB XB X1 X2 X3 S1 S2 S3 𝑋𝑘
s1 0 7 3 -1 3 1 0 0 7/(–1), negative
Simplex Table 1
s2 0 12 -2 4 0 0 1 0 12/4, min.
0 10 -4 3 8 0 0 1 10/3
s3
s3 0 11 0 0 11 1 -1/2 1
From the last Simplex Table (Simplex Table 3), we see that all entries in
the net evaluation row are greater than or equal to zero i.e. all j 0.
Therefore, we have arrived at the optimal solution given as follows:
x1 = 4, x2 = 5, x3 = 0, s1 = 0, s2 = 0, s3 = 11 with Zmax = 11.
Hence, the optimal solution to the given LPP is :
x1 = 4, x2 = 5, x3 = 0 and Zmin = – 11.
Example 4. Solve the following LPP by simplex method :
Maximize Z = 3x1 + 5x2 + 4x3 subject to 2x1 + 3x2 8, 2x2 + 5x3 10,
3x1 + 2x2 + 4x3 15 and x1 0, x2 0, x3 0.
Solution. Introducing the slack variables s1, s2 and s3, the given LPP can be
written in standard form as :
Maximize Z = 3x1 + 5x2 + 4x3 + s1 + 0s2 + 0s3 ...(i)
subject to the constraints :
2x1 + 3x2 + 0x3 + s1 + 0s2 + 0s3 = 8 ...(ii)
0x1 + 2x2 + 5x3 + 0s1 + s2 + 0s3 = 10 ...(iii)
3x1 + 2x2 + 4x3 + 0s1 + 0s2 + s3 = 15 ...(iv)
and x1 0, x2 0, x3 0, s1 0, s2 0, s3 0 ...(v)
The initial basic feasible solution is obtained by putting x1 = x2 = x3 = 0
in (ii), (iii) and (iv) as follows :
s1 = 8, s2 = 10, s3 = 15 with Z = 0.
Now, we construct the simplex table as follows :
Basic cj→ 3 5 4 0 0 0 Minimum Ratio
Table No.
Simplex
𝑋
Variables = 𝐵, Xk>0
CB XB X1 X2 X3 S1 S2 S3 𝑋𝑘
s1 0 8 2 3 0 1 0 0 8/3, min.
Simplex Table 1
s2 0 10 0 2 5 0 1 0 10/2
0 15 3 2 4 0 0 1 15/2
s3
x3 4 62/41
1 0 0 –2/41 –12/41 15/41
→x1
3 89/41 as all j 0
From the last simplex table, we see that all j 0. Thus, we have arrived
at the optimal solution, which is given as follows :
x1 = 89/41, x2 = 50/41, x3 = 62/41 and Zmax = 765/41.
EXERCISE 1
Solve the following linear programming problems by simplex method :
1. Maximize Z = 5x1 + 3x2 2. Maximize Z = 7x1 + 5x2
subject to the constraints : subject to the constraints :
3x1 + 5x2 15, 5x1 + 2x2 10 – x1 – 2x2 – 6, 4x1 + 3x2 2
and x1 0, x2, 0. and x1 0, x2 0.
3. Maximize Z = x1 – x2 + 3x3 4. Maximize Z = 2x1 + 4x2 + 3x3
subject to the constraints : subject to the constraints :
x1 + x2 + x3 10 3x1 + 4x2 + 2x3 60
2x1 – x3 2 2x1 + x2 + 2x3 40
2x1 – 2x2 + 3x3 0 x1 + 3x2 + 2x3 80
and x1 0, x2 0, x3 0. and x1 0, x2 0, x3 0.
5. Minimize Z = x1 – 3x2 + 2x3 6. Minimize Z = x1 – 3x2 + 3x3
subject to the constraints : subject to the constraints :
3x1 – x2 + 2x3 7 3x1 – x2 + 2x3 7
– 2x1 + 4x2 12 2x1 + 4x2 – 12
– 4x1 + 3x2 + 8x3 10 – 4x1 + 3x2 + 8x3 10
and x1 0, x2 0, x3 0. and x1 0, x2 0, x3 0.
7. Maximize Z = 15x1 + 6x2 + 9x3 + 2x4 8. Maximize Z = 30x1 + 23x2 + 21x3
subject to the constraints : subject to the constraints :
2x1 + x2 + 5x3 + 6x4 20 6x1 + 5x2 + 3x3 52
3x1 + x2 + 3x3 + 25x4 24 6x1 + 2x2 + 5x3 14
5x1 + x4 70 and x1 0, x2 0, x3 0.
and x1 0, x2 0, x3 0, x4 0.
9. A farmer has 1,000 acres of land on which he can grow corn, wheat or
soyabeans. Each acre of corn costs ₹ 100 for preparation, requires 7 man-days
of work and yields a profit of ₹ 30. Each acre of wheat costs ₹ 120 for
preparation, requires 10 man-days of work and yields a profit of ₹ 40. Each
acre of soyabeans costs ₹ 70 for preparation, requires 8 man-days of work and
yields a profit of ₹ 20. If the farmer has ₹ 1,00,000 for preperation and can
count on 8,000 man-days of work, then how many acres of land should be
allocated to each crop to maximize the profit ?
ANSWERS
1. x1 = 20/19, x2 = 45/19 and Zmax = 235/19.
2. x1 = 3, x2 = 0 and Zmax = 21.
3. x1 = 0, x2 = 6, x3 = 4 and Zmax = 6.
4. x1 = 0, x2 = 20/3, x3 = 50/7 and Zmax = 250/3.
5. x1 = 4, x2 = 5, x3 = 0 and Zmin = – 11.
6. x1 = 31/5, x2 = 58/5, x3 = 0 and Zmin = – 143/5.
7. x1 = 4, x2 = 12, x3 = 0, x4 = 0 and Zmax = 132.
8. x1 = 0, x2 = 7, x3 = 0 and Zmax = 161.
9. The LPP is : Maximize Z = 30x1 + 40x2 + 20x3 subject to 10x1 + 12x2 + 7x3
10,000, 7x1 + 10x2 + 8x3 8,000, x1 + x2 + x3 1,000 and x1 0, x2 0, x3 0
where x1, x2 and x3 are acres of land to be allocated for corn, wheat and
soyabeans respectively.
Solution is x1 = 250 acres, x2 = 625 acres, x3 = 0 acres and Zmax = ₹ 32,500
ILLUSTRATIVE EXAMPLES
Example 1. Solve the following LPP by Charne's Penalty Method :
Maximize Z = – x1 – x2 – x3 subject to x1 – x2 + 2x3 = 2,
– x1 + 2x2 – x3 = 1 and x1 0, x2 0, x3 0.
Solution. Introducing the artificial variables a1 and a2 (and hence the artificial
vectors A1 and A2) in the given constraints respectively and assigning – M (M
> 0) cost to these variables in the given objective function, the given LPP can
be written in standard form as :
Maximize Z = – x1 – x2 – x3 – Ma1 – Ma2 ...(i)
subject to x1 – x2 + 2x3 + a1 + 0a2 = 2 ...(ii)
– x1 + 2x2 – x3 + 0a1 + a2 = 1 ...(iii)
and x1 0, x2 0, x3 0, a1 0, a2 0 ...(iv)
The initial basic feasible solution is obtained [by putting x1 = x2 = x3 = 0
in (ii) and (iii)] as : a1 = 2 and a2 = 1.
We now construct the simplex table for solution as follows :
Basic cj→ –1 –1 –1 –M –M Minimum Ratio
Table No.
Simplex
𝑋
Variables = 𝐵, Xk>0
CB XB X1 X2 X3 A1 A2 𝑋𝑘
a2 –M 1 –1 2 –1 0 1 1/(–1),
negative
x1 = x2 = x3=0, Z=CBXB =–3M 0 –M –M –M –M Zj=CBXj
(non-basic
1 –M+1 –M+1↑ 0↓ j= Zj – cj
variables)
→x3 –1 1 1/2 –1/2 1 x 0 1/(–1/2),
Simplex Table 2
negative
→a2 –M 2 –1/2 3/2 0 x 1
(3/2), min.
x1= x2=a1 = 0 Z=CBXB= M/2–1/2 –3M/2+1/2 –1 x –M Zj=CBXj
(non-basic –2M–1
M/2+1/2 –3M/2+3/2 ↑0 x 0↓ j= Zj – cj
variables)
𝑋
Variables = 𝐵, Xk>0
CB XB X1 X2 S1 S2 S3 A1 A2 A3 𝑋𝑘
a3 –M 30 1 2 0 0 –1 0 0 1 30/1
–2 63/5 min.
→x2 0 1 1/5 0 –3/5 x 0 x
(63/5)/(–3/5), negative
x3= Z = CBXB= –4 –2 –M/5+6/5 M –2M/5+2/5 x –M x Zj=CBXj
s1=s2=s3=a1= –18M/5 –222/5
From the last simplex table, we see that there remains no artificial
variables in the basis matrix and the optimality condition is satisfied i.e. all
j 0, therefore, we have arrived at an optimal solution which is x1 = 3,
x2 = 18 with Zmax = – 48.
Therefore, the optimal solution to the given LPP is :
x1 = 3, x2 = 18 and Zmin = 48.
Example 3. Use Charne's method of penalty to solve the following linear
programming problem :
Minimize Z = 2x1 + x2 subject to 3x1 + x2 = 3, 4x1 + 3x2 6, x1 + 2x2 3
and x1 0, x2 0.
Solution. The second and the third inequality constraints are converted into
equality constraints by introducing the surplus variable s1 and the slack
variable s2 respectively. Also, introducing the artificial variables a1 and a2 in
the first and second constraints respectively (because of being '=' and '' type)
and hence the artificial vectors A1 and A2 and after converting the
minimization type of objective function into the maximization type and then
assigning – M, (M > 0) cost to the artificial variables in the objective function,
the given LPP in standard form can be written as :
Maximize Z = – 2x1 – x2 + 0s1 + 0s2 – Ma1 – Ma2 ...(i)
subject to 3x1 + x2 + 0s1 + 0s2 + a1 + 0a2 = 3 ...(ii)
4x1 + 3x2 – s1 + 0s2 + 0a1 + a2 = 6 ...(iii)
x1 + 2x2 + 0s1 + s2 + 0a1 + 0a2 = 3 ...(iv)
and x1 0, x2 0, s1 0, s2 0, a1 0, a2 0 ...(v)
where Z’ = – Z.
The initial basic feasible solution is obtained [by putting x1 = x2 = s1 = 0
in (ii), (iii) and (iv)] as follows :
a1 = 3, a2 = 6 and s2 = 3.
We now construct the simplex table for solution as follows :
𝑋
Variables = 𝑋𝐵, Xk>0
CBXB X1 X2 S1 S2 A1 A2 𝑘
s2 0 3 1 2 0 1 0 0 3/1 = 3
s2 0 0 0 0 1 1 x x as all j 0
s1= a1=a2=0 Z = CBXB –2 –1 1/5 0 x x Zj=CBXj
(non-basic
variables) = –12/5 0 0 1/5 0 x x j= Zj – cj
From the last simplex table, we see that there remains no artificial
variables in the basis matrix and the optimality condition is satisfied i.e. all
j 0, therefore, we have arrived at an optimal solution which is given by
x1 = 3/5, x2 = 6/5 with Zmax = – 12/5.
Hence, the optimal solution to the given LPP is :
x1 = 3/5, x2 = 6/5 and Zmin. = 12/5.
Example 4. Use Big-M method to solve the following LPP :
Maximize Z = 3x1 + 2x2 subject to 2x1 + x2 2, 3x1 + 4x2 12
and x1 0, x2 0.
Solution. The inequality constraints are converted into equality constraints by
introducing the slack variable s1 and the surplus variable s2 respectively in the
first and second constraints. Also, the second constraint being of '³' type, we
introduce the artificial variable 'a' in it and hence the artificial vector 'A'.
Assigning the cost –M (M > 0) to the artificial variable 'a' in the objective
function, the given LPP can be written in standard form as :
Maximize Z = 3x1 + 2x2 + 0s1 + 0s2 – Ma ...(i)
subject to 2x1 + x2 + s1 + 0s2 + 0a = 2 ...(ii)
3x1 + 4x2 + 0s1 – s2 + a = 12 ...(iii)
and x1 0, x2 0, s1 0, s2 0, a 0 ...(iv)
The initial basic feasible solution is obtained [by putting x1 = x2 = s2 = 0
in equations (ii) and (iii)] as : s1 = 2 and a = 12.
We now construct the simplex table for solution as follows :
Basic cj→ 3 2 0 0 –M Minimum Ratio
Simplex
TableN
𝑋
= 𝑋𝐵, Xk>0
o.
Variables 𝑘
CB XB X1 X2 S1 S2 A
a –M 12 3 4 0 –1 12/4
x1=x2= s2=0 Z=CBXB=–12M –3M –4M 0 M –M Zj=CBXj
(non-basic
variables) –3M–3 –4M–2↑ 0 M ↓ j= Zj – cj
a –M 4 –5 0 –4 –1 1 as all j 0
From the last simplex table, we see that the artificial variable appears in
the basis matrix at non-zero level and the optimality condition is satisfied i.e.
all j 0, therefore, there exists a pseudo-optimal basic feasible solution to
the given LPP.
Example 5. Use Big-M method to solve the following LPP :
Maximize Z = 8x2 , subject to x1 – x2 0 and 2x1 + 3x2 – 6, where x1
and x2 are unrestricted in sign.
Solution. Writing x1 = x1 – x1 and x2 = x2 – x2 and introducing the surplus
variables s1 and s2 in the first and second constraints respectvely and the
artificial variables 'a1' and 'a2' in the firstand second constraints respectively
and then assigning –M (M > 0) cost to the artificial variables 'a1' and 'a2' in the
objective function, the given LPP can be written in standard form as :
Maximize Z = 0x1 – 0x1 + 8x2 – 8x2 + 0s1 + 0s2 – Ma1 – Ma2 ...(i)
subject to x1 – x1 – x2 + x2 – s1 + 0s2 + a1 + 0a2 = 0 ...(ii)
– 2x1 + 2x1 – 3x2 + 3x2 + 0s1 – s2 + 0a1 + a2 = 6 ...(iii)
and x1 0, x1 0, x2 0, x2 0, s1 0, s2 0, a1 0, a2 0 ...(iv)
The initial basic feasible solution is obtained [by putting x1 = x1 = x2 =
x2 = s1 = s2 = 0 in (ii) and (iii)] as follows : a1 = 0 and a2 = 6
We now construct the simplex table for solution as follows :
Basic cj→ 0 0 8 –8 0 0 –M –M Minimum Ratio
Table No.
Simplex
𝑋
Variables = 𝐵, Xk>0
CB XB X1 X1 X2 X2 S1 S2 A1 A2 𝑋𝑘
a2 –2 2 –3 3 0 –1 0 1 6/3
x’1= x’’1= x’2=x’’2
Z=CBXB= M –M 4M –4M M M –M –M Zj=CBXj
=s1=s2=0
– 6M
(non-basic M –M 4M–8 –4M+8↑ M M 0 0↓ j= Zj – cj
variables)
→x2 –8 0 1 –1 –1 1 –1 0 x 0 0/(–1), negative
Simplex Table 2
Table
ex
From the last simplex table, we see that there remains no artificial
variables in the basis matrix. Therefore, we have arrived at an optimal solution
which is given by
x1 = 0, x1 = 6/5, x2 = 0, x2 = 6/5 with Zmax = 48/5.
Hence, the optimal solution of the given LPP is :
x1 = – 6/5, x2 = – 6/5 and Zmax = – 48/5.
Note : When the range of any variable is not given in the LPP, it should be
understood that such variable is unrestricted in sign.
EXERCISE 2
Use Charne's method of penalty to solve the following linear
programming problems :
1. Maximize Z = 5x1 – 2x2 – x3 2. Maximize Z = 3x1 + 2.5 x2
subject to the constraitns : subject to the constraints :
2x1 + 2x2 – x3 2, x1 +2x2 20,
3x1 – 4x2 3, 3x1 + 2x 50
x2 + 3x3 5 and x1 0, x2 0.
and x1 0, x2 0, x3 0.
3. Maximize Z = 3x1 + 2x2 4. Minimize Z = 4x1 + 2x2
subject to the constraints : subject to the constraints :
2x1 + x2 2, 3x1 + x2 27,
3x1 + 4x2 12 x1 + x2 21
and x1 0, x2 0. and x1 0, x2 0.
5. Minimize Z = 2x1 + 9x2 + x3 6. Minimize Z = x1 + x2 + 3x3
subject to the constraints : subject to the constraints :
x1 + 4x2 + 2x3 5, 3x1 + 2x2 + x3 3,
3x1 + x2 + 2x3 4 2x1 + x2 + 2x3 3
and x1 0, x2 0, x3 0. and x1 0, x2 0, x3 0.
7. Minimize Z = 3x1 + 2x2 + x3 subject to 2x1 + 5x2 + x3 = 12, 3x1 + 4x2 = 11
and x1is unrestricted in sign, whereas x2 0 and x3 0.
8. Maximize Z = 2x1 + 4x2 + x3 9. Maximize Z = 2x1 + 3x2 + 5x3
subject to the constraints : subject to the constraints :
x1 – 2x2 + x3 5, 3x1 + 10x2 + 5x3 15,
2x1 – x2 + 2x3 = 2, 33x1 – 10x2 + 9x3 33,
– x1 + 2x2 + 2x3 1 x1 + 2x2 + x3 4
and x1, 0 x2 0, x3 0. and x1 0, x2 0, x3 0.
I 2 4 3 9
II 4 3 2 10
Orders in Hand 50 24 60
costs are given below together with current orders in hand for each product :
Find the production hours for the manufacturing plants needed to fulfil
the orders in hand on a minimum cost.
ANSWERS
1. x1 = 13/9, x2 = 1/3, x3 = 14/9 Zmax = 5 2. Unbounded solution.
3. Pseudo-optimal basic feasible solution. 4. x1 = 3, x2 = 18, Zmin. = 48.
5. x1 = 0, x2 = 0, x3 = 5/2, Zmin. = 5/2.
6. x1 = 3/4, x2 = 0, x3 = 3/4, Zmin. = 3.
7. x1 = 11/3, x2 = 0, x3 = 14/3 and Zmin. = 47/3