Skip to main content
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
1
Linear Programming: Simplex Method
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
2
“Checking the result of a decision against its
expectations shows executives what their strengths
are, where they need to improve, and where they
lack knowledge or information.”
Peter Drucker
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
3
Introduction
In mathematics the word simplex represents an object in n-dimensional space connecting n+1
points. In one dimension, a simplex is a line segment connecting two points; in two
dimensions, it is a triangle formed by joining three points; in three dimensions, it is a four
sided pyramid having four corners.
In graphical method, extreme points of the feasible solution space are examined to search for
optimal solution at one of them. For LP problems with several variables, it may not be
possible to graph the feasible region, but the optimal solution will still lie at an extreme point
of multidimensional (called an n-dimensional polyhedron) feasible solution space.
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
4
Simplex Method
The simplex method also examines the extreme points, repeating the same set of steps of the
algorithm as a graphical method until an optimal solution is reached, and hence also called the
iterative method.
Since the number of extreme points (corners or vertices) of feasible solution space are finite, the
method assures an improvement in the value of objective function as we move from one iteration
(extreme point) to another and achieve optimal solution in a finite number of steps and also
indicates when an unbounded solution is reached.
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
5
Linear Programming
. . . Simplex Method
 All constraints should be expressed as equations by adding slack or surplus and/or artificial
variables.
 The objective function should be of the maximization type.
 The right-hand side of each constraint should be made non-negative; if it is not, this should
