0% found this document useful (0 votes)
31 views32 pages

Unit 1A

This document covers the fundamentals of General Linear Programming Problems, focusing on the Simplex Method. It details the canonical and standard forms of linear programming, definitions of feasible and optimal solutions, and introduces various techniques including artificial variables and the revised simplex method. Additionally, it provides examples to illustrate the conversion of linear programming problems into canonical and standard forms.

Uploaded by

roopal.chaudhary
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views32 pages

Unit 1A

This document covers the fundamentals of General Linear Programming Problems, focusing on the Simplex Method. It details the canonical and standard forms of linear programming, definitions of feasible and optimal solutions, and introduces various techniques including artificial variables and the revised simplex method. Additionally, it provides examples to illustrate the conversion of linear programming problems into canonical and standard forms.

Uploaded by

roopal.chaudhary
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

29

General Linear Programming


Problems : Simplex Method

IMPORTANT TOPICS COVERED


After studying this chapter, you will be able to understand :
å Introduction
å Canonical and Standard Forms of LPP
å The Simplex Method
å The Simplex Algorithm
å Artificial Variables Techniques
å Variants of the Simplex Method
å Revised Simplex Method
å Bounded Variable Method

Introduction
General Linear Programming Problem
The linear programming involving more than two variables may be expressed as follows :
Maximize (or) Minimize Z = c1 x 1 + c 2 x 2 + c 3 x 3 + K c n x n
Subject to the constraints
a11 x 1 + a12 x 2 + ........ + a1 n x n £ or = or ³ b1
a 21 x 1 + a 22 x 2 + ........ + a 2n x n £ or = or £ b2
a 31 x 1 + a 32 x 2 + ........ + a 3n x n £ or = or £ b3
..........................................................................
..........................................................................
a m1 x 1 + a m 2 x 2 + ........ + a mn x n £ or = or ³ bm
and the non-negativity restrictions
x 1 , x 2 , x 3 , ... x n ³ 0.
Note : Some of the constraints may be equalities, some others may be inequalities or (£)
type and remaining one inequalities of ( ³) type or all of them are of same type.
Definition (1) : A set of values x 1 , x 2 ..... x n which satisfies the constraints of the LPP is
called its solution.
Definition (2) : Any solution to a LPP which satisfies the non-negativity restrictions of
the LPP is called its feasible solution.
Definition (3) : Any feasible solution which optimizes (maximizes or minimizes) the
objective function of the LPP is called its optimum solution or optimal solution.
30

Definition (4) : If the constraints of a general LPP be


n
S a ij x j £ bi (i = 1, 2, 3, K k) ...(1)
j=1
then the non-negative variables s i which are introduced to convert the inequalities (1) to the
equalities
n
S a ij x j + s i = bi (i = 1, 2, 3, K k) ...(2)
j=1

are called slack variables. The value of these variables can be interpreted as the amount of
unused resource.
Definition (5) : If the constraints of a general LPP be
n
S a ij x j ³ bi (i = k, k + 1 K ) ...(1)
j=1

then the non-negative variables s i which are introduced to convert the inequalities (1) to the
equalities
n
S a ij x j - s i = bi (i = k, k + 1 K )
j=1

are called surplus variables. The value of these variables can be interpreted as the amount
over and above the required level.
Canonical and Standard Forms of LPP
After the formulation of LPP, the next step is to obtain its solution. But before any
method is used to find its solution, the problem must be presented in suitable from. Two forms
are dealt with here, the canonical form and the standard form.
The Canonical form : The general linear programming problem can always be
expressed in the following form :
Maximize Z = c1 x 1 + c 2 x 2 + c 3 x 3 + .... + c n x n
subject to the constraints
a11 x 1 + a12 x 2 + ... + a1 n x n £ b1
a 21 x 1 + a 22 x 2 + ... + a 2n x n £ b2
.....................................................
.....................................................
a m1 x 1 + a m 2 x 2 + ... + a mn x n £ bm
and the non-negativity restrictions
x 1 , x 2 , ......, x n ³ 0.
This form of LPP is called the canonical form of the LPP.
In matrix notation the canonical form of LPP can be expressed as :
Maximize Z = CX (objective function)
subject to AX £ b (constraints)
and X ³ 0 (non-negativity restrictions)
31

when C = ( c1 , c 2 ......... c n ),
æ x1 ö æ b1 ö
æ a11 a12 K K K a1 n ö ç ÷ ç ÷
ç ÷ çx2 ÷ ç b2 ÷
ç a12 a 22 K K K a 2n ÷ ç. ÷ ç. ÷
A = ç ... .................. ... ÷, X = ç ÷, b = ç ÷
ç ÷ ç. ÷ ç. ÷
ç ... .................. ... ÷ ç. ÷ ç. ÷
ça a K K K a ÷ ç ÷ ç ÷
è m1 m 2 mn ø çx ÷ çb ÷
è nø è nø
Characteristics of the Canonical Form :
(i) The objective function is of maximization type.
(ii) All constraints are of ( £) type.
(iii) All variables x i are non-negative.
The Standard Form :
The general linear programming problem in the form
Maximize Z = c1 x 1 + c 2 x 2 + K + c n x n
subject to the constraints
a11 x 1 + a12 x 2 + ... + a1 n x n = b1
a 21 x 1 + a 22 x 2 + ... + a 2n x n = b2
......................................................
......................................................
a m1 x 1 + a m 2 x 2 + ... + a mn x n = bm
and x 1 , x 2 , ...... , x n ³ 0 is known as standard form.
In matrix notation the standard form of LPP can be expressed as :
Maximize Z = CX (objective function)
subject to constraints
AX = b and X ³ 0
Characteristics of the Standard Form :
(i) The objective function is of maximization type.
(ii) All constraints are expressed as equations.
(iii) Right hand side of each constraint is non-negative.
(iv) All variables are non-negative.
Note :
(1) : The minimization of a function f ( x) is equivalent to the maximization of the
negative expression of this function.
i. e., Min f ( x) = - Max {- f ( x)}
i. e., Min Z = - Max ( - Z)
e. g : Min Z = c1 x 1 + c 2 x 2 is equivalent to
Max ( - Z) = - c1 x 1 - c 2 x 2
(2) : An inequality in one direction can be converted into an in equality in the opposite
direction by multiplying both sides by ( - 1).
32

e. g : ax 1 + bx 2 ³ c
Þ - ax 1 - bx 2 £ - c
(3) : An equality constraint can be expressed as two inequalities.
ax 1 + bx 2 £ cü ax 1 + bx 2 £ c
e. g : ax 1 + bx 2 = c Þ ý Þ
ax 1 + bx 2 ³ cþ - ax 1 - bx 2 £ - c
(4) : An inquality constraint with its left hand side in the absolute from can be expressed
as two inequalities.
ax 1 + bx 2 £ c
e. g : |ax 1 + bx 1| £ c Þ
- ax 1 - bx 2 £ - c
(5) : If a variable is unconstrained or unrestricted (without specifying its sign), it can
always be expressed as the difference of two non-negative variables.
e. g. : If x 2 is unrestricted, then
x 2 = x 2¢ - x 2¢ ¢ where x 2 ¢ , x 2 ¢ ¢ ³ 0.
(6) : Whenever slack /surplus variables are introduced in the constraints, they should
also appear in the objective function with zero coefficients.
* Example 1 : Express the following LPP in the canonical form.
Maximize Z = 2 x 1 + 3 x 2 + x 3
subject to the constraints
4 x1 - 3 x 2 + x 3 £ 6
x1 + 5 x 2 - 7 x 3 ³ - 4
and x 1 , x 3 ³ 0, x 2 is unrestricted
Solution : As x 2 is unrestricted, x 2 = x 2 ¢ - x 2 ¢ ¢
where x 2 ¢ , x 2 ¢ ¢ ³ 0 \ The given LPP becomes
Maximize Z = 2x 1 + 3 ( x 2 ¢ - x 2 ¢ ¢ ) + x 3
Subject to 4 x 1 - 3x 2 ¢ + 3x 2 ¢ ¢ + x 3 £ 6
x 1 + 5x 2 ¢ - 5x 2 ¢ ¢ - 7 x 3 ³ - 4
x 1 , x 2 ¢ , x 2 ¢ ¢ , x 3 ³ 0.
Convert the second constraint £ type by multiplying both sides by - 1.
Now the LPP becomes
Maximize Z = 2x 1 + 3x 2 ¢ - 3x 2 ¢ ¢ + x 3
subject to 4 x 1 - 3x 2 ¢ + 3x 2 ¢ ¢ + x 3 £ 6
-x 1 - 5x 2 ¢ + 5x 2 ¢ ¢ + 7 x 3 £ 4
and x 1 , x 2 ¢ , x 2 ¢ ¢ , x 3 ³ 0.
which is in the canonical form.
* Example 2 : Express the following LPP in standard form
Minimize Z = 5 x 1 + 7 x 2
subject to constraints x1 + x 2 £ 8
33

