chap 5a Linear Programming pdf

chap-5a

B.V.Ramana

September 13, 2006

Chapter

17:59

5
Linear Programming

5.1 INTRODUCTION
Optimization problems seek to maximize or minimize a function of a number of variables which
are subject to certain constraints. The objective may
be to maximize the profit or to minimize the cost.
The variables may be products, man-hours, money
or even machine hours. Optimal allocation of limited resources to achieve a given object forms programming problems. A programming problem in
which all the relations between the variables is linear including the function to be optimized is called a
Linear Programming Problem (LPP). G.B. Dantzig,

in 1947, first developed and applied general problem
of linear programming. Classical examples include
transportation problem, activity-analysis problem,
diet problems and network problem. The simplex
method, developed by GB Dantzig, in 1947, continues to be the most efficient and popular method to
solve general LPP. Karmarkar’s method developed
in 1984 has been found to be upto 50 times as fast as
the simplex algorithm. LPP is credited to the works
of Kuhn, Tucker, Koopmans, Kantorovich, Charnes
Cooper, Hitchcock, Stiegler. LPP has been used to
solve problems in banking, education, distribution
of goods, approximation theory, forestry, transportation and petroleum.
5.2 FORMULATION OF LPP
In a linear programming problem (LPP) we wish to
determine a set of variables known as decision vari-

ables. This is done with the objective of maximizing or minimizing a linear function of these variables, known as objective function, subject to certain
linear inequality or equality constraints. These variables, should also satisfy the nonnegativity restrictions since these physical quantities can not be negative. Here linearity is characterized by proportionality and additivity properties.
Let x1 , x2 . . . , xn be the n decision unknown variables and c1 , c2 . . . , cn be the associated (constant
cost) coefficients. Then the aim of LP is to optimize

(extremise) the linear function,
z = c1 x 1 + c 2 x 2 + . . . + c n x n

(1)

Here (1) is known as the objective function. (O.F.)
The variables xj are subject to the following m linear
constraints
⎧ ⎫
⎨≥⎬
ai1 x1 + ai2 x2 + . . . + ain xn ≤ bi
(2)
⎩ ⎭


for i = 1, 2, ... m. In (2), for each constraint only one
of the signs ≥ or ≤ or = holds. Finally xi should also
satisfy nonnegativity restrictions
xj ≥ 0 for j = 1 to n


(3)

Thus a general linear programming problem consists
of an objective function (1) to be extremized subject
to the constraints (2) satisfying the non-negativity
restrictions (3).
5.1

chap-5a

B.V.Ramana

5.2

September 13, 2006

17:59

MATHEMATICAL METHODS


Solution
To LPP is any set of values {x1 , x2 . . . , xn } which
satisfies all the m constraints (2).
Feasible Solution
To LPP is any solution which would satisfy the non
negativity restrictions given by (3).
Optimal Feasible Solution
To LPP is any feasible solution which optimizes (i.e.
maximizes or minimizes) the objective function (1).
From among the infinite number of feasible solutions to an LPP, we should find the optimal feasible
solution in which the maximum (or minimum) value
of z is finite.
Example 1: Suppose Ajanta clock company produces two types of clocks “standard” and “deluxe”
using three different inputs A, B, C. From the data
given below formulate the LPP to determine the number of standard and deluxe clock to be manufactured
to maximize the profit.
Let x1 and x2 be the number of “standard” and
“deluxe” clocks to be produced.
Technical coefficients
Input

(Resource)
A
B
C
Profit (Rs)

Standard

Deluxe

2
2
4
2

4
2
0
3


Capacity
20
12
16

Then the objective function is to maximize the
total profit i.e. maximize z = 2x1 + 3x2 , since the
profit for one standard clock is Rs 2 and profit for
one deluxe and clock is Rs 3. Because of the limited
resources, for input A we have the following restriction. Since one standard clock consumes 2 units of
resource A, x1 units of standard clocks consume 2x1
units of input A. Similarly 4x2 units of input A is
required to produce x2 deluxe clocks. Thus the total
requirement of the input A for production of x1 , standard and x2 deluxe clocks is
2x1 + 4x2 .

However, the total amount of resource A available is
20 units only. Therefore the restriction on resource
A is
2x1 + 4x2 ≤ 20

Similarly the restriction of resource B is
2x1 + 2x2 ≤ 12
and restriction on source C is
4x1 ≤ 16.
Since x1 , x2 are physical quantities (the number of
clocks produced), they must be non negative i.e.
x1 ≥ 0
and
x2 ≥ 0.
Thus the LPP consists of the O.F., three inequality
constraints and the non-negativity restrictions.
5.3 GRAPHICAL SOLUTION OF LPP
When the number of decision variables (or products)
is two, the solution to linear programming problem
involving any number of constraints can be obtained
graphically. Consider the first quadrant of the x1 x2
plane since the two variables x1 and x2 should satisfy the nonnegativity restrictions x1 ≥ 0 and x2 ≥ 0.
Now the basic feasible solution space is obtained in
the first quadrant by plotting all the given constraints
as follows. For a given inequality, the equation with

equality sign (replacing the inequality) represents a
straight line in x1 x2 plane dividing it into two open
half spaces. By a test reference point, the correct side
of the inequality is identified. Say choosing origin
(0, 0) as a reference point, if the inequality is satisfied then the correct side of the inequality is the side
on which the origin (0, 0) lies. Indicate this by an
arrow. When all the inequalities are plotted like this,
in general, we get a bounded (or unbounded in case
of greater than inequalities) polygon which enclose
the feasible solution space, any point of which is a
feasible solution.
For z = z0 , the objective function z = c1 x1 + c2 x2
represents an iso-contribution
 (or iso-profit) straight

z0
c1
z
2
line say x2 = − c x1 + c or x1 = −c

x
+
2
c
c
2

2

1

1

chap-5a

B.V.Ramana

September 13, 2006

17:59


LINEAR PROGRAMMING

such that for any point on this line, the contribution (Profit) (value of z0 ) is same. To determine the
optimal solution, in the maximization case, assigning arbitrary values to z, move the iso-contribution
line in the increasing direction of z without leaving the feasible region. The optimum solution occurs
at a corner (extreme) point of the feasible region.
So the iso-profit line attains its maximum value of
z and passes through this corner point. If the isocontribution line (objective function) coincides with
one of the edges of the polygon, then any point on
this edge gives optimal solution with the same maximum (unique) value of the objective function. Such
a case is known as multiple (alternative) optima case.
In the minimization case, assigning arbitrary values
to z, move the iso-contribution line in the direction
of decreasing z until it passes through a corner point
(or coincides with an edge of the polygon) in which
case the minimum is attained at this corner point.

5.3


Examples:
(a) x1 +3x2 ≥ 3, x1 +x2 ≥ 2, x1 , x2 ≥ 0,
Maximize: z = 1.5x1 + 2.5x2 unbounded feasible region, unbounded solution (can be maximized indefinitely)

Fig. 5.1

(b) x1 −x2 ≥ 0, −0.5x1 +x2 ≤ 1 x1 , x2 ≥ 0
Maximize: z = x2 − 0.75x1 unbounded feasible
region z2 = 0.5 is bounded optimal solution.

Range of Optimality
For a given objective function z = c1 x1 + c2 x2 , slope
of z changes as the coefficients c1 and c2 change
which may result in the change of the optimal corner
point itself. In order to keep (maintain) the current
optimum solution valid, we can determine
the range