be done by multiplying both sides of the resulting constraint by – 1.
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
6
Simplex Method
Standard Form of LP Problem
All constraints should be expressed as equations by adding slack or surplus and/or artificial
variables.
The right-hand side of each constraint should be made non-negative; if it is not, this should be
done by multiplying both sides of the resulting constraint by – 1.
The objective function should be of the maximization type
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
7
Simplex Method
Standard Form
Optimize (Max or Min) Z = c1 x1 + c2 x2 + . . . + cn xn + 0s1 + 0s2 + . . . + 0sm
subject to the linear constraints
a11 x1 + a12 x2 + . . . + a1n xn + s1 = b1
a21 x1 + a22 x2 + . . . + a2n xn + s2 = b2
. . .
. . .
. . .
am1 x1+ am2 x2 + . . . + amn xn + sm = bm
and x1, x2, . . . , xn, s1, s2, . . ., sm ³ 0
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
8
Simplex Method
Variables
Three types of additional variables,
namely
The variables are added in the given LP problem to convert it into the standard form for the
following reasons:
slack variables (s)
surplus variables (– s), and
artificial variables (A)
(a) These variables allow us to convert inequalities into equalities, thereby converting the
given LP problem into a form that is amenable to algebraic solution.
(b) These variables permit us to make a more comprehensive economic interpretation of a
final solution.
(c) Help us to get an initial feasible solution represented by the columns of the identity
matrix.
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
9
Simplex Method
. . . Simplex Method
Types of Extra Variable Coefficient of Extra Presence of Extra
Constraint Needed Variables in the Variables in the
Objective Function Initial Solution Mix
Max Z Min Z
Less than or A slack variable 0 0 Yes
equal to (£) is added
Greater than or A surplus variable 0 0 No
equal to (³) is subtracted, and
an artificial variable – M + M Yes
is added
Equal to (=) Only an artificial – M + M Yes
variable is added.
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
10
Simplex Method
Simplex Algorithm (Maximization Case)
Step 1: Formulation of the mathematical model
a)Formulate the mathematical model of the given linear programming problem
b)If the objective function is of minimization, then convert it into one of maximization by using
the following relationship
Minimize Z = – Maximize Z* ; where Z* = – Z.
c)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 £ type constraint to a ³ type constraint, and vice versa.
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
11
d) Express the mathematical model of the given LP problem in the standard form by adding
additional variables to the left side of each constraint and assign a zero-cost coefficient to these in
the objective function.
e) Replace each unrestricted variable with the difference of two non negative variables; replace
each non-positive variable with a new non-negative variable whose value is the negative
of the original variable.
Write down the coefficients of all the variables in the LP model in the tabular form, as shown in
the table to get an initial basic feasible solution[xB = B–1
b].
Step 2: Set-up the initial solution
Simplex Method
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
12
Simplex Method
Initial Simplex Table
Cj ® c1 c2 … cn 0 0 … 0
Coefficient of
Basic Variables
(cB)
Variables
in Basis
B
Value of Basic
Variables
b (= xB)
Variables
x1 x2 … xn s1 s2 . . . sm
cB1 s1 xB1 = b1 a11 a12 … a1n 1 0 … 0
cB2 s2 xB2 = b2 a21 a22 … a2n 0 1 … 0
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
cBm sm xBm = bm am1 am2 … amn 0 0 0 0
Z = S cBi xBi Zj = S cBi xj
0 0 … 0 0 0 … 0
c1 – z1 c2–z2 …cn–zn 0 0 … 0
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
13
Simplex Method
The values zj represent the amount by which the value of objective function would be decreased
(or increased) if one unit of given variable is added to the new solution.
That is:
cj – zj (net effect) = cj (incoming unit profit/cost) – zj (outgoing total profit/cost)
where zj = Coefficient of basic variables column × Exchange coefficient column j
Each of the values in the cj – zj row represents the net amount of increase (or decrease) in the
objective function that would occur when one unit of variable represented by the column head is
introduced into the solution.
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
14
Simplex Method
Step 3: Test for optimality
If all cj – zj £ 0, then the basic feasible solution is optimal.
If at least one column of the coefficients matrix (i.e. ak ) for which ck – zk > 0 and all elements
are negative (i.e. aik < 0), then there exists an unbounded solution to the given problem.
If at least one cj – zj > 0 and each of these has at least one positive element (i.e. aij ) for some
row, then it indicates that an improvement in the value of objective function Z is possible.
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
15
Simplex Method
If Case (iii) of Step 3 holds, then select a variable that has the largest cj – zj value to enter into
the new solution. That is
ck – zk = Max {(cj – zj); cj – zj > 0}
Step 4: Select the variable to enter the basis
The column to be entered is called the key (or pivot) column. Such a variable indicates the largest
per unit improvement in the current solution.
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
16
Simplex Method
Each number in xB-column (i.e. bi values) is divided by the corresponding (but positive) number
in the key column and a row is selected for which this ratio, [(constant column)/(key column)] is
non-negative and minimum. This ratio is called the replacement (exchange) ratio. That is,
Step 5: Test for feasibility (variable to leave the basis)
x
a
Br
rj
Min x
rj
rj
;
Bi
a
a > 0
=
This ratio limits the number of units of incoming variable that can be obtained from the
exchange. It may be noted here that division by negative or zero element in key column is not
permitted.
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
17
Simplex Method
If the key element is 1, then the row remains the same in the new simplex table.
Step 6: Finding the new solution
If the key element is other than 1, then divide each element in the key row (including elements in
xB-column) by the key element, to find the new values for that row.
The new values of the elements in the remaining rows for the new simplex table can be obtained
by performing elementary row operations on all rows so that all elements except the key element
in the key column are zero.
Number in
new row
Number in
old row
Number above or below
Key element
Corresponding number in the
new row, that is row replaced in
Step 6 (ii)
= +
The new entries in cB (coefficient of basic variables) and xB (value of basic
variables) columns are updated in the new simplex table of the current solution.
For each row other than the key row, use the formula:
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
18
Simplex Method
Step 7: Repeat the procedure
Go to Step 3 and repeat the procedure until all entries in the cj – zj row are either
negative or zero.
Example 1: Use the simplex method to solve the following LP problem.
Maximize Z = 3x1 + 5x2 + 4x3
subject to the constraints
2x1 + 3x2 £ 8
2x2 + 5x3 £ 10
3x1 + x2 + 4x3 £ 15
and x1, x2, x 3 > 0
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
19
subject to the constraints
Simplex Method
Solution
Step 1: Introducing non-negative slack variables s1, s2 and s3 to convert inequality
constraints to equality. Then the LP problem becomes
Maximize Z = 3x1 + 5x2 + 4x3 + 0s1 + 0s2 + 0s3
2x1 + 3x2 + s1 = 8
2x2 + 5x3 + s2 = 10
3x1 + 2x2 + 4x3 + s3 = 15
and x1, x2, x3, s1, s2, s3 ³ 0
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
20
Simplex Method
Step 2: Since all bi (RHS values) > 0, (i = 1, 2, 3) we can choose initial basic feasible solution
as: x1 = x2 = x3 = 0 ; s1 = 8, s2 = 10, s3 = 15 and Max Z = 0
This solution can also be read from the initial simplex Table by equating row wise
values in the basis (B) column and solution values (xB ) column.
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
21
That is, z1 = 0 (2) + 0 (0) + 0 (3) = 0 for x1-column
z2 = 0 (3) + 0 (2) + 0 (2) = 0 for x2-column
z3 = 0 (0) + 0 (5) + 0 (4) = 0 for x3-column
These zj values are now subtracted from cj values to calculate net profit from introducing one
unit of each variable x1, x2 and x3 into the new solution mix.
c1 – z1 = 3 – 0 = 3
c2 – z2 = 5 – 0 = 5
c3 – z3 = 4 – 0 = 4
Simplex Method
Step 3: To see whether the current solution given in Table 4.3 is optimal or not, calculate
for non-basic variables x1, x2 and x3 as follows:
zj = (Basic variable coefficients, cB ) × ( jth column of data matrix)
cj – zj = cj – cB B– 1
aj = cj – cB yj
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
22
Simplex Method
The zj and cj – zj rows are added into the Initial Solution Table.
The values of basic variables, s1, s2 and s3 are given in the solution values (xB )
column of Table 4.3. The remaining variables which are non-basic at the current
solution have zero value. The value of objective function at the current solution
is given by
Z = (Basic variable coefficients, cB ) × (Basic variable values, xB )
= 0 (8) + 0 (10) + 0 (15) = 0
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
23
Simplex Method
Initial Solution Table
cj ® 3 5 4 0 0 0
Profit
per Unit
cB
Variables in
Basis
B
Solution
Values
B (=xB )
x1 x2 x3 s1 s2 s3
Min
Exchange
Ratio
xB/x2
0 s1 8 2  0 1 0 0 83 ®
0 s2 10 0 2 5 0 1 0 10/2
0 s3 15 3 2 4 0 0 1 15/2
Z = 0 zj 0 0 0 0 0 0
cj – zj 3 5 4 0 0 0