3 x1 + 4 x 2 ³ 3
6 x1 + 7 x 2 ³ 5 and x 1 , x 2 ³ 0.
Solution : Since Min Z = -Max ( -Z) = - Max Z * ,
The given LPP becomes maximize Z * = - 5x 1 - 7 x 2
subject to x1 + x 2 £ 8
3x 1 + 4 x 2 ³ 3
6 x 1 + 7 x 2 ³ 5 and x 1 , x 2 ³ 0.
By introducing slack variable s 1 and surplus variables s 2 , s 3 the standard from of the
LPP is given by
Maximize Z * = - 5x 1 - 7 x 1 + 0 s 1 + 0 s 2 + 0 s 3
subject to x 1 + x 2 + s1 = 8
3x 1 + 4 x 2 - s 2 = 3
6x1 + 7x 2 - s 3 = 5
and x 1 , x 2 , s 1 , s 2 , s 3 ³ 0.
* Example 3 : Express the following LPP in standard (Matrix) from
Maximize Z = 4 x 1 + 2 x 2 + 6 x 3
subject to 2 x1 + 3 x 2 + 2 x 3 ³ 6
3 x1 + 4 x 2 = 8
6 x 1 - 4 x 2 + x 3 £ 10 and x 1 , x 2 , x 3 ³ 0.
Solution : By introducing the surplus variable s 1 and slack variable s 2 , the standard
from of the LPP becomes
Maximize Z = 4 x 1 + 2x 2 + 6 x 3 + 0 s 1 + 0 s 2
subject to 2x 1 + 3x 2 + 2x 3 - s 1 + 0 s 2 = 6
3x 1 + 4 x 2 + 0 x 3 + 0 s 1 + 0 s 2 = 8
6 x 1 - 4 x 2 + x 3 + 0 s 1 + s 2 = 10
and x 1 , x 2 , x 3 , s 1 , s 2 ³ 0.
Thus the given problem in matrix from is
Maximize Z = CX
subject to AX = b
X ³ 0
where C = ( 4, 2, 6, 0, 0)
æ x1 ö
ç ÷
æ 2 3 2 -1 0ö æ6 ö çx2 ÷
ç ÷ ç ÷
A = ç3 4 0 0 0÷ , b = ç 8 ÷ , X = çx3 ÷
ç ÷
ç 6 -4 1 0 1 ÷ø ç 10 ÷ ç s1 ÷
è è ø
çs ÷
è 2ø
34

The Simplex Method


while solving a LPP graphically, the region of feasible solutions was found to be convex.
The optimal solution if it exists, occurred at some vertex. If the optimal solution was not unique,
the optimal points were on an edge. These observations also hold for the general LPP.
Essentially the problem is that of finding the particular vertex of the convex region which
corresponds to the optimal solution. The most commonly used method for locating the optimal
vertex is the simplex method or simplex technique or simplex algorithm which was
developed by G. Dantzig in 1947.
The simplex method provides an algorithm which consists in moving from one vertex of
the region of the feasible solutions of another vertex in such a way that the value of the objective
function at the succeeding vertex is more (or less, as the case may be) than at the preceding
vertex. This procedure of jumping from one vertex to another is then repeated. Since the
number of vertices is finite, the method leads to an optimal vertex in a finite number of steps or
indicates the existence of an unbounded solution.
Definition (1) : Given a system of m linear equations with n variable ( m < n). The
solution obtained by setting ( n - m) variables equal to zero and solving for the remaining m
variables is called a basic solution.
The m variables are called basic variables and they form the basic solution. The ( n - m)
variables which are put to zero are called as non-basic variables.
Definition (2) : A basic solution is said to be a non-degenerate basic solution if none
of the basic variables is zero.
Definition (3) : A basic solution is said to be a degenerate basic solution if one or more
of the basic variables are zero.
Definition (4) : A feasible solution which is also basic is called a basic feasible
solution.
* Example 4 : Find all the basic solutions to the following problem :
Maximize Z = x 1 + 3 x 2 + 3 x 3
subject to x1 + 2 x 2 + 3 x 3 = 4
2 x1 + 3 x 2 + 5 x 3 = 7
Also find which of the basic solutions are
(i) Basic Feasible
(ii) Non-degenerate Basic Feasible
(iii) Optimal Basic Feasible
Solution : Since there are m = 2 equations with n = 3 variables, the basic solutions are
obtained by setting ( n - m) = (3 - 2) = 1 variable equal to zero and solving for the remaining two
variables. Since there are 3 variables with 2 equations. We shall have 3C 2 = 3 different basic
solutions which are given in the following table.
35

S. Basic Non-basic Values of the basic value of Is the Is the Is the


No. vari- variables variables given by the solution solution solution
ables the constraint objective feasible ? non-degen feasible
equations function erate ? and
optimal ?
x 1 + 2x 2 = 4
1 x1 , x 2 x3 = 0 2x 1 + 3x 2 = 7 5 Yes Yes Yes
Þ x 1 = 2, x 2 = 1
x 1 + 3x 3 = 4
2 x1 , x 3 x2 = 0 2x 1 + 5x 3 = 7 4 Yes Yes No
Þ x 1 = 1, x 3 = 1
2x 2 + 3x 3 = 4
3 x 2, x 3 x1 = 0 3x 2 + 5x 3 = 7 3 No Yes No
Þ x 1 = -1, x 3 = 2

From the table, we see that, the first two solutions are non-degenerate basic feasible
solutions and the third is non-degenerate and infeasible. The first solution is the optimal one.
\ The optimal solution is
Maximize Z = 5, x 1 = 2, x 2 = 1, x 3 = 0.
* Example 5 : obtain all the basic solutions to the following system of linear
equations :
2 x1 + 6 x 2 + 2 x 3 + x 4 = 3
6 x1 + 4 x 2 + 4 x 3 + 6 x 4 = 2
Which of them are basic feasible solutions and which are non-degenerate basic
solutions ? Is the non-degenerate solution feasible ?
Solution : Since there are 4 variables with 2 equations, we shall have 4C 2 = 6 different
basic solutions, which are given in the following table.
S. Basic Non-basic Values of the basic Is the Is the Is the solution
No. vari- variables variables given by the solution solution feasible and
ables constraint equations feasible ? non- non-dege-
degenerate ? nerate ?
2x 1 + 6 x 2 = 3 ü
ý
6 x 1 + 4 x 3 = 2þ
1 x1 , x 2 x3 = x4 = 0 Yes No No
1
Þ x 1 = 0, x 2 =
2
2x 1 + 2x 3 = 3 ü
ý
6 x 1 + 4 x 3 = 2þ
2 x1 , x 3 x2 = x4 = 0 No Yes No
7
Þ x 1 = - 2, x 3 =
2
36

2x 1 + x 4 = 3 ü
ý
6 x 1 + 6 x 4 = 2þ
3 x1 , x 4 x1 = x 3 = 0 No Yes No
8 7
Þ x1 = , x 2 = -
3 3
6 x 2 + 2x 4 = 3 ü
ý
4 x 2 + 4 x 4 = 2þ
4 x 2, x 3 x1 = x 4 = 0 Yes No No
1
Þ x2 = , x3 = 0
2
6 x 2 + x 4 = 3ü
ý
4 x 2 + 6 x 4 = 2þ
5 x 2, x 4 x1 = x 3 = 0 Yes No No
1
Þ x1 = , x 4 = 0
2
2x 3 + x 4 = 3ü
ý
6 x 3, x 4 x1 = x 2 = 0 4 x 3 + 6 x 4 = 2þ No Yes No
Þ x 3 = 2, x 4 = - 1

Definition (5) : Let X B be a basic feasible solution to the LPP :