of optimality for the ratio cc1 or cc2 by restricting the
2
1
variations for both c1 and c2 .
Special Cases:
(a) The feasible region is unbounded and in the case
of maximization, has an unbounded solution or
bounded solution.
(b) Feasible region reduces to a single point which
itself is the optimal solution. Such a trivial solution is of no interest since this can be neither maximized nor minimized.
(c) A feasible region satisfying all the constraints is
not possible since the constraints are inconsistent.
(d) LPP is ill-posed if the non-negativity restriction
are not satisfied although all the remaining constraints are satisfied.

Fig. 5.2

(c) x1 + x2 ≤ 2, −x1 , −5x2 ≤ −10
Maximize: z = −5x2 , x1 , x2 ≥ 0, (0, 2) is unique
solution, max: z = −10.

(0, 2)

Fig. 5.3

(d) x1 + x2 ≤ 1, −0.5x1 − 5x2 ≤ −10
Maximize: z = −5x2 , x1 , x2 ≥ 0. No feasible
region. Constraints are inconsistent

B.V.Ramana

5.4

September 13, 2006

17:59

MATHEMATICAL METHODS

Fig. 5.4

(e) 1.5x1 + 1.5x2 ≥ 9, x1 + x2 ≤ 2.
No feasible region.
(0, 6)
(0, 2)

(2, 0)

(6, 0)

WORKED OUT EXAMPLES

Range of
optimality

0

=
9

To determine the feasible solution space consider
the first quadrant of the x1 x2 -plane since x1 ≥ 0
and x2 ≥ 0. Then draw the straight lines x1 + 4x2 =

z=

x2

3x1 + x2 ≤ 21
(assembly) (III)

x1 ≥ 0 non negative
(IV)
x2 ≥ 0 constraints
(V)

1

C

+

(testing) (II)

Solution
Space

x1 + 4
x2 =
24
x1

x1 + x 2 ≤ 9

D

1
=2

(wiring) (I)

3
2

+ x2
3x 1

Solution: Let x1 be the number of business calculators (BC) produced while x2 be the number of
scientific calculators (SC) produced. Then the objective is to maximize the profit z = 4x1 + 10x2 subject
to the following fine constraints:
x1 + 4x2 ≤ 24

x2
z=
66
z=
60
z= E
54
z=
28

um
im
pt
O

Example 1: ABC company produces two types of
calculators. A business calculator requires 1 hour of
wiring, one hour of testing and 3 hours of assembly, while a scientific calculator requires 4 hours of
wiring, one hour of testing and one hour of assembly.
A total of 24 hours of wiring, 21 hours of assembly
and 9 hours of testing are available with the company.
If the company makes a profit of Rs 4 on business
calculator (BC) and Rs 10 on scientific calculator
(SC), determine the best product mix to maximize
the profit.

24, x1 + x2 = 9 and 3x1 + x2 = 2.1. Note that an
inequality divides the x1 x2 -plane into two open halfspace. Choose any reference point in the first quadrant. If this reference point satisfies the inequality
then the correct side of the inequality is the side on
which the reference point lies. Generally origin (0,
0) is taken as the reference point. The correct side of
the inequality is indicated by an arrow. The shaded
region is the required feasible solution space satisfying all the five constraints. The five corner points of
the feasible region are A(0, 0), B(7, 0), C(6, 3), D(4,
5), E(0, 6). Identify the direction in which z increases
without leaving the region. Arbitrarily choosing z =
0, 28, 54, 60, 66, observe that the straight lines (profit
z
function) z = 4x1 + 10x2 or x2 = − 25 x1 + 10
passes
through the corner points A, B, C, E, D respectively.
The optimum solution occurs at the corner point D(4,
5), where the maximum value for z = 66 is attained.
Thus the best product mix is to produce 4 business
and 5 scientific calculator which gives a maximum
profit of Rs. 66.

Increasing z

chap-5a

A

B

x1

Fig. 5.5

Example 2: (a) Solve the above problems to minimize z = −4x1 − 10x2 .
(b) If z = c1 x1 + c2 x2 , does an alternative optimal
solution exists
(c)Determine
the range of optimality for the ratio

c2
c1
or
.
c
c
2

1

chap-5a

B.V.Ramana

September 13, 2006

17:59

LINEAR PROGRAMMING
z
. Choose
Solution: (a) Rewriting, x2 = − 25 x1 − 10
z = 0, −28, −54, −60, −66, then the objective
function passes through the corner points A, B, C,
E, D respectively. Thus the minimum value z = −66
is attained at the corner point D(4, 5). Observe that
maximum of z = 4x1 + 10x2 is 66 and minimum of
z = −4x1 − 10x2 is − 66
i.e., max f (x) = − min (−f (x)).
(b) If z = c1 x1 + c2 x2 coincides with the straight line
CD: x1 + x2 = 9, then any point on the line segment
CD is an optimal solution to the current problem and
thus has multiple (infinite) alternative optima.
(c) Let z = c1 x1 + c2 x2 be the objective function.
Then for c2 = 0, we write this as
z
−c1
x1 +
x2 =
c2
c2
The straight line
x1 + 4x2 = 24 rewritten as x2 = − 41 x1 + 24
has
4
1
slope − 4 and the straight line x1 + x2 = 9 rewritten
as x2 = −x1 + 9 has slope −1. Thus range of optimality which will keep the present optimum solution
valid is
c1
1

≤1
4
c2
For c2 = 4, 1 ≤ c1 ≤ 4
Similarly for c1 = 0, the range of optimality is
1 ≤ cc2 ≤ 4. For c1 = 2, 2 ≤ c2 ≤ 8.

10S + 10Y ≥ 80
and X, Y ≥ 0
Draw the straight lines

Fertilizer Nitrogen Phos. Potassium Price/100 kgs bag
A
20% 10%
10%
Rs 50
B
10% 20%
10%
Rs 40

Determine the number of bags of fertilizer A and
B which will meet the minimum requirements such
that the total cost is minimum.
Solution: Let X be the number of bags of fertilizer
A purchased and Y be the number of bags of fertilizer
B purchased. Then the objective is to minimize the
total cos t = z = 50X + 40Y
subject to
20X + 10Y ≥ 120
(Nitrogen)
10X + 20Y ≥ 100
(Phosphorous)

(Potassium)

2X + Y = 12

(1)

X + 2Y = 10

(2)

X+Y =8

(3)

A(0, 12), B(4, 4), C(6, 2), D(10, 0)
Decreasing
direction
of z

Y
1
A
3

(Unbounded)
Feasible
region

2
B
C

D
3

2

X

z
z =5
z =z = 3 = 480 00
8
1 360 0

Fig. 5.6

1

Example 3: The minimum fertilizer needed/hector
is 120 kgs nitrogen, 100 kgs phosphorous and 80 kgs
of potassium. Two brands of fertilizers available have
the following composition.

5.5

Objective function: iso-profit equation:
z
5
Y =− X+
4
40

(4)

Choose z = 500, 480, 380, 360 then (4) passes
through the corner points D, A, C, B respectively.
Thus the optimal solution occurs at B(4, 4) i.e. purchase four bags of fertilizer A and 4 bags of fertilizer
B with a total minimum cost of Rs 360/-.
EXERCISE
Solve the following LPP graphically:
1. Right Wood Furniture Company manufactures
chairs and desks. The time required (in minutes)
and the total available time is given below. If company sells a chair for a profit of Rs. 25 and desk