© Macmillan Publishers India Ltd 1997,200
3,2007,2009
24
Simplex Method
Since all cj – zj ³ 0 ( j = 1, 2, 3), the current solution is not optimal. Variable x2
is chosen to enter into the basis as 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.
Step 4: The variable to leave the basis is determined by dividing the values in the xB- column by
the corresponding elements in the key column as shown in Initial Solution Table Since the
exchange ratio, 8/3 is minimum in row 1, the basic variable s1 is chosen to leave the solution
(basis).
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
25
Simplex Method
Step 5: (Iteration 1) Since the key elements enclosed in the circle in Table 4.3 is
not 1, divide all elements of the key row by 3 to obtain new values of the
elements in this row. The new values of the elements in the remaining rows for
the new Table 4.4 are 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)
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
26
Simplex Method
R2 (new) ® R2 (old) – 2R1 (new) R3 (new) ® 2R3 (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
. . . Step 5: (Iteration 1)
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
27
Improved Solution Table
cj ® 3 5 4 0 0 0
Profit
per Unit
CB
Variables
in Basis
B
Solution
Values
b (= xB)
x1 x2 x3 s1 s2 s3
Min Ratio
xB/ x3
5 x2 8/3 2/3 1 0 1/3 0 0 -
0 s2 14/3 - 4/3 0  - 2/3 1 0 (14/3)/5 ®
0 s2 29/3 5/3 0 4 - 2/3 0 1 (29/3)/4
Z = 40/3 zj 10/3 5 0 5/3 0 0
cj zj -1/3 0 4 - 5/3 0 0

Simplex Method
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
28
An improved basic feasible solution can be read from Improved Solution Table as:
x2 = 8/3, s2 = 14/3, s3 = 29/3 and x1 = x3 = s1 = 0. The improved value of the
objective function is
Z = (Basic variable coefficients, cB ) × (Basic variable values, xB )
= 5 (8/3) + 0 (14/3) + 0 (29/3) = 40/3
Once again, calculate values of cj – zj in the same manner as discussed earlier to
see whether the solution shown in Table 4.4 is optimal or not. Since c3 – z3 > 0,
the current solution is not optimal.
Simplex Method
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
29
Step 6: (Iteration 2 ) Repeat Steps 3 to 5. Table 4.5 is obtained by performing
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)
R2 (new) ® R3 (old) – 4R2 (new)
29/3 – 4 × 14/15 = 89/15
5/3 – 4 × – 4/15 = 41/15
0 – 4 × 0 = 0
4 – 4 × 0 = 0
– 2/3 – 4 × – 2/15 = – 2/15
0 – 4 × 1/5 = – 4/5
1 – 4 × 0 = 0
Simplex Method
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
30
Simplex Method
Improved Solution Table is completed by calculating the new zj and cj – zj values and the new
value of objective function:
z1 = 5 (2/3)+ 4 (– 4/15) + 0 (41/15) = 34/15
z4 = 5 (1/3)+ 4 (– 2/15) + 0 (2/15) = 17/15
z5 = 5 (0) + 4 (1/5) + 0 (– 4/5) = 4/5
The new objective function value is given by
Z = (Basic variable coefficients, cB) × (Basic variable values, xB)
= 5 (8/3) + 4 (14/15) + 0 (89/15) = 256/15
The improved basic feasible solution is shown in Improved Solution Table
c1 – z1 = 3 – 34/15 = 11/15 for x1-column
c4 – z4 = 0 – 17/15 = – 17/15 for s1-column
c5 – z5 = 0 – 4/5 = – 4/5 for s2-column
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
31
Simplex Method
cj ® 3 5 4 0 0 0
Profit
per
Unit
CB
Variables
in Basis
B
Solution
Values
b (= xB)
x1 x2 x3 s1 s2 s3
Min Ratio
xB/ x1
5 x2 8/3 2/3 1 0 1/3 0 0 (8/3)/(2/3)
4 x3 14/15 - 4/15 0 1 - 2/15 1/5 0 -
0 s3 89/15 41/15 0 0 2/15 - 4/5 1 (89/15)/(41/15) ®
Z = 256/15 zj 34/15 5 4 17/15 4/5 0
cj = zj 11/15 0 0 - 17/15 - 4/5 0