Maximize Z = CX
subject to AX = b
and X ³ 0.
Then the vector C B = (C B1 , C B2 , ..... C Bm ), where C Bi are components of C associated
with the basic variables, is called the cost vector associated with the basic feasible solution
XB .
Remarks :
1. If a LPP has a feasible solution, then it also has a basic feasible solution.
2. There exists only finite number of basic feasible solution to a LPP.
3. Let a LPP have a feasible solution. If we drop one of the basic variables and
introduce another variable in the basis set, then the new solution obtained is also a
basic feasible solution.
Definition 6 : Let X B = B -1 b be a basic feasible solution to the LPP :
Maximize Z = CX , where AX = b and x ³ 0,
Let C B be the cost vector corresponding to X B . For each column vector a j in A, which is
not a column vector of B, let
m
a j = S a ij bi
i=1
m
Then the number Zj = S C Bi a ij
i=1

is called the evaluation corresponding to a j and the number ( Z j - C j ) is called the net
evaluation corresponding to a j .
37

Remark 1 : If ( Z j - C j ) =0 for atleast one j for which a ij > 0 i = 1, 2, ....., m; then another
basic feasible solution is obtained which gives an unchanged value of the objective function.
Remark 2 : (Unbounded solution). Let there exist a basic feasible solution to a given
LPP. If for atleast one j, for which a ij £ 0 ( i = 1, 2, ..., m) and ( Z j - C j ) is negative, then there
does not exist any optimum solution to this LPP.
Remark 3 : A necessary and sufficient condition for a basic feasible solution to a LPP to
be an optimum (maximum) is that ( Z j - C j ) ³ 0 for all j, for which a j Ï B.
Remark 4 : The two fundamental conditions on which the simplex method is based are :
(i) Feasibility condition : It ensures that if the initial (Starting) solution is basic feasible then
during computation only basic feasible solutions will be obtained. (ii) Optimality condition :
It guarantees that only improved solutions will be obtained.
The Simplex Algorithm
Assuming the existence of an initial basic feasible solution, an optimal solution to any
LPP by simplex method is found as follows :
Step 1 : Check whether the objective function is to be maximized for minimized. If it is to
be minimized, then covert it into a problem of maximization, by
Minimize Z = - Maximize (- Z)
Step 2 : Check whether all bi 's are positive. If any of the bi 's is negative, multiply both
sides of that constraint by - 1 so as to make its right hand side positive.
Step 3 : By introducing slack l surplus variables, convert the inequality constraints into
equations and express the given LPP into its standard form.
Step 4 : Find an initial basic feasible solution and express the above information
conveniently in the following simple table.
Cj (C1 C2 C 3 .....0 0 0 .....)
CB YB XB x1 x2 x 3 ..... s1 s2 s3 .....
C B1 s1 b1 a11 a12 a13 .....1 0 0 .....
C B2 s2 b2 a 21 a 22 a 23 .....0 1 0 .....
C B3 s3 b3 a 31 a 32 a 33 .....0 0 1 .....
: : : : : : ..... .....
: : : : : : ..... .....
: : : : : : ..... .....
: : : : : : ..... .....
: : : body matrix unit matrix
(Z j - C j ) Z0 Z1 - C 1 Z 2 - C 2 ... ... ... .........................

(Where C j - row denotes the coefficients of the variables in the objective function.
C B -column denotes the coefficients of the basic variables in the objective function. YB - column
denotes the basic variables. X B -column denotes the values of the basic variables. The
38

coefficients of the non-basic variables in the constraint equations constitute the body matrix
while the coefficients of the basic variables constitute the unit matrix. The row (Z j - C j )
denotes the net evaluations (or) index for each column).
Step 5 : Compute the net evaluations ( Z j - C j ) ( j = 1, 2, K n) by using the relation
Z j - C j = CB aj - C j.
Examine the sign of Z j - C j
(a) If all ( Z j - C j ) ³ 0 then the current basic feasible solution X B is optimal.
(b) If atleast one ( Z j - C j ) < 0, then the current basic feasible solution is not optimal,
go to the next step.
Step 6 : (To find the entering variable)
The entering variable is the non-basic variable corresponding to the most negative value
of ( Z j - C j ). Let it be x r for some j = r. The entering variable column is known as the key
column (or) pivot column which shown marked with an arrow at the bottom. If more than one
variable the same most negative ( Z j - C j ), any of these variables may be selected arbitrarily as
the entering variable.
Step 7: (To find the leaving variable)
ì X Bi ü
Compute the ratio q = Min í , a ir > 0 ý (i. e., the ratio between the solution column
î a ir þ
and the entering variable column by considering only the positive denominators)
(a) If all a ir £ 0, then there is an unbounded solution to the given LPP.
(b) If atleast one a ir > 0, then the leaving variable is the basic variable corresponding
X Bk
to the minimum ratio q. If q = , then the basic variable x k leaves the basis. The
a kr
leaving variable row is called the key row or pivot row (or) pivot equation,and
the element at the intersection of the pivot column and pivot row is called the pivot
element or key element (or) leading element.
Step 8 : Drop the leaving variable and introduce the entering variable along with its
associated value under C B column. Convert the pivot element to unity by dividing the pivot
equation by the pivot element and all other elements in its column to zero by making use of
(i) New pivot equation = old pivot equation ¸ pivot element.
(ii) New equation (all other row including ( Z j - C j ) row)
æ Corresponding ö
ç ÷ æ New pivot ö
= Old equation - ç Column ÷ ´ çç ÷÷
ç coefficient ÷ è equation ø
è ø
Step 9 : Go to step (5) and repeat the procedure until either an optimum solution is
obtained or there is an indication of an unbounded solution.
Note (1) : For maximization problems. :
(i) If all ( Z j - C j ) ³ 0, then the current basic feasible solution is optimal.
(ii) If atleast one ( Z j - C j ) < 0, then the current basic feasible solution is not optimal.
39

(iii) The entering variable is the non-basic variable corresponding to the most negative
value of ( Z j - C j ).
Note (2) : For minimization problems :
(i) If all ( Z j - C j ) £ 0, then the current basic feasible solution is optimal.
(ii) If atleast one ( Z j - C j ) > 0 , then the current basic feasible solution is not optimal.
(iii) The entering variable is the non-basic variable corresponding to the most positive
value of ( Z j - C j ) .
Note (3) : For both maximization and minimization problems, the leaving variable is the
basic variable corresponding to the minimum ratio q.
* Example 6 : Use simplex method to solve the LPP
Maximize Z = 4 x 1 + 10 x 2
subject to 2 x 1 + x 2 £ 50
2 x 1 + 5 x 2 £ 100
2 x 1 + 3 x 2 £ 90 and x 1 , x 2 ³ 0.
Solution : By introducing the slack variables s 1 , s 2 and s 3 , the problem in standard
from becomes
Maximize Z = 4 x 1 + 10 x 2 + 0 s 1 + 0 s 2 + 0 s 3
subject to 2x 1 + x 2 + s 1 + 0 s 2 + 0 s 3 = 50
2x 1 + 5x 2 + 0 s 1 + s 2 + 0 s 3 = 100
2x 1 + 3x 2 + 0 s 1 + 0 s 2 + s 3 = 90
and x 1 , x 2 , s 1 , s 2 , s 3 ³ 0.
Since there are 3 equations with 5 variables, the initial basic feasible solution is obtained
by equating ( 5 - 3) = 2 variables to zero.
\ The initial basic feasible solution is s 1 = 50, s 2 = 100, s 3 = 90
(x 1 = 0, x 2 = 0, non-basic)
The initial simplex table is given by
Cj (4 10 0 0 0)
CB YB XB x1 x2 s1 s2 s3 X Bi
q = min
a ir
0 s1 50 2 1 1 0 0 50
0 s2 100 2 (5) 0 1 0 20*
0 s3 90 2 3 0 0 1 30
(Z j - C j ) 0 -4 -10 0 0 0

Here the net evaluations are calculated as ( Z j - C j ) = C B a j - C j .


Z1 - C1 = C B a1 - C1 = (0 0 0) [ 2 2 2] T - 4 [where T denotes transpose]
æ 2ö
ç ÷
= (0 0 0) ç 2 ÷ - 4 = - 4
ç 2÷
è ø
40