chap-5a

B.V.Ramana

5.6

September 13, 2006

17:59

MATHEMATICAL METHODS

for a profit of Rs 75/- determine the best product
mix that will maximize the profit.

Fabrication
Assembly
Upholstery
Linoleum

Chair

Desk

15
12
18.75


40
50

56.25

Output
Input
Process Crude A Crude B Gasoline X Gasoline Y
5
8
5
3
I
4
4
4
5
II

Available
time
27,000
27,000
27,000
27,000

Ans: Produce 1000 chairs and 300 desks, making a
profit of Rs 47,500.
Ans:
Hint: Corner points are A(0, 0), B(1440, 0),
C(1440, 135), D(1000, 300), E(250, 480), F(0,
480): Maximize: z = 25X + 75Y . s.t.
15X + 40Y ≤ 27, 000,
12X + 50Y ≤ 27000,
18.75X ≤ 27000, 56.25Y ≤ 27000
2. Asia paints produces two types of paints with the
following requirements.
Standard Delux Total Available
Paint Quantity (in tons)
Paint
Base
4
24
6
Chemicals
2
6
1
Profit (in 100’s) 5
4

A maximum of 200 units of crude A and 150
units of crude B are available. It is required to
produce at least 100 units of gasoline X and 80
units of gasoline Y . The profit from process I is Rs
300 while from process II is Rs 400. Determine
the optimal mix of the two processes.
Produce 30.7 units by process I and 11.5 units
from process II, getting a maximum profit of Rs
13,846.20.
Hint: Maximize: z = 300x1 + 400x2 , subject to
5x1 + 4x2 ≤ 200, 3x1 + 5x2 ≤ 150
5x1 + 4x2 ≥ 100, 8x1 + 4x2 ≥ 80
Corner
points: A(20,
0), B(40, 0), D(0, 30),

150
,
E(0, 25), C 400
13
13

4. Minimize
z = 0.3x1 + 0.9x2
subject
to
x1 + x2 ≥ 800, 0.21x1 − 0.30 x2 ≥ 0, 0.03x1 −
−0.01 x2 ≥ 0, x1 , x2 ≥ 0
Ans: x1 = 470.6, x2 = 329.4, minimum cost: Rs
437.64.
5. Maximize: z = 30x1 + 20x2 subject to x1 ≤ 60,
x2 ≤ 75, 10x1 + 8x2 ≤ 800.

Determine the optimum (best) product mix of the Ans: x1 = 60, x2 = 25, Max: profit = Rs 2300
Hint: Corner points: A(0, 0), B(60, 0), C(60, 25),
paints that maximizes the total profit for the comD(20, 75), E(0, 75).
pany. Demand for deluxe paint can not exceed
that of standard paint by more than 1 ton. Also
6. Given x1 ≥ 0, x2 ≥ 0, x1 + 2x2 ≤ 8, 2x1 − x2 ≥
maximum demand of deluxe paint is 2 tons.
−2 solve to (a) max x1 (b) max x2 (c) min x1 (d)
min x2 (e) max 3x1 + 2x2 (f) min −3x1 − 2x2 (g)
Ans: Produce 3 tons of standard and 1.5 tons of deluxe
max 2x1 − 2x2
paint, making a profit of Rs 2100.
Hint: Corner points: A(0, 0), B(4, 0), C(3, 1.5), Ans: (a) x1 = 8 (b) x2 = 18
(c) x1 = 0 (d) x2 = 0 (e) z
5
D(2, 2), E(1, 2), F(0, 1); OF: Maximize z = 5x1 +
= 24, x1 = 8, x2 = 0 (f) z = −24, x1 = 8, x2 = 0
4x2 subject to
, x1 = 45 , x1 = 18
(g) z = − 28
5
5
6x1 + 4x2 ≤ 24, x1 + 2x2 ≤ 6,
−x1 + x2 ≤ 1, x2 ≤ 2, x1 , x2 ≥ 0.

7. Minimize
z = x1 + x2
x2 ≥ 0
2x1 = x2 ≥ 12,
x1 + 6x2 ≥ 28.

s.t.
x1 ≥ 0,
5x1 + 8x2 ≥ 74,

3. In an oil refinery, two possible blending processes Ans: x = 2, x = 8, min. 10
1
3
for which the inputs and outputs per production
Hint: Unbounded region with corner points
run are given below.
A(0, 12), B(2, 8), C(10, 3), D(28, 0)

chap-5a

B.V.Ramana

September 13, 2006

17:59

LINEAR PROGRAMMING

8. Maximize: z = 5x1 + 3x2 s.t. x1 ≥ 0, x2 ≥ 0,
3x1 + 5x2 ≤ 15, 5x1 + 2x2 ≤ 10
Ans: x1 = 1.053, x2 = 2.368, Max: 12.37
Hint: Corner points: (0, 3), (1.053, 2.368), (2, 0)
9. Maximize: z = 2x1 − 4x2 s.t. x1 ≥ 0, x2 ≥ 0,
3x1 + 5x2 ≥ 15, 4x1 + 9x2 ≤ 36
Ans: x1 = 9, x2 = 0, Max: 18
Hint: Corner point: (0, 3), (0, 4), (5, 0) (9, 0)
10. Maximize: z = 3x1 + 4x2 s.t. x1 ≥ 0, x2 ≥ 0,
2x1 + x2 ≤ 40, 2x1 + 5x2 ≤ 180
Ans: x1 = 2.5, x2 = 35, z = 147.5
Hint: Corner points: 0(0, 0), A(20, 0), B(2.5, 35),
C(0, 36)
11. Minimize z = 6000x1 + 4000x2 s.t. x1 ≥ 0, x2 ≥
0, 3x1 + x2 ≥ 40, x1 + 2.5x2 ≥ 22, x1 + x2 ≥
40
.
3
Ans: x1 = 12, x2 = 4, zmin = 88,000
Hint: A(22, 0), B(12, 4), C(0, 40)
Note: Constraint x1 + x2 ≥ 40
is redundant.
3
12. Maximize z = 45x1 + 80x2 s.t. 5x1 + 20x2 ≤
400, 10x1 + 15x2 ≤ 450.
Ans: x1 = 24, x2 = 14, z = Rs2200.
5.4 CANONICAL AND STANDARD FORMS
OF LPP
Since max f (x) = − min (−f (x)), an LPP with
maximation can be transferred to a minimization
problem and vice versa. Thus, the following analysis
can be applied for a maximization or minimization
problem without any loss of generality.
Canonical form of LPP is an LPP given by (1) (2)
(3) with all the constraints (2) are of the less than or
equal to type.
Standard form of LPP consists of (1) (2) (3) with all
constraints (2) are of the equality type and with all
bi ≥ 0, for i = 1 to m.
Conversion to Standard Form Given any general
LPP, it can be transformed to standard LPP as follows:
1. In any constraint if the right hand side constant bi is negative, then multiply that constraint

5.7