© Macmillan Publishers India Ltd 1997,200
3,2007,2009
32
Simplex Method
Iteration 3 In Improved Solution Table 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 another improved solution as shown in Table 4.5
performing 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)
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
33
Simplex Method
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 × – 12/41 = 8/41 1/5 + 4/15 × – 12/41 = 5/41
0 – 2/3 × 15/41 = – 10/41 0 + 4/15 × 15/41 = 4/41
R1 (new) ® R1 (old) – (2/3) R3 (new) R2 (new) ® R2 (old) + (4/15) R3 (new)
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
34
Simplex Method
cj ® 3 5 4 0 0 0
Profit
per Unit
CB
Variables
in Basis
B
Solution
Values
b (= xB)
x1 x2 x3 s1 s2 s3
5 x2 50/41 0 1 0 15/41 8/41 - 10/41
4 x3 62/41 0 0 1 - 6/41 5/41 4/41
3 x1 89/41 1 0 0 - 2/41 - 12/41 15/41
Z =
765/41
zj 3 5 4 45/41 24/41 11/41
cj – zj 0 0 0 - 45/41 - 24/41 - 11/41
In Optimal Solution Table 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.
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
35
Simplex Method
Simplex Algorithm (Minimization Case)
In certain cases, it is difficult to obtain an initial basic feasible solution.
Such cases arise
(i) when the constraints are of the £ types
, xj ³ 0
but some right-hand side constants are negative [i.e. bi < 0]. In this case after
adding the non-negative slack variable si (i = 1, 2, . . ., m), the initial solution
so obtained will be si = – bi for some i. It is not the feasible solution because it
violates the non-negativity conditions of slack variables (i.e. si ³ 0).
n
j=1
aij xj≤ bi
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
36
Simplex Method
(ii) When the constraints are of the ³ type
, xj ³ 0
In this case to convert the inequalities into equation form, adding
surplus (negative slack) variables,
= bi , xj ³ 0, si ³ 0
a x s
ij j i
j
n


1
a x b
ij j i
j
n


1
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
37
Simplex Method
Letting xj = 0 ( j = 1, 2, . . ., n), we get an initial solution – si = bi or si = – bi.
It is also not a feasible solution as it violates the non-negativity conditions of
surplus variables (i.e. si ³ 0). In this case, we add artificial variables,
Ai (i = 1, 2, . . ., m) to get an initial basic feasible solution. The resulting system
of equations then becomes:
= bi
xj, si, Ai ³ 0, i = 1, 2, . . ., m
a x s A
ij j i i
j
n
 