Z 2 - C 2 = C B a 2 - C 2 = (0 0 0) [1 5 3] T - 10 = - 10
Z 3 - C 3 = C B a 3 - C 3 = (0 0 0) [1 0 0] T - 10 = 0
Z 4 - C 4 = C B a 4 - C 4 = (0 0 0) [0 1 0] T - 0 = 0
Z 5 - C 5 = C B a 5 - C 5 = (0 0 0) [0 0 1] T - 0 = 0
Since there are some ( Z j - C j ) < 0, the current basic feasible solution is not optimal.
To find the entering variable :
Since ( Z 2 - C 2 ) = - 10 is the most negative, the corresponding non-basic variable
x 2 enters the basis. The column corresponding to this x 2 is called the key column or pivot
column.
To find the leaving variable :
ìX ü ìX ü
Find the ratio q = min í Bi , a ir > 0 ý = min í Bi , a i 2 > 0 ý
î a ir þ î a i2 þ
ì 50 100 90 ü
q = min í , , ý
î 1 5 3þ
= min {50, 20, 30} = 20 which corresponds to s 2
\The leaving variable is the basic variable s 2 which corresponds to the minimum ratio
q = 20. The leaving variable row is called the pivot-row or key row or pivot equation and 5 is the
pivot element. Now, new pivot equation = old pivot equation ¸ pivot element.
= (100 2 5 0 1 0) ¸ 5
2 1
= 20 1 0 0
5 5
æ Corresponding ö
ç ÷ æ New pivot ö
New s 1 equation = old s 1 equation - ç Column ÷ ´ çç ÷÷
ç coefficient ÷ è equation ø
è ø
= 50 2 1 1 0 0
2 1
(-) 20 1 0 0
5 5
8 1
= 30 0 1 - 0
5 5
New s 3 equation = 90 2 3 0 0 1
6 3
( -) 60 3 0 0
5 5
4 -3
= 30 0 0 1
5 5
New ( Z j - C j ) eqn. = 0 -4 - 10 0 0 0
- 20 - 10
( -) - 200 - 10 0 0
5 5
= 200 0 0 0 2 0
41

\ The improved basic feasible solution is given in the following simplex table.
First Iteration :
C j (4 10 0 0 0)
CB YB XB x1 x2 s1 s2 s3
8 1
0 s1 30 0 1 - 0
5 5
2 1
10 x2 20 1 0 0
5 5
4 3
0 s3 30 0 0 - 1
5 5
(Z j - C j ) 200 0 0 0 2 0

Since all ( Z j - C j ) ³ 0 the current basic feasible solution is optimal.


\ The optimal solution is Max Z = 200, x 1 = 0, x 2 = 20.
* Example 7 : Find the non-negative values of x 1 , x 2 and x 3 which
Maximize Z = 3 x 1 + 2 x 2 + 5 x 3
subject to x 1 + 4 x 2 £ 420
3 x 1 + 2 x 3 £ 460
x 1 + 2 x 2 + x 3 £ 430
Solution : Given the LPP
Maximize Z = 3x 1 + 2x 2 + 5x 3
subject to x 1 + 4 x 2 £ 420
3x 1 + 2x 3 £ 460
x 1 + 2x 2 + x 3 £ 430
x 1 , x 2 , x 3 ³ 0.
By introducing non-negative slack variable s 1 , s 2 and s 3 , the standard from of the LPP
becomes
Maximize Z = 3x 1 + 2x 2 + 5x 3 + 0 s 1 + 0 s 2 + 0 s 3
subject to x 1 + 4 x 2 + 0 x 3 + s 1 + 0 s 2 + 0 s 3 = 420
3x 1 + 0 x 2 + 2x 3 + 0 s 1 + s 2 + 0 s 3 = 460
x 1 + 2x 2 + x 3 + 0 s 1 + 0 s 2 + s 3 = 430
and x 1 , x 2 , x 3 , s 1 , s 2 , s 3 ³ 0.
Since there are 3 equations with 6 variables, the initial basic feasible solution is obtained
by equating (6 - 3) = 3 variables to zero.
\ The initial basic feasible solution is s 1 = 420, s 2 = 460, s 3 = 430 (x 1 = x 2 = x 3 = 0,
non-basic)
The initial simplex table is given by :
42

Initial iteration :
Cj (3 2 5 0 0 0)
CB YB XB x1 x2 x3 s1 s2 s3 q
0 s1 420 1 4 0 1 0 0 -
460
0 x2 460 3 0 (2) 0 1 0 = 230*
2
430
0 s3 430 1 2 1 0 0 1 = 430
1
Zj -Cj 0 -3 -2 -5 0 0 0
Since there are some ( Z j - C j ) < 0, The current basic feasible solution is not optimal.
To Find the entering variable : Since ( Z 2 - C 3 ) = - 5 is the most negative, the
corresponding non-basic variable x 3 enters into the basis. The column corresponding to this x 3
is called the key column or pivot column.
To find the leaving variable :
ìX ü ìX ü
Find the ratio q = min í Bi , a ir > 0 ý = min í Bi , a i 3 > 0 ý
a
î ir þ a
î i3 þ
ì 460 430 ü
q = min í , ý = min {230, 430} = 230
î 2 1 þ
\ The leaving variable is the basic variable s 2 , which corresponds to the minimum ratio
q = 230. The leaving variable row is called the key row or pivot equation and 2 is the pivot
element.
New pivot equation = old pivot equation ¸ pivot element
= ( 460 3 0 2 0 1 0) ¸ 2
3 1
= 230 0 1 0 0
2 2
æ its entering ö æ New ö
ç ÷ ç ÷
New s 1 equation = old s 1 equation - ç column ÷ ´ ç Pivot ÷
ç coefficient ÷ ç equation ÷
è ø è ø
= 420 1 4 0 1 0 0
( -) 0 0 0 0 0 0 0
= 420 1 0 4 1 0 0
æ its entering ö æ New ö
ç ÷ ç ÷
New s 3 equation = old s 3 equation - ç column ÷ ´ ç Pivot ÷
ç coefficient ÷ ç equation ÷
è ø è ø
= 430 1 2 1 0 0 1
3 1
( -) 230 0 1 0 0
2 2
1 1
= 200 - 2 0 0 - 1
2 2
43

æ its entering ö æ New ö


ç ÷ ç ÷
New ( Z j - C j ) equation = old ( Z j - C j ) equation - ç column ÷ ´ ç Pivot ÷
ç coefficient ÷ ç equation ÷
è ø è ø
= 0 -3 -2 -5 0 0 0
-15 -5
( -) - 1150 0 -5 0 0
2 2

9 5
= 1150 -2 0 0 0
2 2
The improved basic feasible solution is given in the following simplex table
First iteration :
Cj (3 2 5 0 0 0)
CB YB XB x1 x2 x3 s1 s2 s3 q
420
0 s1 420 1 4 0 1 0 0 = 105
4
3 1
5 x3 230 0 1 0 0 —
2 2
-1 1 200
0 s3 200 (2) 0 0 - 1 = 100*
2 2 2
9 5
Zj -Cj 1150 -2 0 0 0
2 2

Since there is an ( Z 2 - C 2) = - 2, the current basic feasible solution is not optimal.


\ Here the non-basic variable x 2 enters into the basis and the basic variable s 3 leaves the
basis.
Second iteration :
Cj (3 2 5 0 0 0)
CB YB XB x1 x2 x3 s1 s2 s3

0 s1 20 2 0 0 1 1 -2
3 1
5 x3 230 0 1 0 0
2 2
-1 -1 1
0 x2 100 1 0 0
4 4 2
Zj -Cj 1150 4 0 0 0 2 1

Since all ( Z j - C j ) ³ 0, the current basic feasible solution is optimal.


\ The optimal solution is Max Z = 1350, x 1 = 0, x 2 = 100, x 3 = 230.
44

Example 8 : Solve the following :