throughout by −1. (Note that multiplication of an
inequality constraint by −1, reverses, the inequality sign i.e. −3 < −2, multiplied by −1 we get
(−1)(−3) > (−1)(−2)or 3 > 2.
2. A
less than or equal to type constraint
aij xj ≤ bi ; (bi ≥ 0) gets transformed to an
j

equality aij xj + si = bi
j

by the addition of a ’slack’ variable si , which
is non negative.
3. A greater
than or equal to type constraint
aij xj ≥ bi ; (bi ≥ 0)
j

can
be transformed to an equality
aij xj − si = bi
by subtracting a ’surplus’ variable Si , which
is non negative. In general, it is more convenient
to work with equations rather than with inequalities. So given any general LPP, convert it to a
standard LPP, consisting of ’m’ simultaneous linear equations in "n" unknown decision variables.
Minimize:
z = c1 x1 + c2 x2 + · · · + cn xn (1)
subject to

a11 x1 + a12 x2 + · · · + a1n xn = b1 ⎪


a21 x1 + a22 x2 + · · · + a2n xn = b2
(2)
− − − − − − − − − − − − − − −⎪


am1 x1 + am2 x2 + · · · + amn xn = bm
and x1 , x2 , x3 , · · · xn ≥ 0 (3)
Here cj (Prices), bj (requirements) and ai,j
(activity coefficients) for i = 1 to m, j = l to n)
are known constants.
If m > n, discard the m − n redundant equations. If m = n, the problem may have a unique
(single) solution which is of no interest since
it can neither be maximized or minimized. If
m < n, which ensures that none of the equations
is redundant, then there may exist infinite number
of solutions from which an optimal solution can
be obtained.
Assume that m < n. Set arbitrarily any
n − m variables equal to zero and solve the m
equations for the remaining m unknowns. Suppose the unique solution obtained be
{x1 , x2 , · · · xm }, by setting the remaining
(n − m) variables
xm+1 , · · · , xn all to zero.

chap-5a

B.V.Ramana

5.8

September 13, 2006

17:59

MATHEMATICAL METHODS

Basic solution
{x1 , x2 , · · · , xm } is the solution of the system of equations (2) in which n − m variables are set to zero.
Basic variables
are the variables x1 , x2 , · · · , xm in the basic solution.
Basis
is the set of m basic variables in the basic solution.
Non-basic variables
xm+1 , xm+2 , · · · xn are the (n − m) variables which
are equated to zero to solve the m equations (2),
(resulting in the basic solution).
Basic feasible solution
is a basic solution which satisfies the nonnegativity
restrictions, (3) i.e. all basic variables are non negative. (i.e. xj ≥ 0 for j = 1, 2, 3, · · · m)
Nondegenerate basic feasible solution
is a basic feasible solution in which all the basic variables are positive (i.e., xj > 0 for j = 1, 2, 3, · · · m)
Optimal basic feasible solution
is a basic feasible solution which optimizes (in this
case minimizes) the objective function (1).
Why Simplex Method
In an LPP with m equality constraints and n variables with m < n, the number of basic solutions is
nc m. For small n and m, all the basic solutions (corner points) can be enumerated (listed out) and the
optimal basic feasible solution can be determined.
Example:
Maximize: z = 2x1 + 3x2 s.t. 2x1 + x2 ≤ 4, x1 +
2x2 ≤ 5. Rewriting 2x1 + x2 + x3 = 4, x1 + 2x2 +
x4 = 5. Here m = 2, n = 4, nc m = 4c 2 = 6 The six
basic solutions are: 1. (0, 0, 4, 5), Feasible (F), Nondegenerate (ND) and z = value of O.F = 0
2. (0, 4, 0, -3), NF (non feasible)
3. (0, 2.5, 1.5, 0), z = 7.5 F, ND

4. (2, 0, 0, 3), z = 4, F, ND
5. (5, 0, - 6, 0), NF
6. (1, 2, 0, 0), z = 8,
Feasible nondegenerate and optimal.
However, even for n = 20, m = 10, the number
of basic solutions to be investigated is 1,84,756, a
large part of which are infeasible. It is proved that
the set of feasible solutions to a LPP form a convex
set (the line joining any two points of the set lies in
the set) and the corner (extreme) points of the convex
set are basic feasible solutions. If there is an optimal
solution, it exists at one of these corner points. The
simplex method devised by GB Dantzig is a powerful procedure which investigates in a systematic way
for optimal solution at these corner points which are
finite in number.
For m = 10, n = 20, simplex method obtains the
optimal in 15 steps, thus having an advantage of
92,378 to 1.

5.5 SIMPLEX METHOD
The simplex method is an algebraic iterative procedure which solves any LPP exactly (not approximately) or gives an indication of an unbounded solution. Starting at an initial extreme point, it moves
in a finite number of steps, between m and 2m, from
one extreme point to the optimal extreme point. Consider the following LPP with ’m’ less than or equal
to inequalities in ’n’ variables.
Maximize z = c1 x1 + c2 x2 + · · · + cn xn
subject to a11 x1 + a12 x2 + · · · + a1n xn ≤ b1
a21 x1 + a22 x2 + · · · + a2n xm ≤ b2
..........................................
am1 xm1 + am2 x2 + · · · + amn xn ≤ bm
Introducing ’m’ slack variables s1 , s2 , . . ., sm , the
less than or equal to in equalities are converted to
equations.
a11 x1 + a12 x2 + · · · + a1n xn + s1 = b1
a21 x1 + a22 x2 + · · · + a2n xn + s2 = b2
..........................................
am1 x1 + am2 x2 + · · · + amn xn + · · · + sm = bm

Here x1 , x2 , · · · , xn , s1 , s2 , · · · , sm are all nonnegative i.e. ≥ 0. The objective function is rewritten as

chap-5a

B.V.Ramana

September 13, 2006

17:59

LINEAR PROGRAMMING

Maximize: z = c1 x1 + · · · + cn xn + 0.s1 + · · · +
0.sm .
Thus there are m equations in m + n variables.
Putting (m + n) − m = n variables zero we get a
starting basic feasible solution. Take x1 = x2 =
· · · xn = 0. Then the initial solution contains the m
basic variables s1 , s2 · · · , sm . This corresponds to the
corner point origin with value of the objective function zero. Since this is a problem of maximization,
the value of objective function will increase if we
introduce one of non-basic variable xj (j = 1 to n),
into the solution forcing out one of the basic variable.
The obvious choice is the xj with the largest cj . Ties
are broken arbitrarily. The objective equation is written as z − c1 x1 − c2 x2 − · · · − cn xn + 0.s1 + · · · +
0.sn = 0
For efficient use, this data is written in the form of
a table known as simplex tableau shown below:

5.9

Suppose abiji is the smallest non negative ratio
among these ratios
bm
bi b2
,
,···
,
aij a2j
amj

then the basic variable si will leave the basis (and
therefore will become a non basic variable). The ith
row is known as the pivotal row. The element aij
at the intersection of the pivotal column and pivotal
row is known as the pivotal element, which is encircled in the table step III. Compute the new simplex
tableau with (s1 , s2 , · · · , xj , · · · , sm ) as the new basis
compute.
Pivot row:
pivot row
.
New pivot row = current
pivot element

¼

¼
¼
¼

sm
0
0

¼

0

¼

amn

s2
0
0
1

¼
¼

¼

Solution
0
b1
b2

¼
0

¼

If all the z-row coefficients of the nonbasic variables
are nonnegative, then the current solution is optimal.
Stop. Otherwise goto step I.
Step I. Entering variables: Suppose - cj , the z-row
coefficient of the non basic variables xj is the most
negative, then the variable xj will enter the basis. The
j th column is known as the pivotal column.
Step II. Leaving variable: Divide the solution column with the corresponding elements of the pivotal
column, with strictly positive denominator. Ignore
the ratios, when the pivotal column elements are zero
or negative.