1
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
38
Simplex Method
and has m equations and (n + m + m) variables (i.e. n decision variables, m artificial variables
and m surplus variables). An initial basic feasible solution of the new system can be obtained
by equating (n + 2m – m) = (n + m) variables equal to zero. Thus the new solution to the
give LP problem is Ai = bi (i = 1, 2, . . . , m), which does not constitute a solution to the
original system of equations because the two systems of equations are not equivalent. Thus to
get back to the original problem, artificial variables must be dropped out of the optimal
solution. There are two methods for eliminating these variables from the solution.
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
39
Simplex Method
The Big M Method
Assign a large undesirable (unacceptable penalty) coefficients to artificial
variables from the objective function point of view. If objective function Z is to
be minimized, then a very large positive price (called penalty) is assigned to
each artificial variable. Similarly, if Z is to be maximized, then a very large
negative price (also called penalty) is assigned to each of these variables. The
penalty will be designated by – M for a maximization problem and + M for a
minimization problem, where M > 0.
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
40
Simplex Method
Steps of the algorithm
Step 1: Express the LP problem in the standard form by adding slack variables, surplus variables
and artificial variables. Assign a zero coefficient to both slack and surplus variables and a very
large positive coefficient + M (minimization case) and – M (maximization case) to artificial
variable in the objective function.
Step 2: The initial basic feasible solution is obtained by assigning zero value to original
variables.
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
41
Simplex Method
Step 3: Calculate the values of cj – zj in last row of the simplex table and examine
these values.
If all cj – zj ³ 0, then the current basic feasible solution is optimal.
If for a column, k, ck – zk is most negative and all entries in this column are negative, then
the problem has an unbounded optimal solution.
If one or more cj – zj < 0 (minimization case), then select the variable to enter into the basis
with the largest negative cj – zj value (largest per unit reduction in the objective
function value). This value also represents opportunity cost of not having one unit of
the variable in the solution. That is,
ck – zk = Min {cj – zj : cj – zj < 0}
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
42
Simplex Method
Step 4: Determine the key row and key element in the same manner as discussed in the simplex
algorithm of the maximization case.
At any iteration of the simplex algorithm any one of the following cases may arise:
Step 5: Continue with the procedure to update solution at each iteration till optimal solution is
obtained.
If at least one artificial variable is present in the basis with positive value and the coefficient of
M in each cj – zj ( j = 1, 2, . . ., n) values is non-negative, then given LP problem has no
optimum basic feasible solution. In this case, the given LP problem has a pseudo optimum
basic feasible solution
If at least one artificial variable is present in the basis with zero value and the coefficient of M in
each cj – zj ( j = 1, 2, . . ., n) values is non-negative, then the given LP problem has no solution.
That is, the current basic feasible solution is degenerate.
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
43
Simplex Method
Example: Use the penalty (Big-M) method to solve the following LP problem.
Minimize Z = 5x1 + 3x2
subject to the constraints
2x1 + 4x2 £ 12
2x1 + 2x2 = 10
5x1 + 2x2 ³ 10
and x1, x2 ³ 0
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
44
Simplex Method
Solution: Introducing slack variable s1, surplus variable s2 and artificial
variables A1 and A2 in the constraints of the given LP problem. The standard
form of the LP problem is stated as follows:
Minimize Z = 5x1 + 3x2 + 0s1 + 0s2 + MA1 + MA2
subject to the constraints
2x1 + 4x2 + s1 = 12
2x1 + 2x2 + A1 = 10
5x1 + 2x2 – s2 + A2 = 10
and x1, x2, s1, s2, A1, A2 ³ 0
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
45
Simplex Method
. . . The Big-M Method
An initial basic feasible solution is obtained by letting x1 = x2 = s2 = 0. Therefore, the initial
basic feasible solution is: s1 = 12, A1 = 10, A2 = 10 and Min Z = 10M + 10M = 20M. Here it
may be noted that the columns which corresponds to current basic variables and form the
basis (identity matrix) are s1 (slack variable), A1 and A2 (both artificial variables). The initial
basic feasible solution is given in Initial solution Table.
Since the value c1 – z1= 5 – 7M is the smallest value, therefore x1 becomes the entering
variable. To decide which basic variable should leave the basis, the minimum ratio is
calculated as shown in Initial solution Table.
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
46
Simplex Method
Initial solution Table
cj ® 5 3 0 0 M M
Cost
per
Unit
CB
Variables
in Basis
B
Solution
Values
b (= xB)
x1 x2 s1 s2 A1 A2
Min Ratio
xB/ x1
0 s1 12 2 4 1 0 0 0 12/2 = 6
M A1 10 2 2 0 0 1 0 10/2 = 6
M A2 10  2 0 - 1 0 1 10/5 = 2 ®
Z = 20M zj 7M 4M 0 - M M M
cj - zj 5 –
7M
3 –
4M
0 M 0 0