Maximize : 15 x 1 + 6 x 2 + 9 x 3 + 2 x 4
subject to 2 x 1 + x 2 + 5 x 3 + 6 x 4 £ 20
3 x 1 + x 2 + 3 x 3 + 25 x 4 £ 24
7 x 1 + x 4 £ 70
x 1 , x 2 , x 3 , x 4 ³ 0.
Solution : By introducing non-negative slack variables s 1 s 2 and s 3 the standard from of
the LPP becomes.
Maximize Z = 15x 1 + 6 x 2 + 9 x 3 + 2x 4 + 0 s 1 + 0 s 2 + 0 s 3
subject to 2x 1 + x 2 + 5x 3 + 6 x 4 + s 1 + 0 s 2 + 0 s 3 = 20
3x 1 + x 2 + 3x 3 + 25x 4 + 0 s 1 + s 2 + 0 s 3 = 24
7 x 1 + 0 x 2 + 0 x 3 + x 4 + 0 s 1 + 0 s 2 + s 3 = 70
and x 1 , x 2 , x 3 , x 4 , s 1 , s 2 , s 3 ³ 0.
\ The initial basic feasible solution is s 1 = 20, s 2 = 24, s 3 = 70 (x 1 = x 2 = x 3 = x 4 = 0,
non-basic)
The initial simplex table is given by
Initial iteration :
Cj (15 6 9 2 0 0 0)
CB YB XB x1 x2 x3 x4 s1 s2 s3 q
20
0 s1 20 2 1 5 6 1 0 0 = 10
2
24
0 s2 24 (3) 1 3 25 0 1 0 = 8*
3
70
0 s3 70 7 0 0 1 0 0 1 = 10
7
Zj -Cj 0 -15 -6 -9 -2 0 0 0
Since there are some ( Z j - C j ) £ 0, the current basic feasible solution is not optimal.
The non-basic variable x 1 enters into the basis and the basic variable s 2 leaves the basis.
First iteration :
Cj (15 6 9 2 0 0 0)
CB YB XB x1 x2 x3 x4 s1 s2 s3 q
æ1ö 32 2
0 s1 4 0 ç ÷ 3 - 1 - 0 12*
è3ø 3 3
1 25 1
15 x1 8 1 1 0 0 24
3 3 3
7 -172 7
0 s3 14 0 - -7 0 - 1 —
3 3 3
Zj -Cj 120 0 -1 6 123 0 5 0
45

Since ( Z 2 - C 2 ) = - 1 < 0, the current basic feasible solution is not optimal.


The non-basic variable x 2 enters into the basis and the basic variable s 1 leaves the basis.
Second iteration :
Cj (15 6 9 2 0 0 0)
CB YB XB x1 x2 x3 x4 s1 s2 s3
6 x2 12 0 1 9 -32 3 -2 0
57
15 x1 4 1 0 -2 -1 1 0
3
0 s3 42 0 0 14 -132 7 -7 1
Zj -Cj 132 0 0 15 91 3 3 0
Since all ( Z j - C j ) ³ 0, the current basic feasible solution is optimal.
\ The optimal solution is given by
Max. x 1 = 4, x 2 = 12, x 3 = 0 and x 4 = 0.
Example 9 : Solve the following LPP by simplex method :
Minimize Z = 8 x 1 - 2 x 2 .
subject to - 4 x1 + 2 x 2 £ 1
5 x1 - 4 x 2 £ 3
x 1 , x 2 ³ 0.
Solution : Since the given objective function is of minimization type, we shall convert it
in to a maximization type as follows :
Maximize (- Z) = Maximize Z * = - 8x 1 + 2x 2
subject to - 4 x 1 + 2x 2 £ 1
5x 1 - 4 x 2 £ 3
x 1 , x 2 ³ 0.
By introducing non-negative slack variables s 1 , s 2 , the standard form of the LPP
becomes
Maximize Z * = - 8x 1 + 2x 2 + 0 s 1 + 0 s 2
subject to the constraints
- 4 x 1 + 2x 2 + s 1 + 0 s 1 = 1
5x 1 - 4 x 2 + 0 s 1 + s 2 = 3
and x 1 , x 2 , s 1 , s 2 ³ 0.
\ The initial basic feasible solution is given by s 1 = 1, s 2 = 3, ( x 1 = x 2 = 0, non-basic.)
Initial iteration :
Cj (- 8 2 0 0)
CB YB XB x1 x2 s1 s2 q
1
0 s1 1 -4 (2) 1 0 *
2
0 s2 3 5 -4 0 1 —
Z j* - C j 0 8 -2 0 0
46

Since ( Z *2 - C 2 ) = - 2 < 0 , the current basic feasible solution is not optimal.


The non-basic variable x 2 enters the basis and the basic variable s 1 leaves the basis.
First iteration :
Cj (- 8 2 0 0)
CB YB XB x1 x2 s1 s2
1 1
2 x2 -2 1 0
2 2
0 s2 5 -3 0 2 1
Z j* - C j 1 4 0 1 0

Since all ( Z *j - C j ) ³ 0, the current basic feasible solution is optimal.


1
\The optimal solution is given by maximize Z * = 1, x 1 = 0, x 2 = ,
2
But Minimize Z = - Maximize ( - Z) = - Maximize Z * = - 1
1
\ Min. Z = - 1, x 1 = 0, x 2 = .
2
Aliter : The above problem can be solved without converting the objective function in to
maximization type.
Given Minimize Z = 8x 1 - 2x 2
Subject to the constraints - 4 x 1 + 2x 2 £ 1
5x 1 - 4 x 2 £ 3
x 1 , x 2 ³ 0.
\ By introducing the non-negative slack variable s 1 , s 2 the LPP becomes
Minimize Z = 8x 1 - 2x 2 + 0 s 1 + 0 s 2
subject to the constraints - 4 x 1 + 2x 2 + s 1 + 0 s 2 = 1
5x 1 - 4 x 2 + 0 s 1 + s 2 = 3
x 1 , x 2 , s 1 , s 2 ³ 0.
The initial basic feasible solution is given by
s 1 = 1, s 2 = 3 (basic) ( x 1 = x 2 = 0, non-basic)
Initial iteration :
Cj (8 -2 0 0)
CB YB XB x1 x2 s1 s2 q
1
0 s1 1 -4 (2) 1 0 *
2
0 s2 3 5 -4 0 1 —
Zj -Cj 0 -8 2 0 0

Since ( Z 2 - C 2 ) = 2 > 0 , the current basic feasible solution is not optimal.


47

To find the entering variable :


Since ( Z 2 - C 2 ) = 2 is most positive, the corresponding non-basic variable x 2 enters
into the basis.
To find the leaving variable :
1
The leaving variable is the basic variable s 1 corresponding to the minimum ratio q = .
2
First iteration :
Cj (8 -2 0 0)
CB YB XB x1 x2 s1 s2
1 1
-2 x2 -2 1 0
2 2
0 s2 5 -3 0 2 1
Zj -Cj -1 -4 0 -1 0

Since all ( Z j - C j ) £ 0, the current basic feasible solution is optimal.


1
\The optimal solution is Min Z = - 1, x 1 = 0, x 2 =
2
* Example 10 : Use simplex method to
Min Z = x 2 - 3 x 3 + 2 x 5
subject to 3 x1 - x 3 + 2 x 5 £ 7
- 2 x 2 + 4 x 3 £ 12
- 4 x 2 + 3 x 3 + 8 x 5 £ 10
and x 2 , x 3 , x 5 ³ 0.
Solution : Since the given objective function is of minimization type, we shall convert it
in to a maximization type as follows :
Maximize ( - Z) = Maximize Z * = - x 2 + 3x 3 - 2x 5
subject to 3x 1 - x 3 + 2x 5 £ 7
- 2x 2 + 4 x 3 £ 12
- 4 x 2 + 3x 3 + 8x 5 £ 10
x 2 , x 3 , x 5 ³ 0.
By introducing non-negative slack variables s 1 , s 2 and s 3 , the standard from of the LPP
becomes
Maximize Z * = - x 2 + 3x 3 - 2x 3 + 0 s 1 + 0 s 2 + 0 s 3
subject to the constraints
3x 2 - x 3 + 2x 5 + s 1 + 0 s 2 + 0 s 3 = 7
- 2x 2 + 4 x 3 + 0 x 5 + 0 s 1 + s 2 + 0 s 3 = 12
- 4 x 2 + 3x 3 + 8x 5 + 0 s 1 + 0 s 2 + s 3 = 10
and x 2 , x 3 , x 5 , s 1, s 2 , s 3 ³ 0.
48

\ The initial basic feasible solution is given by s 1 = 7, s 2 = 12, s 3 = 10 (x 2 = x 3 = x 5 = 0,


non-basic)
Initial iteration :
Cj (-1 3 -2 0 0 0)
CB YB XB x2 x3 x5 s1 s2 s3 q
0 s1 7 3 -1 2 1 0 0 —
12
0 s2 12 -2 (4) 0 0 1 0 = 3*
4
10
0 s3 10 -4 3 8 0 0 1 = 3 × 33
3
Z *j - C j 0 1 -3 2 0 0 0

Since ( Z *2 - C 2 ) £ 0, the current basic feasible solution is not optimal.