¼

Test for optimality

s1
0
1
0

¼

¼

The first row, z-row contains the coefficients of
the objective equation with last element in rectangle
indicating the current value of the objective function (In the present case it is zero). The left most
(first) column indicates the current basic variables
s1 , s2 , · · · , sm . The right most (last) column is the
solution column. Thus s1 = b1 , s2 = b2 , · · · , sm =
bm (all resources unused) is the basic solution with
the value of the objective function zero.

xn
– cn
a1n
a2n

¼

am2

¼

am1

¼

0

¼

sm

xj
– cj
a1j
a2j
aij
amj

¼

x2
– c2
a12
a22

¼

x1
– c1
a11
a21

¼

z
1
0
0

¼

Basis
z
s1
s2

¼

Remark
c1-row
s1-row
s2-row
si-row
sm-row

1

bm

All other rows including z:
New row = current row - (Corresponding pivot
column coefficient) × (New pivot row).
The solution-column in the new tableau readily
gives the new basic solution with new objective value
(last element in the z-row). Now test for optimality.
If yes, stop. Otherwise go to step I.
Optimality condition
The nonbasic variable having the most negative (positive) coefficient coefficient in the z-row will be the
entering variable in a maximization (minimization)
problem. Ties are broken arbitrarily. When all the zrow coefficients of the non basic variables are nonnegative (nonpositive) then the current solution is
optimal.
Feasibility condition
In both the maximization and minimization problems, the basic variable associated with the smallest
nonnegative ratio (with strictly positive denominator) will be the leaving variable.

chap-5a

B.V.Ramana

5.10

September 13, 2006

17:59

MATHEMATICAL METHODS

Thus the simplex method can be summarized as
follows:
Step 0. If all the constraints are less than or equal
to type, introduce slack variables and determine the
starting basic solution.
Step I. Using optimality condition, select the entering variable. If no variable can enter the basis, stop.
The current solution is optimal.
Step II. Using feasibility condition determine the
leaving variable.
Step III. Compute the new basic solution (new simplex tableau) and go to step I.
Artificial Variable Technique
For a LPP in which all the constraints are less than or
equal to type with bi ≥ 0, an all-slack, initial basic
feasible solution readily exists. However for problems involving ≥ inequalities or equality constrains
no such solution is possible. To alleviate this, artificial variables are introduced in each of the ≥ or =
type constraints, and slack variables for the less than
or equal to type which will then provide a starting
solution. The M-method and the two-phase method
are two closely related methods involving artificial
variables.
M-Method (also Known as Charne’s Method
or Big M-Method)
Since artificial variables are undesirable, the coefficient for the artificial variable in the objective function is taken as − M in maximization problem and
as + M in minimization problems. Here M is a very
large positive (penalty) value. The augmented problem is solved by simplex method, resulting in one of
the following cases:
1. When all the artificial variables have left the basis
and optimality condition is satisfied, then the current solution is optimal.
2. When one or more artificial variables are present
in the basis at zero level and the optimality condition is satisfied, then the solution is optimal with
some redundant constraints

3. No feasible solution exists when one or more artificial variables are present in the basis at a positive
level although the optimality condition is satisfied. Such a solution is known as pseudo optimal
solution since it satisfies the constraints but does
not optimize the objective function.
Note: Since artificial variables which is forced out
of the basis, is never considered for reentry, the column corresponding to the artificial variable may be
omitted from the next simplex tableau.
Two-Phase Method
In the M-method, M must be assigned some specific
numerical value which creates trouble of roundoff
errors especially in computer calculations. The zcoefficient of the artificial variable will be of the form
aM + b. For large chosen M, b may be lost and for
small chosen M and small a, b may be present leading
to incorrect results. The two phase method consists
of two phases and alleviates the difficulty in the Mmethod.
Phase I
Exactly as in M-method, introduce necessary artificial variables to get an initial basic feasible solution.
Solve this augmented problem, by simplex method
to minimize r, the sum of the artificial variables. If
r = 0, then all the artificial variables are forced out
of the basis. Goto phase II. If r > 0, indicating the
presence of artificial variables at non zero level, LP
has no feasible solution
Phase II
The feasible solution of phase I forms the initial basic
feasible solution to the original problem (without any
artificial variables). Apply simplex method to obtain
the optimal solution.

WORKED OUT EXAMPLES
Enumeration
Example 1: Solve the following LPP by enumerating all basic feasible solutions. Identify the infeasible

chap-5a

B.V.Ramana

September 13, 2006

17:59

LINEAR PROGRAMMING

solutions. Find the optimal solution and the value of
the objective function.
Maximize z = 2x1 + 3x2 + 4x3 + 7x4 subject to
2x1 + 3x2 − x3 + 4x4 = 8
x1 − 2x2 + 6x3 − 7x4 = −3
and x1 , x2 , x3 , x4 ≥ 0.
Solution: The number of equations m = 2. The
number of variable n = 4. The number of basic variables = m = 2. The number of all possible solutions
is 4 c2 = 6.
1. Put x3 = x4 = 0, solving 2x1 + 3x2 = 8, x1 −
2x2 = −3, we get x1 = 1, x2 = 2, z = 8. Basic
feasible solution, not optimal, x1 , x2 are basic
variables, x3 , x2 are non basic variables (which
are always zero).
2. Put x2 = x4 = 0. Solving 2x1 − x3 = 8, x1 +
45
, x3 = − 14
. Since x3 <
6x3 = −3, we get x1 = 13
3
0, this is a basic non feasible solution.
3. Put x1 = x4 = 0. Solving 3x2 − x3 = 8, −2x2 +
45
7
6x3 = −3, we get x2 = 16
, x3 = 16
, z = 163
. This
16
is a basic feasible solution (not optimal).
4. Put x3 = x2 = 0, solving 2x1 + 4x4 = 8, x1 −
, x4 = 79 , z = 93
, basic
7x4 = −3, we get x1 = 22
9
9
feasible solution (not optimal).
5. Put x1 = x3 = 0. Solving 3x2 + 4x4 = 8, 2x2 +
, x4 = −7
. This is a basic
7x4 = 3 we get x2 = 44
13
13
non feasible solution.
6. Put x1 = x2 = 0. Solving −x3 + 4x4 = 8, 6x3 −
45
, x4 = 17
. Thus the opti7x4 = −3, we get x3 = 44
17
mal basic feasible solution with the basic vari, x4 = 45
(and obviously the remainables x3 = 44
17
17
ing non basic variables x1 , x2 at zero value) has
the maximum value of the objective function as
491
.
17

Solution: Introducing three slack variables, the
given three less than or equal to inequality constraints
will be expressed as equations. Assign zero cost to
each of these slack variables. Then the standard form
of the LPP is to
Maximize z = 2x1 + 3x2 + 0 · s1 + 0 · s2 + 0 · s3
subject to
2x1 + 4x2 + s1
2x1 + 2x2

= 20
= 12

+ s2

4x1

+ s3 = 16

and x1 , x2 , s1 , s2 , s3 ≥ 0
Express the objective equation as
z − 2x1 − 3x2 = 0
Then the starting simplex tableau is represented as
follows:
Basis
z
s1
s2
s3