© Macmillan Publishers India Ltd 1997,200
3,2007,2009
47
Simplex Method
Iteration 1: Introduce variable x1 into the basis and remove A2 from the basis by
applying the following row operations. The new solution is shown in
Improved Solution Table.
R3 (new) ® R3 (old) ¸ 5 (key element); R2 (new) ® R2 (old) – 2R3 (new).
R1 (new) ® R1 (old) – 2R3 (new).
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
48
Simplex Method
Improved Solution Table
cj ® 5 3 0 0 M
Cost
per
Unit
CB
Variables
in Basis
B
Solution
Values
b (= xB)
x1 x2 s1 s2 A1 Min Ratio
xB/ x2
0 s1 8 0 16/5 1 2/5 0 8/(16/5) = 5/2 ®
M A1 6 0 6/5 0 2/5 1 6/(6/5) = 5
5 x1 2 1 2/5 0 - 1/5 0 2/(2/5) = 5 ®
Z = 10 + 6M zj 5 (6M/5) + 2 0 (2M/5) – 1 M
cj - zj 0 (- 6M/5) + 1 0 (- 2M/5) +
1
0

© Macmillan Publishers India Ltd 1997,200
3,2007,2009
49
Simplex Method
Iteration 2: Since the value of c2 – z2 in Table is largest negative value, variable
x2 is chosen to enter into the basis. For introducing variable x2 into the basis and
to remove s1 from the basis we apply the following row operations. The new
solution is shown in Improved Solution Table.
R1 (new) ® R1 (old)×5/16(key element);R2(new) ® R2 (old) – (6/5) R1 (new).
R3 (new) ® R3 (old) – 2/5 R1 (new).
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
50
Simplex Method
Improved Solution Table
cj ® 5 3 0 0 M
Cost
per
Unit
CB
Variables
in Basis
B
Solution
Values
b (= xB)
x1 x2 s1 s2 A1 Min Ratio
xB/ s2
3 X2 5/2 0 1 5/16 1/8 0 (5/2)/(1/8) = 40
M A1 3 0 0 - 3/8 1/4 1 3/(1/4) = 12 ®
5 X1 1 1 0 - 1/8 - 1/4 0 -
Z = 25/2 + 3M zj 5 3 - 3M/8 + 5/16 M/4 – 7/8 M
cj - zj 0 0 - 3M/8 - 5/16 - M/4 + 7/8 0

© Macmillan Publishers India Ltd 1997,200
3,2007,2009
51
Simplex Method
Iteration 3: As c4 – z4 < 0 in s2-column, current solution is not optimal. Thus,
introduce s2 into the basis and remove A1 from the basis by apply the following
row operations:
R2 (new) ® R2 (old) × 4 (key element);R1 (new) ® R1 (old) – (1/8) R2 (new)
R3(new) ® R3 (old) + (1/4) R2 (new).
The new solution is shown in Optimal Solution Table.
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
52
Simplex Method
cj ® 5 3 0 0
Cost
per Unit
CB
Variables
in Basis
B
Solution
Values
b (= xB)
x1 x2 s1 s2
3 x2 1 0 1 1/2 0
0 s2 12 0 0 - 3/2 1
5 x1 4 1 0 - 1/2 0
Z = 23 zj 5 3 - 1 0
cj - zj 0 0 1 0
In above table, all cj – zj ³ 0. Thus an optimal solution is arrived at with value of
variables as: x1 = 4, x2 = 1, s1 = 0, s2 = 12 and Min Z = 23.
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
53
Simplex Method
. . . The Big-M Method
Example: Use penalty (Big-M) method to solve the following LP problem.
Maximize Z = x1 + 2x2 + 3x3 – x4
subject to the constraints
x1+2x2 + 3x3 = 15
2x1 + x2 + 5x3 = 20
x1 +2x2 + x3 + x4 = 10
and x1, x2, x3,x4 ³ 0
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
54
Simplex Method
Solution: Since all constraints of the given LP problem are equations, therefore
adding only artificial variables A1 and A2 in the constraints. The standard form
of the problem is then stated as follows:
Maximize Z = x1 + 2x2 + 3x3 – x4 – MA1 – MA2
subject to the constraints
x1 + 2x2 + 3x3 + A1 = 15
2x1 + x2 + 5x3 + A2 = 20
x1 + 2x2 + x3 + x4 = 10
and x1, x2, x3, x4, A1, A2 ³ 0
An initial basic feasible solution is given in Initial Solution Table.
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
55
cj ® 1 2 3 - 1 -M -M
Profit
per
Unit
CB
Variables
in Basis
B
Solution
Values
b (= xB)
x1 x2 x3 x4 A1 A2
Min Ratio
xB/ x3
- M A1 15 1 2 3 0 1 0 15/3 = 5
- M A2 20 2 1  0 0 1 20/5 = 4 ®
- 1 x4 10 1 2 1 1 0 0 10/1 = 10
Z = - 35M – 10 zj - 3M - 1 - 3M - 2 - 8M - 1 - 1 - M - M
cj - zj 3M + 2 3M + 4 8M + 4 0 0 0