The non-basic variable x 3 enters into the basis and the basic variable s 2 leaves the basis.
First iteration :
Cj (-1 3 -2 0 0 0)
CB YB XB x2 x3 x5 s1 s2 s3 q
æ 5ö 1 20
0 s1 10 ç ÷ 0 2 1 0 = 4*
è 2ø 4 5
-1 1
0 s2 3 1 0 0 0 —
2 4
-5 -3
0 s3 1 0 8 0 1 —
2 4
-1 3
Z *j - C j 0 0 2 0 0
2 4
Since ( Z *2 - C 2 ) £ 0, the current basic feasible solution is not optimal.
The non-basic variable x 2 enters into the basis and the basic variable s 1 leaves the basis.
Second iteration :
Cj (-1 3 2 0 0 0)
CB YB XB x2 x3 x5 s1 s2 s3
4 2 1
-1 x2 4 1 0 0
5 5 10
2 1 3
3 x3 5 0 1 0
5 5 10
-1
0 s3 11 0 0 10 1 1
2
12 1 4
( Z *j - C j ) 11 0 0 0
5 5 5
49

Since ( Z *2 - C 2 ) ³ 0, the current basic feasible solution is not optimal.


\ The optimal solution is given by
maximize Z * = 11, x 2 = 4, x 3 = 5, x5 = 0
*
But Minimize Z = - Minimize Z = - 11
\ Min Z = - 11, x 2 = 4, x 3 = 5, x 5 = 0.
* Example 11 : An automobile manufacturer makes auto-mobiles and trucks in a
factory that is divided into two shops. Shop A, which performs the basic assembly
operation must work 5 man-days on each truck but only 2 man-days on each
automobile. Shop B, which performs finishing operation, must work 3 man-days for
each truck or automobile that it produces. Because of men and machine limitations
shop A has 180 man-days per week available while shop B has 135 man-days per
week. If the manufacturer makes a profit of Rs. 300 on each truck and Rs. 200 on each
automobile, how many of each should he produce to maximize his profit ?
Solution : Let x 1 units of trucks and x 2 units of automobiles be manufactured per week
to maximize his profit.
Then the mathematical from of the given problem will be :
Maximize Z = 300 x 1 + 200 x 2
subject to 5x 1 + 2x 2 £ 180
3x 1 + 3x 2 £ 135
and x 1 , x 2 ³ 0.
By introducing non-negative slack variables s 1 and s 2 , the standard from of the LPP
becomes
Maximize Z = 300 x 1 + 200 x 2 + 0 s 1 + 0 s 2
Subject to 5x 1 + 2x 2 + s 1 + 0 s 2 = 180
3x 1 + 3x 2 + 0 s 1 + s 2 = 135
and x 1 , x 2 , s1 , s 2 ³ 0
\ The initial basic feasible solution is given by s 1 = 180, s 2 = 135, ( x 1 = x 2 = 0, non-
basic)
Initial iteration :
Cj (300 200 0 0)
CB YB XB x1 x2 s1 s2 q
180
0 s1 180 (5) 2 1 0 = 36 *
5
135
0 s2 135 3 3 0 1 = 45
3
Zj -Cj 0 -300 -200 0 0
50

First iteration : Introduce x 1 and drop s 1 .


Cj (300 200 0 0)
CB YB XB x1 x2 s1 s2 q
2 1 5
300 x1 36 1 0 36 ´ = 90
5 5 2
æ9 ö -3 5
0 s2 27 0 ç ÷ 1 27 ´ = 15 *
è 5ø 5 9
Zj -Cj 10,800 0 -80 60 0

Second iteration : Introduce x 2 and drop s 2 .


Cj (300 200 0 0)
CB YB XB x1 x2 s1 s2
1 -2
300 x1 30 1 0
3 9
-1 5
200 x2 15 0 1
3 9
100 400
(Z j - C j ) 12,000 0 0
3 9

Since all ( Z j - C j) ³ 0, the current basic feasible solution is optimal.


\ The optimal solution is Max Z = 12,000, x 1 = 30, x 2 = 15.
The manufacturer should manufacture 30 trucks and 15 automobiles per week in order
to get a maximum profit of Rs.12000.
* Example 12 : A gear manufacturing company received an order for three
specific types of gears for regular supply. The management is considering to devote
the available excess capacity to one or more of the three types, say A, B and C. The
available capacity on the machines which might limit output and the number of
machine hours required for each unit of respective gear is also given below :
Machine Type Available Productivity in machine hours/unit
machine
Gear A Gear B Gear C
hours/week
Gear Hobbing m/c 250 8 2 3
Gear Shaping m/c 150 4 3 0
Gear Grinding m/c 50 2 — 1

The unit profit would be Rs. 20, Rs. 6 and Rs. 8 respectively for the gears A, B
and C. Find how much of each gear the company should produce in order to
maximize profit ?
51

Solution. Let x 1 , x 2 and x 3 be and the number of units of gears A, B and C produced
respectively to maximize the profit. The mathematical formulation of the LPP is given by
Maximize Z = 20 x 1 + 6 x 2 + 8x 3
subject to 8x 1 + 2x 2 + 3x 3 £ 250
4 x 1 + 3x 2 £ 150
2x 1 + x 3 £ 50
and x 1 , x 2 , x 3 ³ 0.
By introducing non-negative slack variables s 1 , s 2 and s 3 , the standard from of the LPP
becomes
Maximize Z * = 20 x 1 + 6 x 2 + 8x 3 + 0 s 1 + 0 s 2 + 0 s 3
Subject to the constraints
8x 1 + 2x 2 + 3x 3 + s 1 + 0 s 2 + 0 s 3 = 250
4 x 1 + 3x 2 + 0 s 1 + s 2 + 0 s 3 = 150
2x 1 + 0 x 2 + x 3 + 0 s 1 + 0 s 2 + s 3 = 50
and x 1 , x 2 , x 3 , s 1 , s 2, s 3 ³ 0.
\ The initial basic feasible solution is given by s 1 = 250, s 2 = 150, s 3 = 50
( x 1 = x 2 = x 3 = 0, non-basic).
Initial iteration :
Cj (20 6 8 0 0 0)
CB YB XB x1 x2 x3 s1 s2 s3 q
250
0 s1 250 8 2 3 1 0 0
8
150
0 s2 150 4 3 0 0 1 0
4
50
0 s3 50 (2) 0 1 0 0 1 *
2
Zj -Cj 0 -20 -6 -8 0 0 0

First iteration : Introduce x 1 and drop s 3 .

Cj (20 6 8 0 0 0)
CB YB XB x1 x2 x3 s1 s2 s3 q
50
0 s1 50 0 2 -1 1 0 -4
2
50
0 s2 50 0 (3) -2 0 1 -2 *
3
1 1
20 x1 25 1 0 0 0 —
2 2
Zj -Cj 500 0 -6 2 0 0 10
52

Second iteration : Introduce x 2 and drop s 2 .

Cj (20 6 8 0 0 0)
CB YB XB x1 x2 x3 s1 s2 s3 q
0 s1 50 0 0 1 1 -2 -8 50
3 3 3 3
6 x2 50 0 1 -2 0 1 2 —
-
3 3 3 3
20 x1 25 1 0 æ1ö 0 0 1 50*
ç ÷
è 2ø 2
Zj -Cj 600 0 0 -2 0 2 6
Third iteration : Introduce x 3 and drop x 1 .
Cj (20 6 8 0 0 0)
CB YB XB x1 x2 x3 s1 s2 s3
-2 -2
0 s1 0 0 0 1 -3
3 3
4 1
6 x2 50 1 0 0 0
3 3
8 x3 50 2 0 1 0 0 1
Zj -Cj 700 4 0 0 0 2 8
Since all ( Z j - C j ) ³ 0, the current basic feasible solution is optimal.
\ The optimal solution is Max Z = 700, x 1 = 0, x 2 = 50, x 3 = 50
\The company should produce 50 units of gear B, 50 units of gear of C and none of gear A
in order to have maximum profit Rs. 700.
Artificial Variables Techniques
To solve a LPP by simplex method, we have to start with the initial basic feasible solution
and construct the initial simplex table. In the previous problems, we see that the slack
variables readily provided the initial basic feasible solution. However, in some problems, the
slack variables cannot provide the initial basic feasible solution. In these problems atleast one
of the constraints is of = or ³ type. To solve such linear programming problems, there are two
(closely related) methods avaialble.
(i) The ‘‘Big M-Method’’ or ‘‘M-technique’’ or the ‘‘Method of penalties’’ due to A.
Charnes.
(ii) The ‘‘Two phase’’ method due to Dantzig, Orden and Wolfe.
The Big M-Method :
Step (1) : Express the linear programming problem in the standard form by introducing
slack and/or surplus variables, if necessary.
53