z x1 x2
1 –2 –3
0 2
4
0 2
2
0 4
0

s1
0
1
0
0

s2
0
0
1
0

s3 Solution Remark
0
0
z-row
0
20
s1-row
0
12
s2-row
1
16
s3-row

Corner points: A(0, 0), B(4, 0), C(4, 2), D(2, 4), E(0,
5). Value of O.F. at these extreme points: zA = 0,
zB = 8, zC = 14, zD = 16, zE = 15
x2

3

E

D

optimum (x1 = 2, x2 = 4)
zD = 16
C

A

1
x1

B

Simplex Method: Maximization
Example 1: Solve the following LPP by simplex
method.
Maximize z = 2x1 + 3x2
subject to 2x1 + 4x2 ≤ 20
2x1 + 2x2 ≤ 12
4x1 ≤ 16
x1 ≥ 0, x2 ≥ 0

5.11

2

Fig. 5.2

The initial basis consists of the three basic variables s1 = 20, s2 = 12, s3 = 16. The two non basic
variables are x1 = 0, x2 = 0. Note that non basic variables are always equal to zero. Thus this solution
corresponds to the corner (extreme) point A (0, 0) in
the graph. In the simplex tableau all the three basic

chap-5a

B.V.Ramana

5.12

September 13, 2006

17:59

MATHEMATICAL METHODS

variables are listed in the left-most (first) column
and their values (including the value of the objective
function), in the right-most (last) column. Here the
value of OF is 0 since all the resources are unutilized.
In the z-row, the value of the objective function in the
solution column is enclosed in a square. Since this is
a maximization problem, to improve (increase) the
value of z, one of the non-basic variables will enter
into the basis and there by forcing out one of the
current basic variable from the basis (since the number of basic variables in the basis is fixed and equals
to m = 3 the number of constraints). From the optimality condition, the entering variable is one with
the most negative coefficient in the z-row. In the zrow the most negative elements is −3. Thus the non
basic variable x2 will enter the basis. To determine the
leaving variable, calculate the ratios of the right-hand
side of the equations (solution-column) to the corresponding constraint coefficients under the entering
variable x2 , as follows:
Basis

Entering
x2

Solution

S1

4

20

S2

2

12

S3

0

16

i.e.,

0

2
4
1
2

4
4

1

1
4
1
4

= (0, 2, 2, 0, 1, 0, 12)−



−2 0, 21 , 1, 41 , 0, 0, 5 =

= (0, 1, 0, − 21 , 1, 0, 2)

New s3 -row = current s3 -row-(0) × (new pivot row)
= current s3 -row itself
= 0, 4, 0, 0, 0, 1, 16
Summarizing these results we get the new simplex
tableau corresponding to the new basis (x2 , s2 , s3 ) as
follows. Note that this new basis corresponds to the
corner point E(0, 5) with value of OF as 15.

z

x1

x2

s1

s2

s3

solution

z

1

0

0

15

0

0

0

5

s2

0

1

0

3
4
1
4
– 1
2

0

x2

– 1
2
1
2

1

0

2

x3

0

4

0

0

0

1

16

Basis

1

Ratio
20 = 5 minimum
4
12 = 6
2
16 = ¥ (Ignore)
0

Therefore s1 is the leaving variable. The value of
the entering variable x2 in the new solution equals to
this minimum ratio 5. Here s1 -row is the pivot row;
x2 column is the pivot column and the intersection
of pivot column and pivot row is the pivot element
4 which is circled in the tableau. The new pivot row
is obtained by dividing the current pivot row by the
pivot element 4. Thus the new pivot row is
0
4

New s2 -row = current s2 -row−(2) new pivot row

0
4

0
4

20
4

0

0

5

Recall that for all other rows, including z-row,
New row = current row − (corresponding pivot
coefficient) × (new pivot row)
New z-row = current z-row − (− 3) new pivot row
= (1, − 2, − 3, 0, 0, 0, 0)+
1
1
+3 0, , 1, , 0, 0, 5
2
4
3
1
= 1, − , 0, , 0, 0, 15
2
4

From the tableau, the solution is
x2 = 5, s2 = 2, s3 = 16 (basic variables)
x1 = 0, s1 = 0 (non basic variables), value of OF is
15.
Thus the solution moved from corner point A to
corner point E in this one iteration. Optimal solution
is not reached since all elements of z-row are not
non negative. Since − 21 is the most negative element
in the current z-row, the variable x1 will enter the
basis. To determine the leaving variable again calculate the ratios of RHS column with the elements of
the entering variable x1 .
Basis

Entering
x1

Solution

Ratio

x2

1
2

5

10

s2

1

2

2

x3

4

16

4

minimum

Therefore, s2 will leave the basis. The pivotal element is one; so pivot row remain the same. The

chap-5a

B.V.Ramana

September 13, 2006

17:59

LINEAR PROGRAMMING

new simplex tableau corresponding to the new basis
(x2 , x1 , s3 ) is given below.

basic variables.
Basis

Basis

z

x1

x2

s1
1
2
1
2
– 1
2

z

1

0

0

x2

0

0

1

x1

0

1

0

s3

0

0

0

5.13

x1

x2

x3

x4

x5

x6

Solution

s2

s3

Solution

z

–1

–1

–1

0

0

0

13

1
2
– 1
2

0

16

x1

1

0

0

–1

0

–2

5

0

4

x2

0

1

0

2

–3

1

3

1

0

2

x3

0

0

1

2

–5

6

5
53
6
20
3
13
6
5
6
213
30
213
30
13
10
2
5

2

1

–4




− 21

8



pivot row
Here new z-row = current z-row −



= 1, − 21 , 0, 43 , 0, 0, 15 ×





× − − 21 0, 1, 0, − 21 , 1, 0, 2 =

= 1, 0, 0, 21 , 21 , 0, 16
Here new x2 -row = (current x2 row) − 21 (pivot row)



= 0, − 21 , 0, 43 , 0, 0, 15 ×




× − (1) 21 , 0, 1, 0, − 21 , 1, 0, 2 =



= 1, 0, 0, 21 , 21 , 0, 16
Here new s3 -row = current s3 -row − 4(pivot row)
= (0, 4, 0, 0, 0, 1, 16)



−4 0, 1, 0, − 21 , 1, 0, 2 =

= (0, 0, 0, 2, −4, 1, 8)
Since all the elements in the current z-row are nonnegative, the current solution is optimal. Read the
solution from the tableau as
x2 = 4, x1 = 2, s3 = 8 (basic variables)
s1 = 0, s2 = 0 (non basic variables)
value of O. F is 16.
Note that this solution corresponds to the corner
point D(2, 4). In this second iteration solution moved
from E to D.
Simplex Method: Minimization:
Example 1: Minimize: z = x1 + x2 + x3 subject
to x1 − x4 − 2x6 = 5, x2 + 2x4 − 3x5 + x6 = 3,
x3 + 2x4 − 5x5 + 6x6 = 5.
Solution: Fortunately the problem contains already
a starting basic feasible solution with x1 , x2 , x3 as the

z

–1

–1

–1

0

0

0

x1

1

0

0

1

x6

0

0

– 1
3
5
3
1
3

–5
3
– 13
6
5

6

0

x2

1
3
– 1
6
1
6

z

–1

–1

–1

0

0

0

x1

1

x6

0

– 63
30
– 13
10
– 2
5