Simplex Method
Initial Solution Table
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
56
Simplex Method
The Big-M Method
Since the value of c3 – z3 in Table 4.25 is largest positive, the variable x3 is
chosen to enter into the basis. To get an improved basic feasible solution, apply
the following row operations for entering variable x3 into the basis and
removing variable A2 from the basis.
R2 (new) ® R1 (old) ¸ 5 (key element) ; R1 (new) ® R1 (old) – 3 R2 (new).
R3 (new) ® R3 (old) – R2 (new)
The new solution is shown in Improved Solution Table.
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
57
Simplex Method
Improved Solution Table
cj ® 1 2 3 –1 –M
Profit
per
Unit
CB
Variables
in Basis
B
Solution
Values
b (= xB)
x1 x2 x3 x4 A1
Min Ratio
xB/ x2
– M A1 3 – 1/51 7/5 0 0 1 = ®
3 x3 4 2/5 1/5 1 0 0 = 20
– 1 x4 6 3/5 9/5 0 1 0 =
Z = – 3M + 6 zj M/5 + 3/5 –7M/5 – 6/5 3 –1 –M
cj –zj - M/5 –
2/5
7M/5 + 16/5 0 0 0
15
7
4
15
/
6
9 5
/
30
9
3
7 5
/
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
58
Simplex Method
The solution shown in the Table, is not optimal because c2 – z2 is positive. Thus,
applying the following row operations for entering variable x2 into the basis and
removing variable A1 from the basis,
R1(new) ® R1 (old) ×(5/7) (key element);R2 (new) ® R2 (old)–(1/5) R1 (new).
R3(new) ® R3 (old) – (9/5) R1 (new).
The new solution is shown in Improved Solution Table.
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
59
Simplex Method
cj ® 1 2 3 – 1
Profit
per Unit
CB
Variables
in Basis
B
Solution
Values
b (= xB)
x1 x2 x3 x4
Min Ratio
xB/ x1
2 x2 15/7 – 1/7 1 0 0 __
3 x3 25/7 3/7 0 1 0 25/7 × 7/3 = 25/3
– 1 x4 15/7 6/7 0 0 1 15/7 × 7/6 = 15/6 ®
Z = 90/7 zj 1/7 2 3 – 1
cj –zj 6/7 0 0 0

Improved Solution Table
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
60
Simplex Method
. . . The Big-M Method
Once again, the solution shown in the Table, is not optimal as c1 – z1 > 0 in x1 column. Thus,
applying the following row operations for entering variable x1 into the basis and removing
variable x4 from the basis,
R3(new) ®R3 (old)×(7/6) (key element);R1(new) ®R1 (old) + (1/7) R3 (new).
R2(new) ® R2 (old) – (3/7) R3 (new).
The new solution is shown in optimal solution Table.
© Macmillan Publishers India Ltd 1997,200
3,2007,2009
61
Simplex Method
cj ® 1 2 3 – 1
Profit
per Unit
CB
Variables
in Basis
B
Solution
Values
b (= xB)
x1 x2 x3 x4
2 x2 15/6 0 1 0 1/6
3 x3 15/6 0 0 1 – 3/6
1 x1 15/6 1 0 0 7/6
Z = 15 zj 1 2 3 0
cj –zj 0 0 0 – 1
In Optimal Solution Table, all cj – zj £ 0. Thus, an optimal solution has been arrived
Optimal Solution Table