Step (2) : Introduce the non-negative artificial variables R1 , R2 ... to the left hand side of
all the constraints of ³ or = type. The purpose of introducing artificial variables is just to obtain
an initial basic feasible solution. However, addition of these artificial variables causes violation
of the corresponding constraints. Therefore we would like to get rid of these variables and
would not allow them to appear in the final solution. To achieve this we assign a very large
penalty (-M for maximization problems and +M for minimization problems) as the coefficients
of the artificial variables in the objective function.
Step (3) : Solve the modified linear programming problem by simplex method.
(i) If no artificial variable remains in the basis and the optimality condition is
satisfied,then the current solution is an optimal basic feasible solution.
(ii) If atleast one artificial variable appears in the basis at zero level (with zero value of
X B column) and the optimality condition is satisfied, then the current solution is
an optimal basic feasible (though degenerated) solution.
(iii) If atleast one artificial variable appears in the basis at non-zero level (with positive
value in X B column) and the optimality condition is satisfied, then the original
problem has no feasible solution. The solution satisfies the constraints but does not
optimize the objective function since it contains a very large panalty M and is called
pseudo-optimal solution.
Note : While applying simplex method, whenever an artificial variable happens to leave
the basis, we drop that artificial variable and omit all the entries corresponding to its column
from the simplex table.
* Example 13 : Solve the following LPP by simplex method :
Maximize Z = 3 x 1 + 2 x 2
subject to 2 x1 + x 2 £ 2
3 x 1 + 4 x 2 ³ 12
and x 1 , x 2 ³ 0.
Solution : By introducing the non-negative slack variable s 1 and surplus variable s 2 ,
the standard from of the LPP becomes
Maximize Z = 3x 1 + 2x 2 + 0 s 1 + 0 s 2
Subject to 2x 1 + x 2 + s 1 + 0 s 2 = 2
3x 1 + 4 x 2 + 0 s 1 - s 2 = 12
x 1 , x 2 , s 1 , s 2 ³ 0.
But this will not yield a basic feasible solution. To get the basic feasible solution, add the
artificial variable R1 to the left hand side of the constraint equation which does not possess the
slack variable not assign—M to the artificial variable in the objective function. The LPP
becomes
Max. Z = 3x 1 + 2x 2 + 0 s 1 + 0 s 2 - MR1
Subject to 2x 1 + x 2 + s 1 + 0 s 2 = 2
3x 1 + 4 x 2 + 0 s 1 - s 2 + R1 = 12
x 1 , x 2 , s 1 , s 2 , R1 ³ 0
54

The initial basic feasible solution is given by


s 1 = 2, R1 = 12, (basic) (x 1 = x 2 = s 2 = 0, non-basic)
Initial iteration :
Cj (3 2 0 0 -M )
CB YB XB x1 x2 s1 s2 R1 q
2
0 s1 2 2 (1) 1 0 0 =2
1
12
-M R1 12 3 4 0 -1 1 =3
4
Zj -Cj -12 M -3M - 3 -4 M - 2 0 M 0

Since there are some ( Z j - C j ) < 0, The current basic feasible solution is not optimal.
The non-basic variable x 2 enters into the basis and the basic variable s 1 leaves the basis.
First iteration :
Cj (3 2 0 0 -M )
CB YB XB x1 x2 s1 s2 R1
2 x2 2 2 1 1 0 0
-M R1 4 -5 0 -4 -1 1
Zj -Cj -4 M + 4 - 5M + 1 0 4M + 2 M 0

Since all ( Z j - C j ) ³ 0, and an artificial variable R1 appears in the basis at non-zero


level, the given LPP does not possess any feasible solution. But the LPP possess a pseudo
optimal solution.
* Example 14 : Solve the following problem by simplex method :
Maximize Z = x 1 + 2 x 2 + 3 x 3 - x 4
Subject to x 1 + 2 x 2 + 3 x 3 = 15
2 x 1 + x 2 + 5 x 3 ³ 20
x 1 + 2 x 2 + x 3 + x 4 ³ 20
x 1 , x 2 , x 3 , x 4 ³ 0.
Solution : By introducing the non-negative surplus variables s 1 and s 2 , the standard
from of the LPP becomes
Maximize Z = x 1 + 2x 2 + 3x 3 - x 4 + 0 s 1 + 0 s 2
subject to x 1 + 2x 2 + 3x 3 + 0 s 1 + 0 s 2 = 15
2x 1 + x 2 + 5x 3 - s 1 + 0 s 2 = 20
x 1 + 2x 2 + x 3 + x 4 + 0 s 1 - s 2 = 10
x 1, x 2 , x 3 , x 4 , s 1, s 2 ³ 0
But this will bot yield a basic feasible solution. To get the basic feasible solution, add the
artificial variables R1 , R2 , R3 , to the left hand side of the constraint equations which does not
55

possess the slack variables and assign -M to the artificial variables in the objective function. So
the LPP becomes
Max Z = x 1 + 2x 1 + 3x 3 - x 4 + 0 s 1 + 0 s 2 - MR1 - MR2 - MR3
subject to the constraints
x 1 + 2x 2 + 3x 3 + 0 s 1 + 0 s 2 + R1 = 15
2x 1 + x 2 + 5x 3 - s 1 + 0 s 2 + R2 = 20
x 1 + 2x 2 + x 3 + x 4 + 0 s 1 - s 2 + R3 = 10
x 1 , x 2 , x 3 , x 4 , s 1 , s 2 , R1 , R2 , R3 ³ 0
The initial basic feasible solution is given by
R1 = 15, R2 = 20, R3 = 10 (basic) (x 1 = x 2 = x 3 = x 4 = s 1 = s 2 = 0, non-basic)
Initial iteration :
Cj (1 2 3 -1 0 0 -M -M -M)
CB YB XB x1 x2 x3 x4 s1 s2 R1 R2 R3 q
15
-M R1 15 1 2 3 0 0 0 1 0 0 =5
3
20
-M R2 20 2 1 (5) 0 -1 0 0 1 0 =4
5
10
-M R3 10 1 2 1 1 0 -1 0 0 1 = 10
1
(Z j - C j ) -45 M - 4M -1 - 5M - 2 -9M-3 - M+1 M M 0 0 0

Since there are some ( Z j - C j ) < 0, the current basic feasible solution is not optimal.
The non basic variable x 3 enters into the basis and basic variable R2 leaves the basis.
Also since the artificial variable R2 leaves the basis, we drop that artificial variable R2 and
omit all the eateries corresponding to its column form the simplex table.
First iteration :
Cj (1 2 3 -1 0 0 -M -M)
CB YB XB x1 x2 x3 x4 s1 s2 R1 R3 q
1 æ7 ö 3 15
-M R1 3 - ç ÷ 0 0 0 1 0
5 è 5ø 5 7
2 1 -1
3 x3 4 1 0 0 0 0 20
5 5 5
3 9 1 30
-M R3 6 0 1 -1 0 1
5 5 5 9
-9 M -2M + 1 -16 M - 7 - M -4 M - 3
Zj -Cj 0 M 0 0
+ 12 5 5 +1 5

Since there are some ( Z j - C j ) < 0 , the current basic feasible solution is not optimal;.
56

The nonbasic variable x 2 enters into the basis and the basic variable R1 leaves the basis.
Second iteration :
Cj (1 2 3 -1 0 0 -M)
CB YB XB x1 x2 x3 x4 s1 s2 R3 q
15 -1 3
2 x2 1 0 0 0 0 —
7 7 7
25 3 -2
3 x3 0 1 0 0 0 —
7 7 7
15 6 -4 15
-M R3 0 0 (1) -1 1
7 7 7 7
-15M + 105 - 6M 4M
(Z j - C j ) 0 0 - M+1 M 0
7 7 7

Since there are some ( Z j - C j ) < 0 , the current basic feasible solution is not optimal.
The non basic variable x 4 enters into the basis and the basic variable R3 leaves the basis.
Third iteration :
Cj (1 2 3 -1 0 0)
CB YB XB x1 x2 x3 x4 s1 s2 q
15 -1 3
2 x2 1 0 0 0 —
7 7 7
25 3 -2 25
3 x3 0 1 0 0
7 7 7 3
15 æ6 ö -4 15
-1 R4 ç ÷ 0 0 1 -1
7 è7 ø 7 6
90 -6 4
Zj -Cj 0 0 0 1
7 7 7
-6
Since there are some ( Z j - C j ) =
< 0, the current basic feasible solution is not optimal.
7
The non-basic variable x 1 enters the basic and the basic variable x 4 leaves the basis.
Fourth iteration :
Cj (1 2 3 -1 0 0)
CB YB XB x1 x2 x3 x4 s1 s2
5 1 1 -1
2 x2 0 1 0
2 6 3 6
5 -1 1
3 x3 0 0 1 0
2 2 2
5 7 -2 -7
1 x1 1 0 0
2 6 3 6
(Z j - C j ) 15 0 0 0 1 0 0
57