0

0

3
10
– 1
10
+ 4
15

0

x4

1
5
3
5
– 1
5

1
0

Optimal
solution:
213
2
O.F
:
.
5
30

x1 =

0
1

0
1

213
, x4
30

=

13
, x6
10

=

Unbounded solution:
Example 1: Solve LPP by simplex method.
Maximize: z = 2x1 − 3x2 + 4x3 + x4 subject to
x1 + 5x2 + 9x3 − 6x4 ≥ −2
3x1 − x2 + x3 + 3x4 ≤ 10
−2x1 − 3x2 + 7x3 − 8x4 ≥ 0
and x1 , x2 , x3 , x4 ≥ 0.
Solution: Rewriting in the standard form
−x1 − 5x2 − 9x3 + 6x4 ≤ 2
3x1 − x2 + x3 + 3x4 ≤ 10
2x1 + 3x2 − 7x3 + 8x4 ≤ 0
Introducting 3 slack variables x5 , x6 , x7 we write the
LPP as
maximize: z = 2x1 − 3x2 + 4x3 + x4 + 0 · x5 + 0 ·
x6 + 0 · x7
subject to
−x1 − 5x2 − 9x3 + 6x4 + x5
3x1 − x2 + x3 + 3x4
2x1 + 3x2 − 7x3 + 8x4

=2
+ x6

= 10
+ x7 = 0

chap-5a

B.V.Ramana

5.14

September 13, 2006

17:59

MATHEMATICAL METHODS

Objective equation is: z−2x1 +3x2 −4x3 −x4 = 0
The first simplex tableau with the 3 basic variables
x5 , x6 , x7 is given below:
Basis

x1

x2

x3

x4

x5

x6

x7

Solution

z

–2

3

–4

–1

0

0

0

0

x5

–1

–5

–9

6

1

0

0

2

x6

3

–1

1

3

0

1

0

10

x7

2

3

–7

8

0

0

1

0

Since −4 is most negative element in the z-row, the
associated variable x3 will enter the basis. Out of the
2 10 0
three ratios −9
, 1 , −7 , the first and third are ignored
(because the denominator is negative). So x6 will
be outgoing variable. The pivotal element is 1. So
pivotal row remains same. The next simplex tableau
with x5 , x3 , x7 is given below.
Basis

x1

x2

x3

x4

x5

x6

x7

Solution

z

10

–1

0

11

0

4

0

40

x5

26

– 14

0

33

1

9

0

92

x6

3

–1

1

3

0

1

0

10

x7

23

–4

0

29

0

7

1

70

In the current z-row, x2 has the most negative coefficient − 1, so normally x2 should enter the basis.
However, all the constraint coefficients under x2 are
negative, meaning that x2 can be increased indefinitely without violating any of the constraints. Thus
the problem has no bounded solution.
M-method:
Example 1: Solve the LPP by M-method
minimize z = 3x1 + 2.5x2
subject to
2x1 + 4x2 ≥ 40
3x1 + 2x2 ≥ 50
x 1 , x2 ≥ 0
Solution: Introducing surplus variables x3 , x4 , the
greater than inequations are converted to equations.
Minimize z = 3x1 + 2.5x2 + 0 · x3 + 0 · x4

subject to
2x1 + 4x2 − x3 = 40
3x1 + 2x2 − x4 = 50
x 1 , x 2 , x 3 , x4 ≥ 0
In order to have a starting solution, introduce two
artificial variables R1 and R2 in the first and second
equations. In the objective function the cost coefficients for these undesirable artificial variables R1 and
R2 are taken as a very large penalty value M. Thus
the LPP takes the following form:
Minimize z = 3x1 + 2.5x2 + 0 · x3 + 0 · x4 +
+ M · R1 + M · R 2
(1)
subject to
2x1 + 4x2 − x3 + R1 = 40
(2)
3x1 + 2x2 − x4 + R2 = 50
(3)
and x1 , x2 , x3 , x4 , R1 , R2 ≥ 0
The z-column is omitted in the tableau for convenience because it does not change in all the iterations.
Solving (2) and (3) we get
R1 = 40 − 2x1 − 4x2 + x3
and

(4)

R2 = 50 − 3x1 − 2x2 + x4

(5)

Substituting (4) and (5) in the objective function (1)
we get
z = 3x1 + 2.5x2 + M(40 − 2x1 − 4x2 + x3 )
+ M(50 − 3x1 − 2x2 + x4 )
or
z = (3 − 5M)x1 + (2.5 − 6M)x2 + M · x3 +
+M · x4 + 90 · M
which is independent of R1 and R2 . Thus the objection equation is
z − (3 − 5M)x1 − (2.5 − 6M)x2 − Mx3 −
−Mx4 = 90M
The simplex tableau with the starting basic solution
containing R1 and R2 as the basic variables in given
below:
Basis
z

x3

x4

R1

– 3 + 5M – 2.5– 6M – M

–M

0

0

90 M

x1

x2

R2 Solution

R1

2

4

–1

0

1

0

40

R2

3

2

0

–1

0

1

50

In the z-row, the most positive coefficient is
−2.5 + 6M. So x2 will be entering variable. Since
40
= 10, 50
= 25, the variable R1 will leave the
4
2

chap-5a

B.V.Ramana

September 13, 2006

17:59

LINEAR PROGRAMMING

basis. So 4 is the pivotal element. New simplex
tableau is given below:
Basis
z
x2
R2

x2

x1
– 3.5 +4M
2
1
2

0

2

0

x3

x4

– 2.5 +2M
4
– 1
4
1
2

1

–M
0
–1

R1
2.5– 6M
4
1
4
– 1
2

is the most positive element in the zSince −3·5+4M
2
row, the variable x1 will enter the basis forcing R2 out
since the minimum of the ratios 101 = 20, 30
= 15 is
2
2

15. So pivotal element is 2. The next simplex tableau
is shown below:
Basis

x1

x2

x3

x4
– 7
8
1
4
– 1
2

z

0

0

– 3
16

x2

0

1

x1

1

0

– 3
8
1
4

R1
3 – 16 M
8
3
8
– 1
4

R2
7 –M
8
– 1
4
1
2

Solution
205
4
5
2

From (3), R2 = 10 − 2x1 + 5x2 − x3 + x4
R2

Solution

0

25 +30M

0

40

1

50

Two-Phase Method
Example 1: Solve LPP by two-phase method
Maximize z = 2x1 + 3x2 − 5x3
subject to
x1 + x2 + x 3 = 7
2x1 − 5x2 + x3 ≥ 10
and x1 , x2 , x3 ≥ 0
Solution: Phase I: Introducing a surplus variable
x4 and two artificial variables R1 and R2 , the Phase
I of the LPP takes the following form:
Minimize
r = R1 + R 2
(1)
subject to
x1 + x2 + x3 + R1 = 7
(2)
2x1 − 5x2 + x3 − x4 + R2 = 10
(3)
and x1 , x2 , x3 , x4 , R1 , R2 ≥ 0.
From (2), R1 = 7 − x1 − x2 − x3
(4)

(5)

Substituting (4), (5) in (1) we get the objection function as
Minimize r = (7 − x1 − x2 − x3 ) + (10 − 2x1 +
5x2 − x3 + x4 )
or Minimize r = −3x1 + 4x2 − 2x3 + x4 + 17 or
r + 3x1 − 4x2 + 2x3 − x4 = 17
The simplex tableau containing the basic solution
with R1 , R2 as the basic variables is given below.
Basis