Since all ( Z j - C j ) < 0, the current basic feasible solution is optimal.


5 5 5
\ The optimal solution is Max Z = 15, x 1 = , x 2 = , x 3 = , x 4 = 0 .
2 2 2
Example 15 : Use Big- M method to solve
Minimize Z = 4 x 1 + 3 x 2
subject to 2 x 1 + x 2 ³ 10
-3 x 1 + 2 x 2 £ 6
x1 + x 2 ³ 6
and x 1, x 2 ³ 0.
Solution : Given Min Z = 4 x 1 + 3x 2
subject to 2x 1 + x 2 ³ 10
-3x 1 + 2x 2 ³ 6
x1 + x 2 ³ 6
x 1, x 2 ³ 0.
That is Max Z* = - 4 x 1 - 3x 2
subject to 2x 1 + x 2 ³ 10
-3x 1 + 2x 2 ³ 6
x1 + x 2 ³ 6
x 1, x 2 ³ 0 .
By introducing the non-negative slack, surplus and artificial variables, the standard
from of the LPP becomes
Max Z * = - 4 x 1 - 3x 2 + 0 s 1 + 0 s 2 + 0 s 3 - MR1 - MR2
subject to 2x 1 + x 2 - s 1 + 0 s 2 + 0 s 3 + R1 = 10
-3x 1 + 2x 2 + 0 s 1 + s 2 + 0 s 3 = 6
x 1 + x 2 + 0 s 1 + 0 s 2 - s 3 + R2 = 6
and x 1, x 2 , x 3 , s 1 , s 2 , s 3 , R1, R2 ³ 0 .
(Here : s 1 , s 3 - surplus, s 2 - slack , R1 , R2 —artificials )
The initial basic feasible solution is given by
R1 = 10, s 2 = 6, R2 = 6 (basic) (x 1 = x 2 = s 1 = s 3 = 0, non-basic)
Initial iteration :
Cj (- 4 -3 0 0 0 -M -M)
CB YB XB x1 x2 s1 s2 s3 R1 R2 q
10
-M R1 10 (2) 1 -1 0 0 1 0 =5
2
0 s2 6 -3 2 0 1 0 0 0 —
6
-M R2 6 1 1 0 0 -1 0 1 =6
1
(Z *j - C j ) -16 M - 3M + 4 -2M + 3 M 0 M 0 0
58

Since there are some ( Z *j - C j ) < 0 , the current basic feasible solution is not optimal.
The non-basic variable x 1 enters into the basis and the basic variable R1 leaves the basis.
First iteration :
Cj (- 4 -3 0 0 0 -M)
CB YB XB x1 x2 s1 s2 s3 R2 q
1 -1
-4 x1 5 1 0 0 0 10
2 2
7 -3 42
0 s2 21 0 1 0 0
2 2 7
æ1ö 1
-M R2 1 0 ç ÷ 0 -1 1 2
è 2ø 2
-M +2 -M +4
(Z *j - C j ) -M - 20 0 0 M 0
2 2

Since there are some ( Z *j - C j ) < 0 , the current basic feasible solution is not optimal.
The non-basic variable x 2 enters into the basis and the basic variable R2 leaves the
basis.
Second iteration :
Cj (- 4 -3 0 0 0)
CB YB XB x1 x2 s1 s2 s3
-4 x1 4 1 0 -1 0 1
0 s2 14 0 0 -5 1 7
-3 x2 2 0 1 1 0 -2
( Z *j - C j ) - 22 0 0 1 0 2

Since all ( Z *j - C j ) ³ 0, the current basic feasible solution is optimal.


\ Max Z * = - 22, x 1 = 4, x 2 = 2
But Min Z = - Max ( - Z) = - Max Z * = - ( - 22) = 22.
\ The optimal solution is Min Z = 22, x 1 = 4, x 2 = 2
* Example 16 : Use penalty method to
Maximize Z = 2 x 1 + x 2 + x 3
subject to 4 x 1 + 6 x 2 + 3 x 3 £ 8
3 x1 - 6 x 2 - 4 x 3 £ 1
2 x1 + 3 x 2 - 5 x 3 ³ 4
and x1 , x 2 , x 3 ³ 0 .
59

Solution : By introducing the non-negative slack, surplus and artificial variables, the
standard from of the LPP becomes
Max Z = 2x 1 + x 2 + x 3 + 0 s 1 + 0 s 2 + 0 s 3 - MR1
subject to 4 x 1 + 6 x 2 + 3x 3 + s 1 + 0 s 2 + 0 s 3 = 8
3x 1 - 6 x 2 - 4 x 3 + 0 s 1 + s 2 + 0 s 3 = 1
2x 1 + 3x 2 - 5x 3 + 0 s 1 + 0 s 2 + s 3 + R1 = 4
and x 1 , x 2 , x 3 , s 1 , s 2 , s 3 , R1 ³ 0
(Here : s 1 , s 2 - slack, s 3 - surplus, R1 - artificial)
s 1 = 8, s 2 = 1, R1 = 4 (basic) (x 1 = x 2 = x 3 = s 3 = 0, non-basic)
Initial iteration :
Cj (2 1 1 0 0 0 -M)
CB YB XB x1 x2 x3 s1 s2 s3 R1 q
8
0 s1 8 4 6 3 1 0 0 0 = 13
.
6
0 s2 1 3 -6 -4 0 1 0 0 -
4
-M R1 4 2 (3) -5 0 0 -1 1 = 133
.
3
(Z j - C j ) - 4M -2M - 2 - 3M - 1 5M - 1 0 0 M 0

Since there are some ( Z j - C j ) < 0, the current basic feasible solution is not optimal.
The non-basic variable x 2 enters into the basis and the basic variable R1 leaves the
basis.
First iteration :
Cj (2 1 1 0 0 0)

CB YB XB x1 x2 x3 s1 s2 s3 q

0 s1 0 0 0 (13) 1 0 2 0

0 s2 9 7 0 -14 0 1 -2 -
4 2 -5 -1
1 x1 1 0 0 —
3 3 3 3
4 -4 -8 -1
(Z j - C j ) 0 0 0
3 3 3 3

Since there are some ( Z j - C j ) < 0, the current basic feasible solution is not optimal.
The non-basic variable x 3 enters into the basis and the basic variable s 1 leaves the basis.
60

Second iteration :
Cj (2 1 1 0 0 0)
CB YB XB x1 x2 x3 s1 s2 s3 q
1 2
1 x3 0 0 0 1 0 —
13 13
14 2 9
0 s2 9 (7) 0 0 1
13 13 7
4 2 5 -1
1 x2 1 0 0 2
3 3 39 13
4 -4 8 1
(Z j - C j ) 0 0 0
3 3 39 13
Since there are some ( Z j - C j ) < 0, the current basic feasible solution is not optimal.
The non-basic variable x 1 enters into the basis and the basic variable s 2 leaves the basis.
Third iteration :
Cj (2 1 1 0 0 0)
CB YB XB x1 x2 x3 s1 s2 s3 q
1 2
1 x3 0 0 0 1 0
13 13
9 2 1 2
2 x1 1 0 0
7 13 7 91
10 1 -2 -25
1 x2 0 1 0
21 39 21 273
64 16 4 +29
(Z j - C j ) 0 0 0
21 39 21 273
Since all ( Z j - C j ) < 0, the current basic feasible solution is optimal.
64 9 10
\ The optimal solution is Max Z = , x1 = , x 2 = , x 3 = 0.
21 7 21
The Two Phase Method
The two phase method is another method to solve a given problem in which some
artificial variables are involved. The solution is obtained in two phases as follows :
Phase-I
In this phase, the simplex method is applied to a specially constructed auxiliary linear
programming problem leading to a final simplex table containing a basic feasible solution to
the original problem.
Step 1 : Assign a cost - 1 to each artificial variable and a cost 0 to all other variables (in
place of their original cost) in the objective function. Thus the new objective function is Z *
= - R1 - R2 - R3 -.....- Rn
where Ri ' s are the artificial variables.

You might also like