x1

x2

x3

R1

R2

x4

Solution

r

3

–4

2

0

0

–1

17

R1

1

1

1

1

0

0

R2

2

–5

1

0

1

–1

15

Since all the elements in the z-row are non positive, the current solution is optimal given by x1 = 15,
(observe
x2 = 25 with value of objective function 205
4
that the artificial variables R1 , R2 and surplus variables x3 , x4 are nonbasic variables assuming zero
values. Thus R1 , R2 have been forced out of the
basis).

5.15

7
10

The variable x1 will enter the basis since 3 is most
positive coefficient in the r-row of this minimization
problem. The variable R2 will leave the basis since
10
= 5 is less than 71 = 7. The pivotal element is 2.
2
Dividing the pivot row by the pivot element 2, we get
the new pivot row as 1, − 25 , 21 , 0, 21 , − 21 , 5.
Here the new rth-row:



= (3 − 4 2 0 0 − 1 17) − 3 1 − 25 21 0 21 − 21 5

7 1

= 0 2 2 0 − 23 21 2
Here the new R1 -row:


= (1 1 1 1 0 0 7) − 1 1 − 25 21 0 21 − 21 5

7 1

= 0 2 2 1 − 21 21 2
The new simplex table with R1 and x1 as the basic
variables is shown below:
x1

x2

x3

r

0

R1

0

R2

1

7
2
7
2
– 5
2

1
2
1
2
1
2

Basis

R1

R2

x4

0

– 3
2
1

2
1
2

1
2
1
2
– 1
2

1
0

Solution
2
7
5

Now x2 with most positive coefficient 27 , will enter

chap-5a

B.V.Ramana

5.16

September 13, 2006

17:59

MATHEMATICAL METHODS

the basis pushing out R1 with ratio
other ratio

5
− 25

2
7
2

= 47 . (The

is ignored since the denominator is

negative). The pivotal element is 27 . The pivot row is



1 4
0 1 17 27 −1
7 7 7
Here

new r-row:1 7


= 0 27 21 0 −3
2 − 2 0 1 17 27 − 71 17 47
2 2
= (0 0 0 − 1 − 1 0 0)
Here


new x1 -row:
= 1 − 25 21 0 21 − 21 5 −

5


− 2 0 1 71 27 − 71 17 47



= 1 0 67 57 17 − 71 45
7
The next simplex tableau of the second iteration with
x1 and x2 as the basic variables is given below.
Basis

x1

x2

x3

R1

R2

x4

r

0

0

0

–1

–1

0

0

1
7
6
7

2
7
5
7

– 1
7
1
7

1
7
– 1
7

4
7
45
7

x2

0

1

x1

1

0

Solution

already in the basis, the current solution is optimal.
, x2 = 47 and
The basic feasible solution is x1 = 45
7
the maximum value of the objective function is 102
.
7
5.6 LINEAR PROGRAMMING PROBLEM
EXERCISE
Enumeration:
1. If a person requires 3000 calories and 100 gms
of protein per day find the optimal product mix
of food items whose contents and costs are given
below such that the total cost is minimum. Formulate this as an LPP. Enumerate all possible solutions. Identify basic, feasible, nonfeasible, degenerate, non degenerate solutions and optimal solution.
Bread
x1

Meat
x2

Potatoes Cabbage
x3
x4

Milk
x5

The phase I is complete since r is minimized attain600
100
600
3000
Calories 2500
ing value 0, producing the basic feasible solution x1
40
10
20
150
80
Protein
= 45
, x2 = 47 . Note that both the artificial variables R1
7
3
2
1
10
3
Cost (Rs)
and R2 have been forced out of the (starting) basis.
Therefore the columns of R1 and R2 can altogether
Ans: LPP: Minimize z = 3x1 + 10x1 + x3 + 2x4 +
be ignored in the future simplex tableau.
3x5 .
s.t. 2500x1 + 3000x2 + 600x3 + 100x4 +
Phase II: Having deleted the artificial variables
600x5 = 3000
R1 and R2 and having obtained a basic feasible solu80x1 + 150x2 + 20x3 + 10x4 + 40x5 = 100,
tion x1 , x2 we solve the original problem given by
x1 , x2 , x3 , x4 , x5 ≥ 0; m = 2, n = 5, 5 c2 = 10
maximization of z = 2x1 + 3x2 − 5x3
basic solutions: F = Feasible, NF: non-feasible,
subject to
D: degenerate, ND: non degenerate
2
x2 + 17 x3 + 71 x4 = 47
, x2 = 27
, z = 110
, F, ND
1. x1 = 10
9
7
6
1
45
2. x1 = 0, x3 = 5, z = 5, F, D
x1 + 7 x3 − 7 x4 = 7
3. x1 = 20
, x4 = 10
, z = 80
, F, ND
and x1 , x2 , x3 , x4 ≥ 0
17
17
77
5
15
The tableau associated with this phase II is
, F, ND, optimal,
4. x1 = 13 , x5 = 26 , z = 105
26
5. x2 = 0, x3 = 5, z = 5, F, ND
x3
x4
x2
Basis x1
Solution
6. x2 = 43 , x4 = −10, z = − 20
, NF, ND
3
90
12
102
–3
–2
0
z
7.
x
=
2,
x
=
−5,
z
=
5,
NF,
ND
5
+
2
5
7
7 = 7
8.
x
=
5,
x
=
0,
z
=
5,
F,
D
3
4
4
1
1
x2
1
0
7
7
7
9. x3 = 5, x5 = 0, z = 5, F, D
6 – 1
45
x1
10. x4 = 10, x5 = −30, z = −30, NF, ND
0
1
7
7
7
All the remaining non basic variables are
Since x2 with most negative element in the z-row is
zero.

chap-5a

B.V.Ramana

September 13, 2006

17:59

LINEAR PROGRAMMING

Hint: Max: z = 2x1 + x2 + 3x3 + x4 + 2x5 s.t.
x1 + 2x2 + x3 + x5 ≤ 100; x2 + x3 + x4 + x5 ≤
80; x1 + x3 + x4 ≤ 50

2. Find all basic solutions for
x1 + 2x2 + x3 = 4, 2x1 + x2 + 5x3 = 5
Ans:
(2, 1, 0) F, ND; (5, 0, − 1), NF, ND;
0, 53 , 23 F, ND.

3. Find the optimal solution by enumeration
Max: z = 5x1 + 10x2 + 12x3
s.t. x1 , x2 , x3 ≥ 0,
15x1 + 10x2 + 10x3 ≤ 200, 10x1 + 25x2 +
20x3 = 300

Ans: 1.
2.
3.
4.
5.
6.

(7.27, 9.1, 0, 0), z = 127 · 27
(5, 0, 12.5, 0), z = 175
(30, 0, 0, −250), NF
(0, −20, 40, 0), NF
(0, 12, 0, 80), z = 120
(0, 0, 15, 50), z = 180
(1) (2) (5) are F, ND:
(6) is optimal solution;
4. Find the optimal solution by enumeration

Max: z = 2x1 + 3x2 s.t. 2x1 + x2 ≤ 4, x1 , x2 ≥
0, x1 + 2x2 ≤ 5.
Ans: 1.
2.
3.
4.
5.
6.

Ans: x1