Linear Programming Note PDF
Linear Programming Note PDF
The methods applied for solving a linear programming problem are basically simple
problems; a solution can be obtained by a set of simultaneous equations. However a
unique solution for a set of simultaneous equations in n-variables (x1, x2 … xn), at least
one of them is non-zero, can be obtained if there are exactly n relations. When the
number of relations is greater than or less than n, a unique solution does not exist but a
number of trial solutions can be found.
In various practical situations, the problems are seen in which the number of relations is
not equal to the number of the number of variables and many of the relations are in the
form of inequalities (≤ or ≥) to maximize or minimize a linear function of the variables
subject to such conditions. Such problems are known as Linear Programming Problem
(LPP).
Definition – The general LPP calls for optimizing (maximizing / minimizing) a linear
function of variables called the ‘Objective function’ subject to a set of linear equations
and / or inequalities called the ‘Constraints’ or ‘Restrictions’.
1
subject to restrictions
a11x1 + a12x2 + …..........+a1nxn (≤ or ≥) b1
a21x1 + a22x2 + ………..+a2nxn (≤ or ≥) b2
.
.
.
am1x1 + am2x2 + ……….+amnxn (≤ or ≥) bm
and
x1 ≥ 0, x2 ≥ 0,…, xn ≥ 0
Where
Z = value of overall measure of performance
xj = level of activity (for j = 1, 2, ..., n)
cj = increase in Z that would result from each unit increase in level of activity j
bi = amount of resource i that is available for allocation to activities (for i = 1,2,
…, m)
aij = amount of resource i consumed by each unit of activity j
Resource usage per unit of activity
Resource Amount of resource
Activity
available
1 2 …………………….. n
1 a11 a12 …………………….a1n b1
2 a21 a22 …………………….a2n b2
. . .
. . .
. . .
m am1 am2 …………………….amn bm
Contribution to
Z per unit of c1 c2 ………………………..cn
activity
Data needed for LP model
The level of activities x1, x2………xn are called decision variables.
2
The values of the cj, bi, aij (for i=1, 2 … m and j=1, 2 … n) are the input
constants for the model. They are called as parameters of the model.
The function being maximized or minimized Z = c1x1 + c2x2 +…. +cnxn is called
objective function.
The restrictions are normally called as constraints. The constraint ai1x1 + ai2x2 …
ainxn are sometimes called as functional constraint (L.H.S constraint). xj ≥ 0
restrictions are called non-negativity constraint.
2. Additivity
Sum of the resources used by different activities must be equal to the total
quantity of resources used by each activity for all resources individually or
collectively.
3. Divisibility
The variables are not restricted to integer values
4. Deterministic
Coefficients in the objective function and constraints are completely known and
do not change during the period under study in all the problems considered.
5. Finiteness
Variables and constraints are finite in number.
3
6. Optimality
In LPP, we determine the decision variables so as to optimize the objective
function of the LPP.
Transportation Problem
Suppose that ‘m’ factories (sources) supply ‘n’ warehouses (destinations) with certain
product. Factory Fi (i=1, 2 … m) produces ai units and warehouse Wj (j=1, 2, 3 … n)
requires bj units. Suppose that the cost of shipping from factory Fi to warehouse Wj is
directly proportional to the amount shipped and that the unit cost is cij. Let the decision
variables xij be the amount shipped from factory Fi to warehouse Wj. The objective is to
determine the number of units transported from factory Fi to warehouse Wj so that the
total transportation cost
4
Mathematically, this problem is to find xij (i=1, 2 … m; j=1, 2 … n) in order to minimize
the total transportation cost
Subject to constraints
Agriculture Applications
Linear programming can be applied in agricultural planning for allocating the limited
resources such as labour, water supply and working capital etc, so as to maximize the net
revenue.
Military Applications
5
These applications involve the problem of selecting an air weapon system against gurillas
so as to keep them pinned down and simultaneously minimize the amount of aviation
gasoline used, a variation of transportation problem that maximizes the total tonnage of
bomb dropped on a set of targets and the problem of community defense against disaster
to find the number of defense units that should be used in the attack in order to provide
the required level of protection at the lowest possible cost.
Production Management
Linear programming can be applied in production management for determining product
mix, product smoothing and assembly time-balancing.
Marketing Management
Linear programming helps in analyzing the effectiveness of advertising campaign and
time based on the available advertising media. It also helps in travelling salesman in
finding the shortest route for his tour.
Manpower Management
Linear programming allows the personnel manager to analyze personnel policy
combinations in terms of their appropriateness for maintaining a steady-state flow of
people into through and out of the firm.
Physical distribution
Linear programming determines the most economic and efficient manner of locating
manufacturing plants and distribution centers for physical distribution.
6
4. In production processes, high lighting of bottlenecks is the most significant
advantage of this technique.
Solution
Let
x1 be the number of products of type A
x2 be the number of products of type B
After understanding the problem, the given information can be systematically arranged in
the form of the following table.
Since the profit on type A is Rs. 2 per product, 2 x1 will be the profit on selling x1 units of
type A. similarly, 3x2 will be the profit on selling x2 units of type B. Therefore, total
profit on selling x1 units of A and x2 units of type B is given by
Maximize Z = 2 x1+3 x2 (objective function)
Since machine G takes 1 minute time on type A and 1 minute time on type B, the total
number of minutes required on machine G is given by x1+ x2.
Similarly, the total number of minutes required on machine H is given by 2x1 + 3x2.
8
But, machine G is not available for more than 6 hours 40 minutes (400 minutes).
Therefore,
x1+ x2 ≤ 400 (first constraint)
Also, the machine H is available for 10 hours (600 minutes) only, therefore,
2 x1 + 3x2 ≤ 600 (second constraint)
Hence
Maximize Z = 2 x1 + 3 x2
Subject to restrictions
x1 + x2 ≤ 400
2x1 + 3x2 ≤ 600
and non-negativity constraints
x1 ≥ 0 , x2 ≥ 0
Example 2
A company produces two products A and B which possess raw materials 400 quintals and
450 labour hours. It is known that 1 unit of product A requires 5 quintals of raw materials
and 10 man hours and yields a profit of Rs 45. Product B requires 20 quintals of raw
materials, 15 man hours and yields a profit of Rs 80. Formulate the LPP.
Solution
Let
x1 be the number of units of product A
x2 be the number of units of product B
9
Product A Product B Availability
Raw materials 5 20 400
Man hours 10 15 450
Profit Rs 45 Rs 80
Hence
Maximize Z = 45x1 + 80x2
Subject to
5x1+ 20 x2 ≤ 400
10x1 + 15x2 ≤ 450
x1 ≥ 0 , x2 ≥ 0
Example 3
A firm manufactures 3 products A, B and C. The profits are Rs. 3, Rs. 2 and Rs. 4
respectively. The firm has 2 machines and below is given the required processing time in
minutes for each machine on each product.
Products
Machine A B C
X 4 3 5
Y 2 2 4
Machine X and Y have 2000 and 2500 machine minutes. The firm must manufacture 100
A’s, 200 B’s and 50 C’s type, but not more than 150 A’s.
Solution
Let
x1 be the number of units of product A
x2 be the number of units of product B
x3 be the number of units of product C
10
Products
Machine A B C Availability
X 4 3 5 2000
Y 2 2 4 2500
Profit 3 2 4
Solution
Let
x1 be the no. of days a week the mill A has to work
x2 be the no. of days per week the mill B has to work
11
High 2 2 8
Medium 4 12 24
Cost per day Rs 1000 Rs 800
Example 5
A company has 3 operational departments weaving, processing and packing with the
capacity to produce 3 different types of clothes that are suiting, shirting and woolen
yielding with the profit of Rs. 2, Rs. 4 and Rs. 3 per meters respectively. 1m suiting
requires 3mins in weaving 2 mins in processing and 1 min in packing. Similarly 1m of
shirting requires 4 mins in weaving 1 min in processing and 3 mins in packing while 1m
of woolen requires 3 mins in each department. In a week total run time of each
department is 60, 40 and 80 hours for weaving, processing and packing department
respectively. Formulate a LPP to find the product to maximize the profit.
Solution
Let
x1 be the number of units of suiting
x2 be the number of units of shirting
x3 be the number of units of woolen
12
Packing 1 3 3 80
Profit 2 4 3
Example 6
ABC Company produces both interior and exterior paints from 2 raw materials m1 and
m2. The following table produces basic data of problem.
Solution
Let
x1 be the number of units of exterior paint
x2 be the number of units of interior paint
13
6x1 + 4x2 ≤ 24
x1 + 2x2 ≤ 6
x2 – x1≤ 1
x2≤ 2
x1≥0, x2 ≥0
b) The maximum daily demand for exterior paint is atmost 2.5 tons
x1≤ 2.5
c) Daily demand for interior paint is atleast 2 tons
x2 ≥ 2
d) Daily demand for interior paint is exactly 1 ton higher than that for exterior paint.
x2 > x1 + 1
Example 7
A company produces 2 types of hats. Each hat of the I type requires twice as much as
labour time as the II type. The company can produce a total of 500 hats a day. The market
limits daily sales of I and II types to 150 and 250 hats. Assuming that the profit per hat
are Rs.8 for type A and Rs. 5 for type B. Formulate a LPP models in order to determine
the number of hats to be produced of each type so as to maximize the profit.
Solution
Let x1 be the number of hats produced by type A
Let x2 be the number of hats produced by type B
14
Example 8
A manufacturer produces 3 models (I, II and III) of a certain product. He uses 2 raw
materials A and B of which 4000 and 6000 units respectively are available. The raw
materials per unit of 3 models are given below.
Raw materials I II III
A 2 3 5
B 4 2 7
The labour time for each unit of model I is twice that of model II and thrice that of model
III. The entire labour force of factory can produce an equivalent of 2500 units of model I.
A model survey indicates that the minimum demand of 3 models is 500, 500 and 375
units respectively. However the ratio of number of units produced must be equal to 3:2:5.
Assume that profits per unit of model are 60, 40 and 100 respectively. Formulate a LPP.
Solution
Let
x1 be the number of units of model I
x2 be the number of units of model II
x3 be the number of units of model III
15
x1 / 3 = x2 / 2 = x3 / 5 = k
x1 = 3k; x2 = 2k; x3 = 5k
x2 = 2k → k = x2 / 2
Therefore x1 = 3 x2 / 2 → 2x1 = 3x2
Similarly 2x3 = 5x2
Example 9
A person wants to decide the constituents of a diet which will fulfill his daily
requirements of proteins, fats and carbohydrates at the minimum cost. The choice is to be
made from four different types of foods. The yields per unit of these foods are given in
the table.
Yield/unit Cost/Unit
Food Type
Proteins Fats Carbohydrates Rs
1 3 2 6 45
2 4 2 4 40
3 8 7 7 85
4 6 5 4 65
Minimum
800 200 700
Requirement
16
Formulate the LP for the problem.
Solution
Let
x1 be the number of units of food type l
x2 be the number of units of food type 2
x3 be the number of units of food type 3
x4 be the number of units of food type 4
Exercise
1. Define the terms used in LPP.
2. Mention the advantages of LPP.
3. What are the assumptions and limitations of LPP?
4. A firm produces three products. These products are processed on three different
machines. The time required manufacturing one unit of each of the three products
and the daily capacity of the three machines are given in the table.
Time per unit (mins) Machine
Machine capacity
Product 1 Product 2 Product 3
Min /day
M1 2 3 2 440
M2 4 - 3 470
M3 2 5 - 430
17
It is required to determine the daily number of units to be manufactured for each
product. The profit per unit for product 1, 2 and 3 is Rs. 4, Rs. 3 and Rs. 6
respectively. It is assumed that all the amounts produced are consumed in the
market. Formulate the mathematical model for the model.
5. A chemical firm produces automobiles cleaner X and polisher Y and realizes Rs.
10 profit on each batch of X and Rs. 30 on Y. Both products require processing
through the same machines, A and B but X requires 4 hours in A and 8 hours in
B, whereas Y requires 6 hours in A and 4 hours in B. during the fourth coming
week machines A and B have 12 and 16 hours of available capacity, respectively.
Assuming that demand exists for both products, how many batches of each should
be produce to realize the optimal profit Z?
Unit 3
3.1 Graphical solution Procedure
3.2 Definitions
3.3 Example Problems
3.4 Special cases of Graphical method
3.4.1 Multiple optimal solutions
18
3.4.2 No optimal solution
3.4.3 Unbounded solution
3.2 Definitions
1. Solution – Any specification of the values for decision variable among (x1, x2…
xn) is called a solution.
19
2. Feasible solution is a solution for which all constraints are satisfied.
3. Infeasible solution is a solution for which at least one constraint is not satisfied.
4. Feasible region is a collection of all feasible solutions.
5. Optimal solution is a feasible solution that has the most favorable value of the
objective function.
6. Most favorable value is the largest value if the objective function is to be
maximized, whereas it is the smallest value if the objective function is to be
minimized.
7. Multiple optimal solution – More than one solution with the same optimal value
of the objective function.
8. Unbounded solution – If the value of the objective function can be increased or
decreased indefinitely such solutions are called unbounded solution.
9. Feasible region – The region containing all the solutions of an inequality
10. Corner point feasible solution is a solution that lies at the corner of the feasible
region.
Example 1
Solve 3x + 5y < 15 graphically
Solution
Write the given constraint in the form of equation i.e. 3x + 5y = 15
Put x=0 then the value y=3
Put y=0 then the value x=5
Therefore the coordinates are (0, 3) and (5, 0). Thus these points are joined to form a
straight line as shown in the graph.
Put x=0, y=0 in the given constraint then
0<15, the condition is true. (0, 0) is solution nearer to origin. So shade the region below
the line, which is the feasible region.
20
Example 2
Solve 3x + 5y >15
Solution
Write the given constraint in the form of equation i.e. 3x + 5y = 15
Put x=0, then y=3
Put y=0, then x=5
So the coordinates are (0, 3) and (5, 0)
Put x =0, y =0 in the given constraint, the condition turns out to be false i.e. 0 > 15 is
false.
So the region does not contain (0, 0) as solution. The feasible region lies on the outer part
of the line as shown in the graph.
21
Example 3
Max Z = 80x1 + 55x2
Subject to
4x1+ 2x2 ≤ 40
2x1 + 4x2 ≤ 32
x1 ≥ 0 , x2 ≥ 0
Solution
The first constraint 4x1+ 2 x2 ≤ 40, written in a form of equation
4x1+ 2 x2 = 40
Put x1 =0, then x2 = 20
Put x2 =0, then x1 = 10
The coordinates are (0, 20) and (10, 0)
22
The graphical representation is
The corner points of feasible region are A, B and C. So the coordinates for the corner
points are
A (0, 8)
B (8, 4) (Solve the two equations 4x1+ 2 x2 = 40 and 2x1 + 4x2 =32 to get the coordinates)
C (10, 0)
At B (8, 4)
Z = 80(8) + 55(4) = 860
At C (10, 0)
Z = 80(10) + 55(0) = 800
The maximum value is obtained at the point B. Therefore Max Z = 860 and x1 = 8, x2 = 4
23
Example 4
Minimize Z = 10x1 + 4x2
Subject to
3x1 + 2x2 ≥ 60
7x1 + 2x2 ≥ 84
3x1 +6x2 ≥ 72
x1 ≥ 0 , x2 ≥ 0
Solution
The first constraint 3x1 + 2x2 ≥ 60, written in a form of equation
3x1 + 2x2 = 60
Put x1 =0, then x2 = 30
Put x2 =0, then x1 = 20
The coordinates are (0, 30) and (20, 0)
24
The corner points of feasible region are A, B, C and D. So the coordinates for the corner
points are
A (0, 42)
B (6, 21) (Solve the two equations 7x1 + 2x2 = 84 and 3x1 + 2x2 = 60 to get the
coordinates)
C (18, 3) Solve the two equations 3x1 +6x2 = 72 and 3x1 + 2x2 = 60 to get the
coordinates)
D (24, 0)
At B (6, 21)
Z = 10(6) + 4(21) = 144
25
At C (18, 3)
Z = 10(18) + 4(3) = 192
At D (24, 0)
Z = 10(24) + 4(0) = 240
The minimum value is obtained at the point B. Therefore Min Z = 144 and x1 = 6, x2 = 21
Example 5
A manufacturer of furniture makes two products – chairs and tables. Processing of this
product is done on two machines A and B. A chair requires 2 hours on machine A and 6
hours on machine B. A table requires 5 hours on machine A and no time on machine B.
There are 16 hours of time per day available on machine A and 30 hours on machine B.
Profit gained by the manufacturer from a chair and a table is Rs 2 and Rs 10 respectively.
What should be the daily production of each of two products?
Solution
Let x1 denotes the number of chairs
Let x2 denotes the number of tables
LPP
Max Z = 2x1 + 10x2
Subject to
2x1+ 5x2 ≤ 16
26
6x1 + 0x2 ≤ 30
x1 ≥ 0 , x2 ≥ 0
Solving graphically
The first constraint 2x1+ 5x2 ≤ 16, written in a form of equation
2x1+ 5x2 = 16
Put x1 = 0, then x2 = 16/5 = 3.2
Put x2 = 0, then x1 = 8
The coordinates are (0, 3.2) and (8, 0)
The second constraint 6x1 + 0x2 ≤ 30, written in a form of equation
6x1 = 30 → x1 =5
The corner points of feasible region are A, B and C. So the coordinates for the corner
points are
A (0, 3.2)
B (5, 1.2) (Solve the two equations 2x1+ 5x2 = 16 and x1 =5 to get the coordinates)
C (5, 0)
27
At B (5, 1.2)
Z = 2(5) + 10(1.2) = 22
At C (5, 0)
Z = 2(5) + 10(0) = 10
Example 1
Solve by using graphical method
Max Z = 4x1 + 3x2
Subject to
4x1+ 3x2 ≤ 24
x1 ≤ 4.5
x2 ≤ 6
x1 ≥ 0 , x2 ≥ 0
Solution
The first constraint 4x1+ 3x2 ≤ 24, written in a form of equation
4x1+ 3x2 = 24
Put x1 =0, then x2 = 8
Put x2 =0, then x1 = 6
The coordinates are (0, 8) and (6, 0)
28
The second constraint x1 ≤ 4.5, written in a form of equation
x1 = 4.5
The corner points of feasible region are A, B, C and D. So the coordinates for the corner
points are
A (0, 6)
B (1.5, 6) (Solve the two equations 4x1+ 3x2 = 24 and x2 = 6 to get the coordinates)
C (4.5, 2) (Solve the two equations 4x1+ 3x2 = 24 and x1 = 4.5 to get the coordinates)
D (4.5, 0)
At B (1.5, 6)
Z = 4(1.5) + 3(6) = 24
29
At C (4.5, 2)
Z = 4(4.5) + 3(2) = 24
At D (4.5, 0)
Z = 4(4.5) + 3(0) = 18
Max Z = 24, which is achieved at both B and C corner points. It can be achieved not only
at B and C but every point between B and C. Hence the given problem has multiple
optimal solutions.
Example 1
Solve graphically
Max Z = 3x1 + 2x2
Subject to
x1+ x2 ≤ 1
x1+ x2 ≥ 3
x1 ≥ 0 , x2 ≥ 0
Solution
The first constraint x1+ x2 ≤ 1, written in a form of equation
x1+ x2 = 1
Put x1 =0, then x2 = 1
Put x2 =0, then x1 = 1
The coordinates are (0, 1) and (1, 0)
30
Put x2 =0, then x1 = 3
The coordinates are (0, 3) and (3, 0)
There is no common feasible region generated by two constraints together i.e. we cannot
identify even a single point satisfying the constraints. Hence there is no optimal solution.
Example
Solve by graphical method
Max Z = 3x1 + 5x2
Subject to
2x1+ x2 ≥ 7
x1+ x2 ≥ 6
x1+ 3x2 ≥ 9
x1 ≥ 0 , x2 ≥ 0
Solution
The first constraint 2x1+ x2 ≥ 7, written in a form of equation
2x1+ x2 = 7
Put x1 =0, then x2 = 7
31
Put x2 =0, then x1 = 3.5
The coordinates are (0, 7) and (3.5, 0)
The corner points of feasible region are A, B, C and D. So the coordinates for the corner
points are
32
A (0, 7)
B (1, 5) (Solve the two equations 2x1+ x2 = 7 and x1+ x2 = 6 to get the coordinates)
C (4.5, 1.5) (Solve the two equations x1+ x2 = 6 and x1+ 3x2 = 9 to get the coordinates)
D (9, 0)
We know that Max Z = 3x1 + 5x2
At A (0, 7)
Z = 3(0) + 5(7) = 35
At B (1, 5)
Z = 3(1) + 5(5) = 28
At C (4.5, 1.5)
Z = 3(4.5) + 5(1.5) = 21
At D (9, 0)
Z = 3(9) + 5(0) = 27
The values of objective function at corner points are 35, 28, 21 and 27. But there exists
infinite number of points in the feasible region which is unbounded. The value of
objective function will be more than the value of these four corner points i.e. the
maximum value of the objective function occurs at a point at ∞. Hence the given problem
has unbounded solution.
33
Exercise
1. A company manufactures two types of printed circuits. The requirements of transistors,
resistors and capacitor for each type of printed circuits along with other data are given in
table.
Circuit
Stock available (units)
A B
Transistor 15 10 180
Resistor 10 20 200
Capacitor 15 20 210
Profit Rs.5 Rs.8
How many circuits of each type should the company produce from the stock to earn
maximum profit.
[Ans. Max Z = 82, 2 units of type A circuit and 9 units of type B circuit]
2. A company making cool drinks has 2 bottling plants located at towns T1 and T2. Each
plant produces 3 drinks A, B and C and their production capacity per day is given in the
table.
Plant at
Cool drinks
T1 T2
A 6000 2000
34
B 1000 2500
C 3000 3000
The marketing department of the company forecasts a demand of 80000 bottles of A,
22000 bottles of B and 40000 bottles of C during the month of June. The operating cost
per day of plants at T1 and T2 are Rs. 6000 and Rs. 4000 respectively. Find graphically
the number of days for which each plants must be run in June so as to minimize the
operating cost while meeting the market demand.
[Ans. Min Z = Rs. 88000, 12 days for the plant T1 and 4 days for plant T2]
35
Module 2
Unit 1
1.1 Introduction
1.2 Steps to convert GLPP to SLPP
1.3 Some Basic Definitions
1.4 Introduction to Simplex Method
1.5 Computational procedure of Simplex Method
1.6 Worked Examples
1.1 Introduction
Subject to constraints
a11x1 + a12x2 + …..........+a1nxn (≤ or ≥) b1
a21x1 + a22x2 + ………..+a2nxn (≤ or ≥) b2
.
.
.
am1x1 + am2x2 + ……….+amnxn (≤ or ≥) bm
36
and
x1 ≥ 0, x2 ≥ 0,…, xn ≥ 0
Where constraints may be in the form of any inequality (≤ or ≥) or even in the form of an
equation (=) and finally satisfy the non-negativity restrictions.
Step 1 – Write the objective function in the maximization form. If the given objective
function is of minimization form then multiply throughout by -1 and write Max
z = ׳Min (-z)
Step 3 – The right side element of each constraint should be made non-negative
2x1 +x2 – s2 = -15
-2x1 - x2 + s2 = 15 (That is multiplying throughout by -1)
Step 4 – All variables must have non-negative values.
For example: x1 +x2 ≤ 3
x1 > 0, x2 is unrestricted in sign
Then x2 is written as x2 = x2 – ׳x2 ׳׳where x2׳, x2 ≥ ׳׳0
Therefore the inequality takes the form of equation as x1 + (x2 – ׳x2 )׳׳+ s1 = 3
37
Using the above steps, we can write the GLPP in the form of SLPP.
Example 1
Maximize Z = 3x1 + x2
Subject to
2 x1 + x2 ≤ 2
3 x1 + 4 x2 ≥ 12
and x1 ≥ 0, x2 ≥ 0
SLPP
Maximize Z = 3x1 + x2
Subject to
2 x1 + x2 + s 1 = 2
3 x1 + 4 x2 – s2 = 12
x1 ≥ 0, x2 ≥ 0, s1 ≥ 0, s2 ≥ 0
Example 2
Minimize Z = 4x1 + 2 x2
Subject to
3x1 + x2 ≥ 2
x1 + x2 ≥ 21
x1 + 2x2 ≥ 30
and x1 ≥ 0, x2 ≥ 0
SLPP
Maximize Z – = ׳4x1 – 2 x2
Subject to
38
3x1 + x2 – s1 = 2
x1 + x2 – s2 = 21
x1 + 2x2 – s3 = 30
x1 ≥ 0, x2 ≥ 0, s1 ≥ 0, s2 ≥ 0, s3 ≥ 0
Example 3
Minimize Z = x1 + 2 x2 + 3x3
Subject to
2x1 + 3x2 + 3x3 ≥ – 4
3x1 + 5x2 + 2x3 ≤ 7
and x1 ≥ 0, x2 ≥ 0, x3 is unrestricted in sign
SLPP
Maximize Z – = ׳x1 – 2 x2 – 3(x3 – ׳x3)׳׳
Subject to
–2x1 – 3x2 – 3(x3 – ׳x3 )׳׳+ s1= 4
3x1 + 5x2 + 2(x3 – ׳x3 )׳׳+ s2 = 7
x1 ≥ 0, x2 ≥ 0, x3 ≥ ׳0, x3 ≥ ׳׳0, s1 ≥ 0, s2 ≥ 0
Solution of LPP
Any set of variable (x1, x2… xn) which satisfies the given constraint is called solution of
LPP.
Basic solution
39
It is a solution obtained by setting any ‘n’ variable equal to zero and solving remaining
‘m’ variables. Such ‘m’ variables are called Basic variables and ‘n’ variables are called
Non-basic variables.
40
Testing whether it is an optimal solution
Improving the first trial solution by a set of rules and repeating the process till an
optimal solution is obtained
Advantages
Simple to solve the problems
The solution of LPP of more than two variables can be obtained.
Consider an example
Maximize Z = 3x1 + 2x2
Subject to
x1 + x2 ≤ 4
x1 – x 2 ≤ 2
and x1 ≥ 0, x2 ≥ 0
Solution
Cj → 3 2 0 0
Basic CB XB X1 X2 S1 S2 Min ratio
Variables XB /Xk
s1 0 4 1 1 1 0
s2 0 2 1 -1 0 1
Z= CB XB Δj
Step 4 – Calculation of Z and Δj and test the basic feasible solution for optimality by the
rules given.
Z= CB XB
= 0 *4 + 0 * 2 = 0
Δj = Zj – Cj
= CB Xj – Cj
Δ1 = CB X1 – Cj = 0 * 1 + 0 * 1 – 3 = -3
Δ2 = CB X2 – Cj = 0 * 1 + 0 * -1 – 2 = -2
Δ3 = CB X3 – Cj = 0 * 1 + 0 * 0 – 0 = 0
Δ4 = CB X4 – Cj = 0 * 0 + 0 * 1 – 0 = 0
Procedure to test the basic feasible solution for optimality by the rules given
Rule 1 – If all Δj ≥ 0, the solution under the test will be optimal. Alternate optimal
solution will exist if any non-basic Δj is also zero.
42
Rule 2 – If atleast one Δj is negative, the solution is not optimal and then proceeds to
improve the solution in the next step.
Rule 3 – If corresponding to any negative Δj, all elements of the column Xj are negative
or zero, then the solution under test will be unbounded.
In this problem it is observed that Δ1 and Δ2 are negative. Hence proceed to improve this
solution
Step 5 – To improve the basic feasible solution, the vector entering the basis matrix and
the vector to be removed from the basis matrix are determined.
Incoming vector
The incoming vector Xk is always selected corresponding to the most negative
value of Δj. It is indicated by (↑).
Outgoing vector
The outgoing vector is selected corresponding to the least positive value of
minimum ratio. It is indicated by (→).
Step 6 – Mark the key element or pivot element by ‘1’‘.The element at the intersection of
outgoing vector and incoming vector is the pivot element.
Cj → 3 2 0 0
Basic CB XB X1 X2 S1 S2 Min ratio
Variables (Xk) XB /Xk
s1 0 4 1 1 1 0 4/1=4
43
s2 0 2 1 -1 0 1 2 / 1 = 2 → outgoing
↑incoming
Z= CB XB = 0 Δ1= -3 Δ2= -2 Δ3=0
Δ4=0
If the number in the marked position is other than unity, divide all the elements of
that row by the key element.
Then subtract appropriate multiples of this new row from the remaining rows, so
as to obtain zeroes in the remaining position of the column Xk.
Step 7 – Now repeat step 4 through step 6 until an optimal solution is obtained.
44
Basic CB XB X1 X2 S1 S2 Min ratio
Variables XB /Xk
(R1=R1 / 2)
x2 2 1 0 1 1/2 -1/2
(R2=R2 + R1)
1 0 1/2 1/2
x1 3 3
Z = 11 Δ1=0 Δ2=0 Δ3=5/2 Δ4=1/2
Example 1
Maximize Z = 80x1 + 55x2
Subject to
4x1 + 2x2 ≤ 40
2x1 + 4x2 ≤ 32
and x1 ≥ 0, x2 ≥ 0
Solution
SLPP
Maximize Z = 80x1 + 55x2 + 0s1 + 0s2
Subject to
4x1 + 2x2+ s1= 40
2x1 + 4x2 + s2= 32
45
x1 ≥ 0, x2 ≥ 0, s1 ≥ 0, s2 ≥ 0
Cj → 80 55 0 0
Basic CB XB X1 X2 S1 S2 Min ratio
Variables XB /Xk
s1 0 40 4 2 1 0 40 / 4 = 10→
outgoing
s2 0 32 2 4 0 1
32 / 2 = 16
↑incoming
Z= CB XB = 0 Δ1= -80 Δ2= -55 Δ3=0
Δ4=0
(R1=R1 / 4)
(R2=R2– 2R1)
↑incoming
Z = 800 Δ1=0 Δ2= -15 Δ3=40
Δ4=0
(R1=R1– 1/2R2)
x1 80 8 1 0 1/3 -1/6
(R2=R2 / 3)
x2 55 4 0 1 -1/6 1/3
46
Since all Δj ≥ 0, optimal basic feasible solution is obtained. Therefore the solution is Max
Z = 860, x1 = 8 and x2 = 4
Example 2
Maximize Z = 5x1 + 3x2
Subject to
3x1 + 5x2 ≤ 15
5x1 + 2x2 ≤ 10
and x1 ≥ 0, x2 ≥ 0
Solution
SLPP
Maximize Z = 5x1 + 3x2 + 0s1 + 0s2
Subject to
3x1 + 5x2+ s1= 15
5x1 + 2x2 + s2= 10
x1 ≥ 0, x2 ≥ 0, s1 ≥ 0, s2 ≥ 0
Cj → 5 3 0 0
Basic CB XB X1 X2 S1 S2 Min ratio
Variables XB /Xk
s1 0 15 3 5 1 0 15 / 3 = 5
s2 0 10 5 2 0 1 10 / 5 = 2 →
outgoing
↑incoming
Z= CB XB = 0 Δ1= -5 Δ2= -3 Δ3=0 Δ4=0
47
(R1=R1– 3R2)
(R2=R2 /5)
x1 5 2 1 2/5 0 1/5 2/2/5 = 5
↑
Z = 10 Δ1=0 Δ2= -1 Δ3=0 Δ4=1
(R1=R1 / 19/5)
x2 3 45/19 0 1 5/19 -3/19
Since all Δj ≥ 0, optimal basic feasible solution is obtained. Therefore the solution is Max
Z = 235/19, x1 = 20/19 and x2 = 45/19
Example 3
Maximize Z = 5x1 + 7x2
Subject to
x1 + x2 ≤ 4
3x1 – 8x2 ≤ 24
10x1 + 7x2 ≤ 35
and x1 ≥ 0, x2 ≥ 0
Solution
SLPP
48
Maximize Z = 5x1 + 7x2 + 0s1 + 0s2 + 0s3
Subject to
x1 + x2 + s1= 4
3x1 – 8x2 + s2= 24
10x1 + 7x2 + s3= 35
x1 ≥ 0, x2 ≥ 0, s1 ≥ 0, s2 ≥ 0, s3 ≥ 0
Cj → 5 7 0 0 0
Basic CB XB X1 X2 S1 S2 S3 Min ratio
Variables XB /Xk
s1 0 4 1 1 1 0 0 4 /1 = 4→outgoing
s2 0 24 3 -8 0 1 0 –
s3 0 35 10 7 0 0 1 35 / 7 = 5
↑incoming
Z= CB XB = 0 -5 -7 0 0 0 ←Δj
x2 7 4 1 1 1 0 0
(R2 = R2 + 8R1)
s2 0 56 11 0 8 1 0
(R3 = R3 – 7R1)
0 7 3 0 -7 0 1
s3
Z = 28 2 0 7 0 0 ←Δj
Solution
SLPP
Maximize Z = 2x – 3y + z + 0s1 + 0s2 + 0s3
Subject to
3x + 6y + z + s1= 6
4x + 2y + z + s2= 4
x – y + z + s3 = 3
x ≥ 0, y ≥ 0, z ≥ 0 s1 ≥ 0, s2 ≥ 0, s3 ≥ 0
Cj → 2 -3 1 0 0 0
Basic CB XB X Y Z S1 S2 S3 Min ratio
Variables XB /Xk
s1 0 6 3 6 1 1 0 0 6/3=2
s2 0 4 4 2 1 0 1 0 4 / 4 =1→ outgoing
s3 0 3 1 -1 1 0 0 1 3/1=3
↑incoming
50
Z=0 -2 3 -1 0 0 0 ←Δj
↑incoming
Z=2 0 4 1/2 0 1/2 0 ←Δj
Since all Δj ≥ 0, optimal basic feasible solution is obtained. Therefore the solution is Max
Z = 10/3, x = 1/3, y = 0 and z = 8/3
Example 5
Maximize Z = 3x1 + 5x2
Subject to
3x1 + 2x2 ≤ 18
x1 ≤ 4
x2 ≤ 6
and x1 ≥ 0, x2 ≥ 0
51
Solution
SLPP
Maximize Z = 3x1 + 5x2 + 0s1 + 0s2 + 0s3
Subject to
3x1 + 2x2 + s1= 18
x1 + s2= 4
x2 + s3= 6
x1 ≥ 0, x2 ≥ 0, s1 ≥ 0, s2 ≥ 0, s3 ≥ 0
Cj → 3 5 0 0 0
Basic Min ratio
CB XB X1 X2 S1 S2 S3
Variables XB /Xk
s1 0 18 3 2 1 0 0 18 / 2 = 9
s2 0 4 1 0 0 1 0 4 / 0 = ∞ (neglect)
s3 0 6 0 1 0 0 1 6 / 1 = 6→
↑
Z=0 -3 -5 0 0 0 ←Δj
(R1=R1-2R3)
52
s1 0 6 3 0 1 0 -2 6/3=2→
s2 0 4 1 0 0 1 0 4/1=4
x2 5 6 0 1 0 0 1 --
↑
Z = 30 -3 0 0 0 5 ←Δj
(R1=R1 / 3)
x1 3 2 1 0 1/3 0 -2/3
(R2=R2 - R1)
s2 0 2 0 0 -1/3 1 2/3
x2 5 6 0 1 0 0 1
Z = 36 0 0 1 0 3 ←Δj
Since all Δj ≥ 0, optimal basic feasible solution is obtained. Therefore the solution is Max
Z = 36, x1 = 2, x2 = 6
Example 6
Minimize Z = x1 – 3x2 + 2x3
Subject to
3x1 – x2 + 3x3 ≤ 7
-2x1 + 4x2 ≤ 12
-4x1 + 3x2 + 8x3 ≤ 10
and x1 ≥ 0, x2 ≥ 0, x3 ≥ 0
Solution
SLPP
Min (-Z) = Max Z = ׳-x1 + 3x2 - 2x3 + 0s1 + 0s2 + 0s3
Subject to
3x1 – x2 + 3x3 + s1 = 7
-2x1 + 4x2 + s2 = 12
-4x1 + 3x2 + 8x3 + s3 = 10
x1 ≥ 0, x2 ≥ 0, x3 ≥ 0 s1 ≥ 0, s2 ≥ 0, s3 ≥ 0
53
Cj → -1 3 -2 0 0 0
Basic Min ratio
CB XB X1 X2 X3 S1 S2 S3
Variables XB /Xk
s1 0 7 3 -1 3 1 0 0 -
s2 0 12 -2 4 0 0 1 0 3→
s3 0 10 -4 3 8 0 0 1 10/3
↑
Z' = 0 1 -3 2 0 0 0 ←Δj
(R1 = R1 + R2)
s1 0 10 5/2 0 3 1 1/4 0 4→
(R2 = R2 / 4)
x2 3 3 -1/2 1 0 0 1/4 0 -
(R3 = R3 – 3R2)
s3 0 1 -5/2 0 8 0 -3/4 1 -
↑
Z' = 9 -5/2 0 0 0 3/4 0 ←Δj
(R1 = R1 / 5/2)
s3 0 11 0 1 11 1 -1/2 1
Z' = 11 0 0 3/5 1/5 1/5 0 ←Δj
Since all Δj ≥ 0, optimal basic feasible solution is obtained
Therefore the solution is Z' =11 which implies Z = -11, x1 = 4, x2 = 5, x3 = 0
Example 7
Max Z = 2x + 5y
x + y ≤ 600
0 ≤ x ≤ 400
54
0 ≤ y ≤ 300
Solution
SLPP
Max Z = 2x + 5y + 0s1 + 0s2 + 0s3
x + y + s1 = 600
x + s2 = 400
y + s3 = 300
x1 ≥ 0, y ≥ 0, s1 ≥ 0, s2 ≥ 0, s3 ≥ 0
Cj → 2 5 0 0 0
Basic Min ratio
CB XB X Y S1 S2 S3
Variables XB /Xk
s1 0 600 1 1 1 0 0 600 / 1 = 600
s2 0 400 1 0 0 1 0 -
s3 0 300 0 1 0 0 1 300 /1 = 300→
↑
Z=0 -2 -5 0 0 0 ←Δj
(R1 = R1 – R3)
s2 0 100 0 0 -1 1 1
y 5 300 0 1 0 0 1
55
Z = 2100 0 0 2 0 3 ←Δj
Since all Δj ≥ 0, optimal basic feasible solution is obtained. Therefore the solution is Z =
2100, x = 300, y = 300
Exercise
Solve by simplex method
1. Maximize Z = 5x1 + 3x2
Subject to
3x1 + 5x2 ≤ 15
5x1 + 2x2 ≤ 10
and x1 ≥ 0, x2 ≥ 0
[Ans. Max Z = 235/19, x1= 20/19, x2= 45/19]
Unit 2
2.1 Computational Procedure of Big – M Method (Charne’s Penalty Method)
57
2.2 Worked Examples
2.3 Steps for Two-Phase Method
2.4 Worked Examples
Step 2 – Add non-negative artificial variable to the left side of each of the equations
corresponding to the constraints of the type ‘≥’ or ‘=’.
When artificial variables are added, it causes violation of the corresponding constraints.
This difficulty is removed by introducing a condition which ensures that artificial
variables will be zero in the final solution (provided the solution of the problem exists).
On the other hand, if the problem does not have a solution, at least one of the artificial
variables will appear in the final solution with positive value. This is achieved by
assigning a very large price (per unit penalty) to these variables in the objective
function. Such large price will be designated by –M for maximization problems (+M for
minimizing problem), where M > 0.
Step 3 – In the last, use the artificial variables for the starting solution and proceed with
the usual simplex routine until the optimal solution is obtained.
Cj → -2 -1 0 0 -M -M
Basic Min ratio
CB XB X1 X2 S1 S2 A1 A2
Variables XB /Xk
a1 -M 3 3 1 0 0 1 0 3 /3 = 1→
a2 -M 6 4 3 -1 0 0 1 6 / 4 =1.5
s2 0 4 1 2 0 1 0 0 4/1=4
↑
Z = -9M 2 – 7M 1 – 4M M 0 0 0 ←Δj
x1 -2 1 1 1/3 0 0 X 0 1/1/3 =3
a2 -M 2 0 5/3 -1 0 X 1 6/5/3 =1.2→
s2 0 3 0 5/3 0 1 X 0 4/5/3=1.8
0 0 X 0
Z = -2 – 2M 0 ←Δj
x1 -2 3/5 1 0 1/5 0 X X
x2 -1 6/5 0 1 -3/5 0 X X
s2 0 1 0 0 1 1 X X
Z = -12/5 0 0 1/5 0 X X
59
Since all Δj ≥ 0, optimal basic feasible solution is obtained
Therefore the solution is Max Z = -12/5, x1 = 3/5, x2 = 6/5
Example 2
Max Z = 3x1 - x2
Subject to
2x1 + x2 ≥ 2
x1 + 3x2 ≤ 3
x2 ≤ 4
and x1 ≥ 0, x2 ≥ 0
Solution
SLPP
Max Z = 3x1 - x2 + 0s1 + 0s2 + 0s3 - M a1
Subject to
2x1 + x2 – s1+ a1= 2
x1 + 3x2 + s2 = 3
x2 + s3 = 4
x1 , x2 , s1, s2, s3, a1 ≥ 0
Cj
3 -1 0 0 0 -M
→
Basic Min ratio
CB XB X1 X2 S1 S2 S3 A1
Variables XB /Xk
a1 -M 2 2 1 -1 0 0 1 2 / 2 = 1→
s2 0 3 1 3 0 1 0 0 3/1=3
s3 0 4 0 1 0 0 1 0 -
↑
Z = -2M -2M-3 -M+1 M 0 0 0 ←Δj
x1 3 1 1 1/2 -1/2 0 0 X -
s2 0 2 0 5/2 1/2 1 0 X 2/1/2 = 4→
s3 0 4 0 1 0 0 1 X -
60
↑
Z=3 0 5/2 -3/2 0 0 X ←Δj
x1 3 3 1 3 0 1/2 0 X
s1 0 4 0 5 1 2 0 X
s3 0 4 0 1 0 0 1 X
Z=9 0 10 0 3/2 0 X
Since all Δj ≥ 0, optimal basic feasible solution is obtained. Therefore the solution is Max
Z = 9, x1 = 3, x2 = 0
Example 3
Min Z = 2x1 + 3x2
Subject to
x1 + x2 ≥ 5
x1 + 2x2 ≥ 6
and x1 ≥ 0, x2 ≥ 0
Solution
SLPP
Min Z = Max Z = ׳-2x1 - 3x2 + 0s1 + 0s2 - M a1 - M a2
Subject to
x1 + x2 – s1+ a1= 5
x1 + 2x2 – s2+ a2= 6
x1 , x2 , s1, s2, a1, a2 ≥ 0
Cj → -2 -3 0 0 -M -M
Basic Min ratio
CB XB X1 X2 S1 S2 A1 A2
Variables XB /Xk
a1 -M 5 1 1 -1 0 1 0 5 /1 = 5
61
a2 -M 6 1 2 0 -1 0 1 6 / 2 = 3→
↑
- ←Δj
Z = ׳-11M -2M + 2 M M 0 0
3M+3
a1 -M 2 1/2 0 -1 1/2 1 X 2/1/2 = 4→
x2 -3 3 1/2 1 0 -1/2 0 X 3/1/2 =6
↑
Z = ׳-2M- (-M+1) / ←Δj
0 M (-M+3)/2 0 X
9 2
x1 -2 4 1 0 -2 1 X X
x2 -3 1 0 1 1 -1 X X
Z = ׳-11 0 0 1 1 X X
Since all Δj ≥ 0, optimal basic feasible solution is obtained. Therefore the solution is Z' =
-11 which implies Max Z = 11, x1 = 4, x2 = 1
Example 4
Max Z =3x1 + 2x2 + x3
Subject to
2x1 + x2 + x3 = 12
3x1 + 4x2 = 11
and x1 is unrestricted
x2 ≥ 0, x3 ≥ 0
Solution
SLPP
Max Z = 3(x1' - x1'') + 2x2 + x3 - M a1 - M a2
Subject to
2(x1' - x1'') + x2 + x3 + a1= 12
62
3(x1' - x1'') + 4x2 + a2 = 11
x1', x1'', x2 , x3, a1, a2 ≥ 0
Cj → 3 -3 2 1 -M -M
Basic Min ratio
CB XB X1' X1'' X2 X3 A1 A2
Variables XB /Xk
a1 -M 12 2 -2 1 1 1 0 12 /2 = 6
a2 -M 11 3 -3 4 0 0 1 11/3 =3.6→
↑
Z = -23M -5M-3 5M+3 -5M-2 -M-1 0 0 ←Δj
a1 -M 14/3 0 0 -5/3 1 1 X 14/3/1 = 14/3→
x1' 3 11/3 1 -1 4/3 0 0 X -
↑
0 -6 5/3M+1 -M-1 0 X ←Δj
x3 1 14/3 0 0 -5/3 1 X X
x1' 3 11/3 1 -1 4/3 0 X X
Z = 47/3 0 0 1/3 0 X X
63
x1' = 11/3, x1'' = 0
x1 = x1' - x1'' = 11/3 – 0 = 11/3
Example 5
Max Z = 8x2
Subject to
x1 - x2 ≥ 0
2x1 + 3x2 ≤ -6
and x1 , x2 unrestricted
Solution
SLPP
Max Z = 8 (x2' – x2'') + 0s1 + 0s2 - M a1 - M a2
Subject to
(x1' - x1'') - (x2' – x2'') – s1+ a1= 0
-2(x1' - x1'') - 3(x2' – x2'') - s2 + a2 = 6
x1', x1'', x2', x2'', s1, a1, a2 ≥ 0
Cj → 0 0 8 -8 0 0 -M -M
Basic Min ratio
CB XB X1' X1'' X2' X2'' S1 S2 A1 A2
Variables XB /Xk
a1 -M 0 1 -1 -1 1 -1 0 1 0 0→
64
a2 -M 6 -2 2 -3 3 0 -1 0 1 2
↑
Z = -6M M -M 4M-8 -4M+8 M M 0 0 ←Δj
x2'' -8 0 1 -1 -1 1 -1 0 X 0 -
a2 -M 6 -5 5 0 0 3 -1 X 1 6/5→
↑
Z = -6M 5M-8 -5M+8 0 0 -3M+8 M X 0 ←Δj
x2'' -8 6/5 0 0 -1 1 -2/5 -1/5 X X
x1'' 0 6/5 -1 1 0 0 3/5 -1/5 X X
The process of eliminating artificial variables is performed in phase-I of the solution and
phase-II is used to get an optimal solution. Since the solution of LPP is computed in two
phases, it is called as Two-Phase Simplex Method.
65
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 the objective function.
Step 2 – Construct the Auxiliary LPP in which the new objective function Z* is to
be maximized subject to the given set of constraints.
Step 3 – Solve the auxiliary problem by simplex method until either of the
following three possibilities do arise
i. Max Z* < 0 and atleast one artificial vector appear in the optimum
basis at a positive level (Δj ≥ 0). In this case, given problem does
not possess any feasible solution.
ii. Max Z* = 0 and at least one artificial vector appears in the
optimum basis at a zero level. In this case proceed to phase-II.
iii. Max Z* = 0 and no one artificial vector appears in the optimum
basis. In this case also proceed to phase-II.
Phase II – Now assign the actual cost to the variables in the objective function and a zero
cost to every artificial variable that appears in the basis at the zero level. This new
objective function is now maximized by simplex method subject to the given constraints.
Simplex method is applied to the modified simplex table obtained at the end of phase-I,
until an optimum basic feasible solution has been attained. The artificial variables which
are non-basic at the end of phase-I are removed.
Example 1
Max Z = 3x1 - x2
Subject to
66
2x1 + x2 ≥ 2
x1 + 3x2 ≤ 2
x2 ≤ 4
and x1 ≥ 0, x2 ≥ 0
Solution
Standard LPP
Max Z = 3x1 - x2
Subject to
2x1 + x2 – s1+ a1= 2
x1 + 3x2 + s2 = 2
x2 + s3 = 4
x1 , x2 , s1, s2, s3,a1 ≥ 0
Auxiliary LPP
Max Z* = 0x1 - 0x2 + 0s1 + 0s2 + 0s3 -1a1
Subject to
2x1 + x2 – s1+ a1= 2
x1 + 3x2 + s2 = 2
x2 + s3 = 4
x1 , x2 , s1, s2, s3,a1 ≥ 0
Phase I
Cj
0 0 0 0 0 -1
→
Basic Min ratio
CB XB X1 X2 S1 S2 S3 A1
Variables XB /Xk
67
a1 -1 2 2 1 -1 0 0 1 1→
s2 0 2 1 3 0 1 0 0 2
s3 0 4 0 1 0 0 1 0 -
↑
Z* = -2 -2 -1 1 0 0 0 ←Δj
x1 0 1 1 1/2 -1/2 0 0 X
s2 0 1 0 5/2 1/2 1 0 X
s3 0 4 0 1 0 0 1 X
Z* = 0 0 0 0 0 0 X ←Δj
Since all Δj ≥ 0, Max Z* = 0 and no artificial vector appears in the basis, we proceed to
phase II.
Phase II
Cj → 3 -1 0 0 0
Basic Min ratio
CB XB X1 X2 S1 S2 S3
Variables XB /Xk
x1 3 1 1 1/2 -1/2 0 0 -
s2 0 1 0 5/2 1/2 1 0 2→
s3 0 4 0 1 0 0 1 -
↑
Z=3 0 5/2 -3/2 0 0 ←Δj
68
x1 3 2 1 3 0 1 0
s1 0 2 0 5 1 2 0
s3 0 4 0 1 0 0 1
Z=6 0 10 0 3 0 ←Δj
Example 2
Max Z = 5x1 + 8x2
Subject to
3x1 + 2x2 ≥ 3
x1 + 4x2 ≥ 4
x1 + x 2 ≤ 5
and x1 ≥ 0, x2 ≥ 0
Solution
Standard LPP
Auxiliary LPP
Max Z* = 0x1 + 0x2 + 0s1 + 0s2 + 0s3 -1a1 -1a2
Subject to
3x1 + 2x2 – s1+ a1 = 3
x1 + 4x2 – s2+ a2 = 4
69
x1 + x2 + s3 = 5
x1 , x2 , s1, s2, s3, a1, a2 ≥ 0
Phase I
Cj → 0 0 0 0 0 -1 -1
Basic Min ratio
CB XB X1 X2 S1 S2 S3 A1 A2
Variables XB /Xk
a1 -1 3 3 2 -1 0 0 1 0 3/2
a2 -1 4 1 4 0 -1 0 0 1 1→
s3 0 5 1 1 0 0 1 0 0 5
↑
Z* = -7 -4 -6 1 1 0 0 0 ←Δj
a1 -1 1 5/2 0 -1 1/2 0 1 X 2/5→
x2 0 1 1/4 1 0 -1/4 0 0 X 4
s3 0 4 3/4 0 0 1/4 1 0 X 16/3
↑
Z* = -1 -5/2 0 1 -1/2 0 0 X ←Δj
x1 0 2/5 1 0 -2/5 1/5 0 X X
x2 0 9/10 0 1 1/10 -3/10 0 X X
s3 0 37/10 0 0 3/10 1/10 1 X X
Z* = 0 0 0 0 0 0 X X ←Δj
Since all Δj ≥ 0, Max Z* = 0 and no artificial vector appears in the basis, we proceed to
phase II.
Phase II
Cj → 5 8 0 0 0
Basic Min ratio
CB XB X1 X2 S1 S2 S3
Variables XB /Xk
70
x1 5 2/5 1 0 -2/5 1/5 0 2→
x2 8 9/10 0 1 1/10 -3/10 0 -
s3 0 37/10 0 0 3/10 1/10 1 37
↑
Z = 46/5 0 0 -6/5 -7/5 0 ←Δj
s2 0 2 5 0 -2 1 0 -
x2 8 3/2 3/2 1 -1/2 0 0 -
s3 0 7/2 -1/2 0 1/2 0 1 7→
↑
Z = 12 7 0 -4 0 0 ←Δj
s2 0 16 3 0 0 1 2
x2 8 5 1 1 0 0 1/2
s1 0 7 -1 0 1 0 2
Z = 40 3 0 0 0 4
Since all Δj ≥ 0, optimal basic feasible solution is obtained. Therefore the solution is Max
Z = 40, x1 = 0, x2 = 5
Example 3
Max Z = -4x1 - 3x2 - 9x3
Subject to
2x1 + 4x2 + 6x3 ≥ 15
6x1 + x2 + 6x3 ≥ 12
and x1 ≥ 0, x2 ≥ 0, x3 ≥ 0
Solution
Standard LPP
Max Z = -4x1 - 3x2 - 9x3
Subject to
71
2x1 + 4x2 + 6x3 - s1+ a1= 15
6x1 + x2 + 6x3 - s2 + a2 = 12
x1 , x2 , s1, s2, a1, a2 ≥ 0
Auxiliary LPP
Max Z* = 0x1 - 0x2 - 0x3 + 0s1 + 0s2 -1a1 -1a2
Subject to
2x1 + 4x2 + 6x3 - s1+ a1= 15
6x1 + x2 + 6x3 - s2 + a2 = 12
x1 , x2 , s1, s2, a1, a2 ≥ 0
Phase I
Cj → 0 0 0 0 0 -1 -1
Basic Min ratio
CB XB X1 X2 X3 S1 S2 A1 A2
Variables XB /Xk
a1 -1 15 2 4 6 -1 0 1 0 15/6
a2 -1 12 6 1 6 0 -1 0 1 2→
↑
Z* = -27 -8 -5 -12 1 1 0 0 ←Δj
a1 -1 3 -4 3 0 -1 1 1 X 1→
x3 0 2 1 1/6 1 0 -1/6 0 X 12
↑
Z* = -3 4 -3 0 1 -1 0 X ←Δj
x2 0 1 -4/3 1 0 -1/3 1/3 X X
x3 0 11/6 22/18 0 1 1/18 -4/18 X X
Z* = 0 0 0 0 0 0 X X
Since all Δj ≥ 0, Max Z* = 0 and no artificial vector appears in the basis, we proceed to
phase II.
72
Phase II
Cj → -4 -3 -9 0 0
Basic Min ratio
CB XB X1 X2 X3 S1 S2
Variables XB /Xk
x2 -3 1 -4/3 1 0 -1/3 1/3 -
x3 -9 11/6 22/18 0 1 1/18 -4/18 3/2→
↑
Z = -39/2 -3 0 0 1/2 1 ←Δj
x2 -3 3 0 1 12/11 -3/11 1/11
x1 -4 3/2 1 0 18/22 1/22 -4/22
Example 4
Min Z = 4x1 + x2
Subject to
3x1 + x2 = 3
4x1 + 3x2 ≥ 6
x1 + 2x2 ≤ 4
and x1 ≥ 0, x2 ≥ 0
Solution
Standard LPP
Min Z = Max Z' = – 4x1 – x2
73
Subject to
3x1 + x2 + a1 = 3
4x1 + 3x2 – s1+ a2 = 6
x1 + 2x2 + s2 = 4
x1 , x2 , s1, s2, a1, a2 ≥ 0
Auxiliary LPP
Max Z* = 0x1 – 0x2 + 0s1 + 0s2 –1a1 –1a2
Subject to
3x1 + x2 + a1 = 3
4x1 + 3x2 – s1+ a2 = 6
x1 + 2x2 + s2 = 4
x1 , x2 , s1, s2, a1, a2 ≥ 0
Phase I
Cj → 0 0 0 0 -1 -1
Basic Min ratio
CB XB X1 X2 S1 S2 A1 A2
Variables XB /Xk
a1 -1 3 3 1 0 0 1 0 1→
a2 -1 6 4 3 -1 0 0 1 6/4
s2 0 4 1 2 0 1 0 0 4
↑
Z* = -9 -7 -4 1 0 0 0
x1 0 1 1 1/3 0 0 X 0 3
a2 -1 2 0 5/3 -1 0 X 1 6/5→
s2 0 3 0 5/3 0 1 X 0 9/5
↑
Z* = -2 0 -5/3 1 0 X 0
74
x1 0 3/5 1 0 1/5 0 X X
x2 0 6/5 0 1 -3/5 0 X X
s2 0 1 0 0 1 1 X X
Z* = 0 0 0 0 0 X X
Since all Δj ≥ 0, Max Z* = 0 and no artificial vector appears in the basis, we proceed to
phase II.
Phase II
Cj → -4 -1 0 0
Basic Min ratio
CB XB X1 X2 S1 S2
Variables XB /Xk
x1 -4 3/5 1 0 1/5 0 3
x2 -1 6/5 0 1 -3/5 0 -
s2 0 1 0 0 1 1 1→
↑
Z' = -18/5 0 0 -1/5 0 ←Δj
x1 -4 2/5 1 0 0 -1/5
x2 -1 9/5 0 1 0 3/5
s1 0 1 0 0 1 1
75
Exercise
Solve by Big-M method
1. Min Z = 4x1 + 2x2
Subject to
3x1 + x2 ≥ 27
x1 + x2 ≥ 21
and x1 ≥ 0, x2 ≥ 0
[Ans. Min Z = 48, x1 = 3, x2 =18]
2. Min Z = x1 + x2 + 3x3
Subject to
3x1 + 2x2 + x3 ≤ 3
2x1 + x2+ 2x3 ≥ 3
and x1 ≥ 0, x2 ≥ 0, x3 ≥ 0
[Ans. Min Z = 3, x1 = 3/4, x2 =0, x3 = 3/4]
76
3x1 - 4x2 ≤ 3
x2 + 3x3 ≤ 5
and x1 ≥ 0, x2 ≥ 0, x3 ≥ 0
[Ans. Max Z = 85/3, x1 = 23/3, x2 =5, x3 =0]
Unit 3
3.1 Special cases in Simplex Method
3.1.1 Degenaracy
3.1.2 Non-existing Feasible Solution
3.1.3 Unbounded Solution
3.1.4 Multiple Optimal Solutions
3.1.1 Degeneracy
The concept of obtaining a degenerate basic feasible solution in a LPP is known as
degeneracy. The degeneracy in a LPP may arise
At the initial stage when at least one basic variable is zero in the initial basic
feasible solution.
At any subsequent iteration when more than one basic variable is eligible to leave
the basic and hence one or more variables becoming zero in the next iteration and
the problem is said to degenerate. There is no assurance that the value of the
objective function will improve, since the new solutions may remain degenerate.
As a result, it is possible to repeat the same sequence of simplex iterations
endlessly without improving the solutions. This concept is known as cycling or
circling.
77
The row which first contains the smallest algebraic ratio contains the leaving
variable.
Example 1
Max Z = 3x1 + 9x2
Subject to
x1 + 4x2 ≤ 8
x1 + 2x2 ≤ 4
and x1 ≥ 0, x2 ≥ 0
Solution
Standard LPP
Max Z = 3x1 + 9x2 + 0s1 + 0s2
Subject to
x1 + 4x2 + s1 = 8
x1 + 2x2 + s2 = 4
x1 , x2 , s1, s2 ≥ 0
Cj→ 3 9 0 0
Basic
CB XB X1 X2 S1 S2 XB / XK S1 / X2
Variables
s1 0 8 1 4 1 0 1/4
s2 0 4 1 2 0 1 0/2→
↑
Z=0 -3 -9 0 0 ←Δj
78
s1 0 0 -1 0 1 -1
x2 9 2 1/2 1 0 1/2
Since all Δj ≥ 0, optimal basic feasible solution is obtained. Therefore the solution is Max
Z = 18, x1 = 0, x2 = 2
Note – Since a tie in minimum ratio (degeneracy), we find minimum of s 1 /xk for these
rows for which the tie exists.
Example 2
Max Z = 2x1 + x2
Subject to
4x1 + 3x2 ≤ 12
4x1 + x2 ≤ 8
4x1 - x2 ≤ 8
and x1 ≥ 0, x2 ≥ 0
Solution
Standard LPP
Max Z = 2x1 + x2 + 0s1 + 0s2 + 0s3
Subject to
4x1 + 3x2 + s1 = 12
4x1 + x2 + s2 = 8
4x1 - x2 + s3 = 8
x1 , x2 , s1, s2, s3 ≥ 0
Cj→ 2 1 0 0 0
Basic XB /
CB XB X1 X2 S1 S2 S3 S1 / X1 S2 / X1
Varibles XK
s1 0 12 4 3 1 0 0 12/4=3
79
s2 0 8 4 1 0 1 0 8/4=2 4/0=0 1/4
s3 0 8 4 -1 0 0 1 8/4=2 4/0=0 0/4=0→
↑
Z=0 -2 -1 0 0 0 ←Δj
s1 0 4 0 4 1 0 -1 4/4=1
s2 0 0 0 2 0 1 -1 0→
x1 2 2 1 -1/4 0 0 1/4 -
↑
Z=4 0 -3/2 0 0 1/2 ←Δj
s1 0 4 0 0 1 -2 1 0→
x2 1 0 0 1 0 1/2 -1/2 -
x1 2 2 1 0 0 1/8 1/8 16
↑
Z=4 0 0 0 3/4 -1/4 ←Δj
s3 0 4 0 0 1 -2 1
x2 1 2 0 1 1/2 -1/2 0
2
x1 1 0 -1/8 3/8 0
3/2
Since all Δj ≥ 0, optimal basic feasible solution is obtained. Therefore the solution is Max
Z = 5, x1 = 3/2, x2 = 2
80
Example 1
Max Z = 3x1 +2x2
Subject to
2x1 + x2 ≤ 2
3x1 + 4x2 ≥ 12
and x1 ≥ 0, x2 ≥ 0
Solution
Standard LPP
Cj→ 3 2 0 0 -M
Basic Min Ratio
CB XB X1 X2 S1 S2 A1
Variables XB / XK
s1 0 2 2 1 1 0 0 2/1=2→
a1 -M 12 3 4 0 -1 1 12/4=3
↑
Z= -12M -3M-3 -4M-2 0 M 0 ←Δj
x2 2 2 2 1 1 0 0
a1 -M 4 -5 0 -4 -1 1
81
Δj ≥ 0 so according to optimality condition the solution is optimal but the solution is
called pseudo optimal solution since it does not satisfy all the constraints but satisfies
the optimality condition. The artificial variable has a positive value which indicates there
is no feasible solution.
Example 2
Min Z = x1 –2x2– 3x3
Subject to
–2x1 + x2 + 3x3= 2
2x1 + 3x2 + 4x3= 1
and x1 ≥ 0, x2 ≥ 0, x3 ≥ 0
Solution
Standard LPP
Min Z = Max Z' = –x1 +2x2+ 3x3
Subject to
–2x1 + x2 + 3x3 + a1 = 2
2x1 + 3x2 + 4x3+ a2 = 1
x1 , x2 , a1, a2 ≥ 0
Auxiliary LPP
Max Z* = 0x1 + 0x2 + 0x3 –1a1 –1a2
Subject to
–2x1 + x2 + 3x3 + a1 = 2
2x1 + 3x2 + 4x3+ a2 = 1
x1 , x2 , a1, a2 ≥ 0
Phase I
82
Cj→ 0 0 0 -1 -1
Basic Min Ratio
CB XB X1 X2 X3 A1 A2
Variables XB / XK
a1 -1 2 -2 1 3 1 0 2/3
a2 -1 1 2 3 4 0 1 1/4→
↑
Z* = -3 0 -4 -7 0 0 ←Δj
a1 -1 5/4 -7/4 -5/4 0 1 X
x3 0 1/4 1/2 3/4 1 0 X
Since for all Δj ≥ 0, optimum level is achieved. At the end of phase-I Max Z* < 0 and one
of the artificial variable a1 appears at the positive optimum level. Hence the given
problem does not posses any feasible solution.
Example 1
Max Z = 6x1 - 2x2
83
Subject to
2x1 - x2 ≤ 2
x1 ≤ 4
and x1 ≥ 0, x2 ≥ 0
Solution
Standard LPP
Max Z = 6x1 - 2x2 + 0s1 + 0s2
Subject to
2x1 - x2 + s1 = 2
x1 + s2 = 4
x1 , x2 , s1, s2 ≥ 0
Cj→ 6 -2 0 0
Basic Min Ratio
CB XB X1 X2 S1 S2
Variables XB / XK
s1 0 2 2 -1 1 0 1→
s2 0 4 1 0 0 1 4
↑
Z=0 -6 2 0 0 ←Δj
x1 6 1 1 -1/2 1/2 0 -
s2 0 3 0 1/2 -1/2 1 6→
↑
Z=6 0 -1 3 0 ←Δj
x1 6 4 1 0 0 1
x2 -2 6 0 1 -1 2
Z = 12 0 0 2 2 ←Δj
84
The optimal solution is x1 = 4, x2 = 6 and Z =12
In the starting table, the elements of x2 are negative and zero. This is an indication that
the feasible region is not bounded. From this we conclude the problem has unbounded
feasible region but still the optimal solution is bounded.
Example 2
Max Z = -3x1 + 2x2
Subject to
x1 ≤ 3
x1 - x2 ≤ 0
and x1 ≥ 0, x2 ≥ 0
Solution
Standard LPP
Max Z = -3x1 + 2 x2 + 0s1 + 0s2
Subject to
x1 + s1 = 3
x1 - x2 + s2 = 0
x1 , x2 , s1, s2 ≥ 0
Cj→ -3 2 0 0
Basic Min Ratio
CB XB X1 X2 S1 S2
Variables XB / XK
s1 0 3 1 0 1 0
s2 0 0 1 -1 0 1
↑
Z=0 3 -2 0 0 ←Δj
85
Corresponding to the incoming vector (column x2), all elements are negative or zero. So
x2 cannot enter the basis and the outgoing vector cannot be found. This is an indication
that there exists unbounded solution for the given problem.
Example 3
Max Z = 107x1 + x2 +2x3
Subject to
14/3x1 + 1/3x2 - 2x3 ≤ 7/3
16x1 + 1/2x2 - 6x3 ≤ 5
3x1 - x2 - x3 ≤ 0
and x1 ≥ 0, x2 ≥ 0, x3 ≥ 0
Solution
Standard LPP
Max Z = 107x1 + x2 +2x3
Subject to
14/3x1 + 1/3x2 - 2x3 + s1 = 7/3
16x1 + 1/2x2 - 6x3 + s2 = 5
3x1 - x2 - x3 + s3 = 0
x1 , x2 , s1, s2, s3 ≥ 0
Cj→ 107 1 2 0 0 0
Basic Min Ratio
CB XB X1 X2 X3 S1 S2 S3
Variables XB / XK
s1 0 7/3 14/3 1/3 -2 1 0 0 0.5
s2 0 5 16 1/2 -6 0 1 0 0.8
86
s3 0 0 3 -1 -1 0 0 1 0→
↑
Z=0 -107 -1 -2 0 0 0 ←Δj
s1 0 7/3 0 17/9 -4/9 1 0 -14/9 -
s2 0 5 0 35/6 -2/3 0 1 -16/3 -
x1 107 0 1 -1/3 -1/3 0 0 1/3 -
Corresponding to negative Δ3, all the elements of x3 column are negative. So x3 cannot
enter into the basis matrix. This is an indication that there exists an unbounded solution to
the given problem.
Example
Max Z = 6x1 + 4x2
Subject to
2x1 + 3x2 ≤ 30
3x1 + 2x2 ≤ 24
x1 + x 2 ≥ 3
and x1 ≥ 0, x2 ≥ 0
Solution
Standard LPP
Max Z = 6x1 + 4x2 + 0s1 + 0s2 + 0s3 - Ma1
Subject to
87
2x1 + 3x2 + s1 = 30
3x1 + 2x2 + s2 = 24
x1 + x2 – s3 + a1= 3
x1 , x2 , s1, s2, s3, a1 ≥ 0
Cj→ 6 4 0 0 0 -M
Basic Min Ratio
CB XB X1 X2 S1 S2 S3 A1
Variables XB / XK
s1 0 30 2 3 1 0 0 0 15
s2 0 24 3 2 0 1 0 0 8
a1 -M 3 1 1 0 0 -1 1 3→
↑
Z = -3M -M-6 -M-4 0 0 M 0 ←Δj
s1 0 24 0 1 1 0 2 X 12
s2 0 15 0 -1 0 1 3 X 5→
x1 6 3 1 1 0 0 -1 X -
↑
Z = 18 0 2 0 0 -6 X ←Δj
s1 0 14 0 5/3 1 -2/3 0 X 42/5→
s3 0 5 0 -1/3 0 1/3 1 X -
x1 6 8 1 2/3 0 1/3 0 X 12
↑
Z = 48 0 0 0 2 0 X ←Δj
88
obtained above is not unique. Thus we can bring x2 into the basis in place of s1. The new
optimum simplex table is obtained as follows
Cj→ 6 4 0 0 0 -M
Basic Min Ratio
CB XB X1 X2 S1 S2 S3 A1
Variables XB / XK
x2 4 42/5 0 1 3/5 -2/5 0 X
s3 0 39/5 0 0 1/5 1/5 1 X
x1 6 12/5 1 0 -2/5 3/5 0 X
Z = 48 0 0 0 2 0 X ←Δj
Exercise
Solve
1. Max Z = 3x1 + 2.5x2
Subject to
2x1 + 4x2 ≥ 40
3x1 + 2x2 ≥ 50
and x1 ≥ 0, x2 ≥ 0
[Ans. Unbounded solution]
89
2. Max Z = 3x1 + 2x2
Subject to
2x1 + x2 ≤ 2
3x1 + 4x2 ≥ 12
and x1 ≥ 0, x2 ≥ 0
[Ans. Pseudo-optimum solution]
90
6. In the course of simplex table calculations, describe how u will detect a
a. Degenerate
b. An unbounded
c. Non-existing feasible solution
7. What is degeneracy?
Module 3
Unit 1
1.1 The Revised Simplex Method
1.2 Steps for solving Revised Simplex Method in Standard Form-I
1.3 Worked Examples
The net evaluation row Δj to determine the non-basic variable that enters the
basis.
The pivot column
91
The current basis variables and their values (XB column) to determine the
minimum positive ratio and then identify the basis variable to leave the basis.
The above information is directly obtained from the original equations by making use of
the inverse of the current basis matrix at any iteration.
SLPP
Max Z = 2x1 + x2+ 0s1+ 0s2
Subject to
3 x1 + 4 x2 + s 1 = 6
6 x1 + x2 + s2 = 3
and x1, x2, s1, s2 ≥ 0
Column vector corresponding to Z is usually denoted by e1. It is the first column of the
basis matrix B1, which is usually denoted as B1 = [β0(1), β1(1), β2(1) … βn(1)]
Hence the column β0(1), β1(1), β2(1) constitutes the basis matrix B1 (whose inverse B1-1 is
also B1)
B1-1
Basic e1 a1 (1) a2 (1)
β1(1) β2(1) XB Xk XB / Xk
variables (Z)
Z 1 0 0 0 -2 -1
93
s1 0 1 0 6 3 4
s2 0 0 1 3 6 1
Both Δ1 and Δ2 are negative. So find the most negative value and determine the
incoming vector.
Therefore most negative value is Δ1 = -2. This indicates a1 (1)
(x1) is incoming
vector.
Xk = B1-1 * a1 (1)
Stp 6 – Determine the outgoing vector. We are not supposed to calculate for Z row.
B1-1
Basic e1
β1(1) β2(1) XB Xk XB / Xk
variables (Z)
Z 1 0 0 0 -2 -
s1 0 1 0 6 3 2
94
s2 0 0 1 3 6 1/2→outgoing
↑
incoming
β1(1) β2(1) XB X1
R1 0 0 0 -2
R2 1 0 6 3
R3 0 1 3 6
Make the pivot element as 1 and the respective column elements to zero.
β1(1) β2(1) XB X1
R1 0 1/3 1 0
R2 1 -1/2 9/2 0
R3 0 1/6 1/2 1
B1-1
Basic e1 a4 (1) a2 (1)
β1 (1)
β2 (1)
XB Xk XB / Xk
variables (Z)
Z 1 0 1/3 1 0 -1
s1 0 1 -1/2 9/2 0 4
x1 0 0 1/6 1/2 1 1
Δ4 = 1 * 0 + 0 * 0 + 1/3 *1 = 1/3
95
Δ2 = 1 * -1 + 0 * 4 + 1/3 *1 = -2/3
B1-1
Basic e1
β1(1) β2(1) XB Xk XB / Xk
variables (Z)
Z 1 0 1/3 1 -2/3 -
s1 0 1 -1/2 9/2 7/2 9/7→outgoing
x1 0 0 1/6 1/2 1/6 3
↑
incoming
β1(1) β2(1) XB X2
R1 0 1/3 1 -2/3
R2 1 -1/2 9/2 7/2
R3 0 1/6 1/2 1/6
β1(1) β2(1) XB X2
96
R1 4/21 5/21 13/7 0
R2 2/7 -1/7 9/7 1
R3 -1/21 8/42 2/7 0
B1-1
Basic e1 a4 (1) a3 (1)
β1(1) β2(1) XB Xk XB / Xk
variables (Z)
Z 1 4/21 5/21 13/7 0 0
x2 0 2/7 -1/7 9/7 0 1
x1 0 -1/21 8/42 2/7 1 0
Δ4 and Δ3 are positive. Therefore optimal solution is Max Z = 13/7, x1= 2/7, x2 = 9/7
Example 1
Max Z = x1 + 2x2
Subject to
x1 + x2 ≤ 3
x1 + 2x2 ≤ 5
3x1 + x2 ≤ 6
and x1, x2 ≥ 0
Solution
SLPP
97
Max Z = x1 + 2x2+ 0s1+ 0s2+ 0s3
Subject to
x1 + x2 + s1 = 3
x1 + 2x2 + s2 = 5
3x1 + x2 + s3 = 6
and x1, x2, s1, s2, s3 ≥ 0
Standard Form-I
Z - x1 - 2x2 - 0s1 - 0s2 - 0s3= 0
x1 + x2 + s1 + 0s2 + 0s3= 3
x1 + 2x2 + 0s1 + s2 + 0s3 = 5
3x1 + x2 + 0s1 + 0s2 + s3 = 6
and x1, x2, s1, s2 , s3 ≥ 0
Matrix form
B1-1
Basic e1 a1 (1) a2 (1)
β1 (1)
β2 (1)
β3 (1)
XB Xk XB / Xk
variables (Z)
Z 1 0 0 0 0 -1 -2
98
s1 0 1 0 0 3 1 1
s2 0 0 1 0 5 1 2
s3 0 0 0 1 6 3 1
B1-1
Basic e1
β1(1) β2(1) β3(1) XB Xk XB / Xk
variables (Z)
Z 1 0 0 0 0 -2 -
s1 0 1 0 0 3 1 3
s2 0 0 1 0 5 2 5/2→
s3 0 0 0 1 6 1 6
↑
Improved Solution
99
R1 0 0 0 0 -2
R2 1 0 0 3 1
R3 0 1 0 5 2
R4 0 0 1 6 1
B1-1
Basic e1 a1 (1) a4 (1)
β1 (1)
β2 (1)
β3 (1)
XB Xk XB / Xk
variables (Z)
Z 1 0 1 0 5 -1 0
s1 0 1 -1/2 0 1/2 1 0
x2 0 0 1/2 0 5/2 1 1
s3 0 0 -1/2 1 7/2 3 0
Δ1 = 1 * -1 + 0 * 1 + 1 *1 + 0 *3= 0
Δ4 = 1 * 0 + 0 * 0 + 1 *1+ 0 *0 = 1
100
Δ1 and Δ4 are positive. Therefore optimal solution is Max Z = 5, x1= 0, x2 = 5/2
Example 2
Max Z = 80x1 + 55x2
Subject to
4x1 +2x2 ≤ 40
2x1 + 4x2 ≤ 32
and x1, x2 ≥ 0
Solution
Max Z = 80x1 + 55x2
Subject to
2x1 +x2 ≤ 20 (divide by 2)
x1 + 2x2 ≤ 16 (divide by 2)
and x1, x2 ≥ 0
SLPP
Max Z = 80x1 + 55x2+ 0s1+ 0s2
Subject to
2x1 +x2+ s1 = 20
x1 + 2x2 + s2 = 16
and x1, x2, s1, s2 ≥ 0
Standard form-I
Z - 80x1 - 55x2 - 0s1 - 0s2 = 0
2x1 +x2+ s1 + 0s2= 20
101
x1 + 2x2 + 0s1 + s2 = 16
and x1, x2, s1, s2 ≥ 0
Matrix form
B1-1
Basic e1 a1 (1) a2 (1)
β1 (1)
β2 (1)
XB Xk XB / Xk
variables (Z)
Z 1 0 0 0 -80 -55
s1 0 1 0 20 2 1
s2 0 0 1 16 1 2
Xk = B1-1 * a1 (1)
102
B1-1
Basic e1
β1(1) β2(1) XB Xk XB / Xk
variables (Z)
Z 1 0 0 0 -80 -
s1 0 1 0 20 2 10→
s2 0 0 1 16 1 16
↑
Improved solution
β1(1) β2(1) XB Xk
R1 0 0 0 -80
R2 1 0 20 2
R3 0 1 16 1
β1(1) β2(1) XB Xk
R1 40 0 800 0
R2 1/2 0 10 1
R3 -1/2 1 6 0
B1-1
Basic e1 β1(1) β2(1) XB Xk XB / Xk a3 (1) a2 (1)
103
variables (Z)
Z 1 40 0 800 0 -55
x1 0 1/2 0 10 1 1
s2 0 -1/2 1 6 0 2
B1-1
Basic e1
β1(1) β2(1) XB Xk XB / Xk
variables (Z)
Z 1 40 0 800 -15 -
x1 0 1/2 0 10 1/2 20
s2 0 -1/2 1 6 3/2 4→
↑
Improved solution
104
β1(1) β2(1) XB Xk
R1 40 0 800 -15
R2 1/2 0 10 1/2
R3 -1/2 1 6 3/2
β1(1) β2(1) XB Xk
R1 35 10 860 0
R2 2/3 -1/3 8 0
R3 -1/3 2/3 4 1
B1-1
Basic e1 a3 (1) a4 (1)
β1(1) β2(1) XB Xk XB / Xk
variables (Z)
Z 1 35 10 860 0 0
x1 0 2/3 -1/3 8 1 0
x2 0 -1/3 2/3 4 0 1
Computation of Δ3 and Δ4
Δ3 = 1 * 0 + 35 * 1 + 10 *0 = 35
Δ4 = 1 * 0 + 35 * 0 + 10 *1 = 10
Δ3 and Δ4 are positive. Therefore optimal solution is Max Z = 860, x1= 8, x2 = 4
Example 3
Max Z = x1 + x2+ x3
Subject to
4x1 + 5x2 + 3x3≤ 15
10x1 + 7x2+ x3 ≤ 12
and x1, x2, x3 ≥ 0
105
Solution
SLPP
Max Z = x1 + x2+ x3+ 0s1+ 0s2
Subject to
4x1 + 5x2 + 3x3+ s1 = 15
10x1 + 7x2+ x3 + s2 = 12
and x1, x2, x3, s1, s2 ≥ 0
Standard form-I
Z - x1 - x2 - x3 - 0s1 - 0s2 = 0
4x1 +5x2 + 3x3+ s1 + 0s2= 15
10x1 + 7x2+ x3 + 0s1+ s2 = 12
and x1, x2, x3, s1, s2 ≥ 0
Matrix form
B1-1
Basic e1 β1(1) β2(1) XB Xk XB / a1 (1) a2 (1) a3 (1)
106
variables (Z) Xk
Z 1 0 0 0 -1 -1 -1
s1 0 1 0 15 4 5 3
s2 0 0 1 12 10 7 1
Example 4
Max Z = 5x1 + 8x2 + 7x3 + 4x4 + 6x5
Subject to
2x1 + 3x2 + 3x3+ 2x4 + 2x5≤ 20
3x1 + 5x2+ 4x3 + 2x4 + 4x5≤ 30
and x1, x2, x3, x4, x5 ≥ 0
Solution
SLPP
Max Z = 5x1 + 8x2 + 7x3 + 4x4 + 6x5+ 0s1+ 0s2
107
Subject to
2x1 + 3x2 + 3x3+ 2x4 + 2x5+ s1 = 20
3x1 + 5x2+ 4x3 + 2x4 + 4x5+ s2 = 30
and x1, x2, x3, x4, x5, s1, s2 ≥ 0
Standard form-I
Z - 5x1 - 8x2 - 7x3 - 4x4 - 6x5 - 0s1 - 0s2 = 0
2x1 + 3x2 + 3x3+ 2x4 + 2x5+ s1 + 0s2= 20
3x1 + 5x2+ 4x3 + 2x4 + 4x5+ 0s1+ s2 = 30
and x1, x2, x3, x4, x5, s1, s2 ≥ 0
Matrix form
Additional table
Revised simplex table
B1-1
Basic e1 a1 (1) a2 (1) a3 (1) a4 (1) a5 (1)
β1 (1)
β2 (1)
XB Xk XB / Xk
variables (Z)
Z 1 0 0 0 -5 -8 -7 -4 -6
s1 0 1 0 20 2 3 3 2 2
s2 0 0 1 30 3 5 4 2 4
Computation of Δj for a1 (1) , a2 (1) , a3 (1) , a4 (1) , a5 (1)
108
Δ2 = first row of B1-1 * a2 (1) = 1 * -8 + 0 * 3 + 0 *5 = -8
Δ3 = first row of B1-1 * a3 (1) = 1 * -7 + 0 * 3 + 0 *4 = -7
Δ4 = first row of B1-1 * a4 (1) = 1 * -4 + 0 * 2 + 0 *2 = -4
Δ5 = first row of B1-1 * a5 (1) = 1 * -6 + 0 * 2 + 0 *4 = -6
Xk = B1-1 * a2 (1)
B1-1
Basic e1
β1(1) β2(1) XB Xk XB / Xk
variables (Z)
Z 1 0 0 0 -8 -
s1 0 1 0 20 3 20/3
s2 0 0 1 30 5 6→
↑
Improved solution
β1(1) β2(1) XB Xk
R1 0 0 0 -8
109
R2 1 0 20 3
R3 0 1 30 5
β1(1) β2(1) XB Xk
R1 0 8/5 48 0
R2 1 -3/5 2 0
R3 0 1/5 6 1
Additional table
Revised simplex table
B1-1
Basic e1 a1 (1) a7 (1) a3 (1) a4 (1) a5 (1)
β1 (1)
β2 (1)
XB Xk XB / Xk
variables (Z)
Z 1 0 8/5 48 -5 0 -7 -4 -6
s1 0 1 -3/5 2 2 0 3 2 2
x2 0 0 1/5 6 3 1 4 2 4
Xk = B1-1 * a4 (1)
110
B1-1
Basic e1
β1(1) β2(1) XB Xk XB / Xk
variables (Z)
Z 1 0 8/5 48 -4/5 -
s1 0 1 -3/5 2 4/5 10/4→
x2 0 0 1/5 6 2/5 15
↑
Improved solution
β1(1) β2(1) XB Xk
R1 0 8/5 48 -4/5
R2 1 -3/5 2 4/5
R3 0 1/5 6 2/5
β1(1) β2(1) XB Xk
R1 1 1 50 0
R2 5/4 -3/4 5/2 1
R3 -1/2 1/2 5 0
111
Additional table
Revised simplex table
B1-1
Basic e1 a1 (1) a7 (1) a3 (1) a6 (1) a5 (1)
β1 (1)
β2 (1)
XB Xk XB / Xk
variables (Z)
Z 1 1 1 50 -5 0 -7 0 -6
x4 0 5/4 -3/4 5/2 2 0 3 1 2
x2 0 -1/2 1/2 5 3 1 4 0 4
Δ1 = 0, Δ7 = 1, Δ3 = 0, Δ6 = 1, Δ5 = 0
112
Exercise
Solve by Revised Simplex method
1. Max Z = x1 + x2
Subject to
3x1 + 3x2 ≤ 6
x1 + 4x2 ≤ 4
x1, x2 ≥ 0
[Ans. Max Z = 11/5, x1 = 8/5, x2 = 3/5]
2. Max Z = x1 + 2x2
Subject to
x1 + 2x2 ≤ 3
x1 + 3x2 ≤ 1
x1, x2 ≥ 0
[Ans. Max Z = 1, x1 = 1, x2 = 0]
4. Max Z = x1 + x2
Subject to
x1 + 2x2 ≤ 2
4x1 + x2 ≤ 4
x1, x2 ≥ 0
[Ans. Max Z = 10/7, x1 = 6/7, x2 = 4/7]
113
Unit 2
Phase I – When the artificial variables are present in the initial solution with positive
values
Variables in
e1 e2 β1(2) β2(2) … βm(2) XB(2) Xk(2)
the basis
x0 1 0 0 0 … 0
x'n +1 0 1 0 0 … 0
xn +1 0 0 1 0 … 0
xn +2 0 0 0 1 … 0
. . . . . .
. . . . . .
xn +m 0 0 0 0 … 1
Step 2 – If x'n +1 < 0, compute Δj = second row of B2-1 * aj(2) and continue to step 3. If max
x'n +1 = 0 then go to phase II.
Step 6 – After determining the incoming and outgoing vector, next revised simplex table
can be easily obtained
Repeat the procedure of phase I to get max x'n +1 = 0 or all Δj for phase I are ≥ 0.
If max x'n +1 comes out of zero in phase I, all artificial variables must have the
value zero. It should be noted carefully that max x'n +1 will always come out to be
zero at the end of phase I if the feasible solution to the problem exists.
Proceed to phase II
Phase II - x'n +1 is considered like any other artificial variable; it can be removed from the
basic solution. Only x0 must always remain in the basic solution. However there will
always be at least one artificial vector in B2, otherwise it is not possible to have an m+2
dimensional bases. The procedure in phase II will be the same as described in standard
form-I
Solution
SLPP
Min Z = Max Z' = -x1 - 2x2+ 0s1+ 0s2
Subject to
2x1 + 5x2 - s1 + a1= 6
x1 + x2 - s2 + a2 = 2
and x1, x2, s1, s2 ≥ 0
Standard form-II
Z' + x1 + 2x2 = 0
-3x1 - 6x2 + s1 + s2 + av = -8 where av = - (a1 + a2)
2x1 + 5x2 - s1 + a1= 6
x1 + x2 – s2 + a2 = 2
and x1, x2, s1, s2 ≥ 0
The second constraint equation is formed by taking the negative sum of two constraints.
Matrix form
116
Phase -I
I Iteration
Basic B2-1
a1(2) a2(2) a3(2) a4(2)
variables e1 e2 β1 (2)
β2 (2)
XB Xk XB/Xk
e1 1 0 0 0 0 1 2 0 0
av 0 1 0 0 -8 -3 -6 1 1
a1 0 0 1 0 6 2 5 -1 0
a2 0 0 0 1 2 1 1 0 -1
Calculation of Δj
Δ1 = second row of B2-1 * a1(2) = -3
Δ2 = second row of B2-1 * a2(2) = -6
Δ3 = second row of B2-1 * a3(2) = 1
Δ4 = second row of B2-1 * a4(2) = 1
Δ2 is most negative. Therefore a2(2) (x2) is incoming vector
117
Basic B2-1
variables e1 e2 β1(2) β2(2) XB Xk XB/Xk
e1 1 0 0 0 0 2
av 0 1 0 0 -8 -6
a1 0 0 1 0 6 5 6/5→
a2 0 0 0 1 2 1 2
↑
Improved Solution
β1(1) β2(1) XB Xk
R1 0 0 0 2
R2 0 0 -8 -6
R3 1 0 6 5
R4 0 1 2 1
β1(1) β2(1) XB Xk
R1 -2/5 0 -12/5 0
R2 6/5 0 -4/5 0
R3 1/5 0 6/5 1
R4 -1/5 1 4/5 0
II iteration
118
Basic B2-1
a1(2) a5(2) a3(2) a4(2)
variables e1 e2 β1 (2)
β2 (2)
XB Xk XB/Xk
z' 1 0 -2/5 0 -12/5 1 0 0 0
av 0 1 6/5 0 -4/5 -3 0 1 1
x2 0 0 1/5 0 6/5 2 1 -1 0
a2 0 0 -1/5 1 4/5 1 0 0 -1
Calculation of Δj
Δ1 = -3/5, Δ5 = 6/5, Δ3 = -1/5, Δ4 = 1
Δ1 is most negative. Therefore a1(2) (x1) is incoming vector
Basic B2-1
variables e1 e2 β1(2) β2(2) XB Xk XB/Xk
z' 1 0 -2/5 0 -12/5 1/5
av 0 1 6/5 0 -4/5 -3/5
x2 0 0 1/5 0 6/5 2/5 3
a2 0 0 -1/5 1 4/5 3/5 4/3→
↑
Improved Solution
119
β1(1) β2(1) XB Xk
R1 -2/5 0 -12/5 1/5
R2 6/5 0 -4/5 -3/5
R3 1/5 0 6/5 2/5
R4 -1/5 1 4/5 3/5
β1(1) β2(1) XB Xk
R1 -1/3 -1/3 -8/3 0
R2 1 1 0 0
R3 1/3 -2/3 2/3 0
R4 -1/3 5/3 4/3 1
III iteration
Basic B2-1
a6(2) a5(2) a3(2) a4(2)
variables e1 e2 β1 (2)
β2 (2)
XB Xk XB/Xk
z' 1 0 -1/3 -1/3 -8/3 0 0 0 0
av 0 1 1 1 0 0 0 1 1
x2 0 0 1/3 -2/3 2/3 0 1 -1 0
x1 0 0 -1/3 5/3 4/3 1 0 0 -1
Phase II
Basic B2-1
a3(2) a4(2)
variables e1 e2 β1 (2)
β2 (2)
XB Xk XB/Xk
z' 1 0 -1/3 -1/3 -8/3 0 0
120
av 0 1 1 1 0 1 1
x2 0 0 1/3 -2/3 2/3 -1 0
x1 0 0 -1/3 5/3 4/3 0 -1
Example 2
Max Z = x1 + 2x2 + 3x3 - x4
Subject to
x1 + 2x2 + 3x3 = 15
2x1 + x2 + 5x3 = 20
x1 + 2x2 + x3 + x4 = 10
and x1, x2, x3 ≥ 0
Solution
SLPP
Max Z = x1 + 2x2 + 3x3 - x4
Subject to
x1 + 2x2 + 3x3 + a1= 15
2x1 + x2 + 5x3 + a2 = 20
x1 + 2x2 + x3 + x4 + a3 = 10
and x1, x2, a1, a2 ≥ 0
Standard form-II
Z - x1 - 2x2 - 3x3 + x4 = 0
-4x1 - 5x2 - 9x3 - x4 + av = -45 where av = - (a1 + a2+ a3)
x1 + 2x2 + 3x3 + a1= 15
2x1 + x2 + 5x3 + a2 = 20
121
x1 + 2x2 + x3 + x4 + a3 = 10
x1, x2, a1, a2, a3 ≥ 0
Matrix form
Phase I
I Iteration
Basic B2-1
a1(2) a2(2) a3(2) a4(2)
variables e1 e2 β1 (2)
β2 (2)
β3 (2)
XB Xk XB/Xk
e1 1 0 0 0 0 0 -1 -2 -3 1
av 0 1 0 0 0 -45 -4 -5 -9 -1
a1 0 0 1 0 0 15 1 2 3 0
a2 0 0 0 1 0 20 2 1 5 0
a3 0 0 0 0 1 10 1 2 1 1
Calculation of Δj
Δ1 = second row of B2-1 * a1(2) = -4
Δ2 = second row of B2-1 * a2(2) = -5
Δ3 = second row of B2-1 * a3(2) = -9
Δ4 = second row of B2-1 * a4(2) = -1
122
Δ3 is most negative. Therefore a3(2) (x3) is incoming vector
Basic B2-1
variables e1 e2 β1(2) β2(2) β3(2) XB Xk XB/Xk
e1 1 0 0 0 0 0 -3
av 0 1 0 0 0 -45 -9
a1 0 0 1 0 0 15 3 5
a2 0 0 0 1 0 20 5 4→
a3 0 0 0 0 1 10 1 10
↑
Improved Solution
123
R2 0 0 0 -45 -9
R3 1 0 0 15 3
R4 0 1 0 20 5
R5 0 0 1 10 1
II Iteration
Basic B2-1
a1(2) a2(2) a6(2) a4(2)
variables e1 e2 β1(2) β2(2) β3(2) XB Xk XB/Xk
z 1 0 0 3/5 0 12 -1 -2 0 1
av 0 1 0 9/5 0 -9 -4 -5 0 -1
a1 0 0 1 -3/5 0 3 1 2 0 0
x3 0 0 0 1/5 0 4 2 1 1 0
a3 0 0 0 -1/5 1 6 1 2 0 1
Calculation of Δj
Δ1 = -2/5, Δ2 = -16/5, Δ6 = 9/5, Δ4 = -1
Δ4 is most negative. Therefore a4(2) (x4) is incoming vector
124
Compute the column vector Xk
Basic B2-1
variables e1 e2 β1(2) β2(2) β3(2) XB Xk XB/Xk
Z 1 0 0 3/5 0 12 1
av 0 1 0 9/5 0 -9 -1
a1 0 0 1 -3/5 0 3 0
x3 0 0 0 1/5 0 4 0
a3 0 0 0 -1/5 1 6 1 6→
↑
Improved Solution
125
R1 0 4/5 -1 6 0
R2 0 8/5 1 -3 0
R3 1 -3/5 0 3 0
R4 0 1/5 0 4 0
R5 0 -1/5 1 6 1
III Iteration
Basic B2-1
a1(2) a2(2) a6(2) a7(2)
variables e1 e2 β1 (2)
β2 (2)
β3 (2)
XB Xk XB/Xk
Z 1 0 0 4/5 -1 6 -1 -2 0 0
av 0 1 0 8/5 1 -3 -4 -5 0 0
a1 0 0 1 -3/5 0 3 1 2 0 0
x3 0 0 0 1/5 0 4 2 1 1 0
x4 0 0 0 -1/5 1 6 1 2 0 1
Calculation of Δj
Δ1 = 1/5, Δ2 = -7/5, Δ6 = 8/5, Δ7 = 1
Δ2 is most negative. Therefore a2(2) (x2) is incoming vector
Compute the column vector Xk
Basic B2-1
variables e1 e2 β1(2) β2(2) β3(2) XB Xk XB/Xk
126
z 1 0 0 4/5 -1 6 -16/5
av 0 1 0 8/5 1 -3 -7/5
a1 0 0 1 -3/5 0 3 7/5 15/7→
x3 0 0 0 1/5 0 4 1/5 20
x4 0 0 0 -1/5 1 6 9/5 30/9
↑
Improved Solution
IV Iteration
Phase II
Basic B2-1
a1(2)
variables e1 e2 β1 (2)
β2 (2)
β3 (2)
XB Xk XB/Xk
z 1 0 16/7 4/7 -1 90/7 -1
av 0 1 1 1 1 0 -4
x2 0 0 5/7 -3/7 0 15/7 1
x3 0 0 -1/7 2/7 0 25/7 2
x4 0 0 -9/7 4/7 1 15/7 1
128
Disadvantages
In solving the numerical problems side computations are also requires, therefore more
computational mistakes may occur in comparison to original simplex method.
Exercise
Solve by revised simplex method
1. Max Z = 3x1 + 5x2
Subject to
x1 ≤ 4
x2 ≤ 6
3x1 + 2x2 ≤ 18
x1, x2 ≥ 0
3. Max Z = x1 + x2 + 3x3
Subject to
3x1 + 2x2 + x3 ≤ 3
2x1 + x2 + 2x3 ≤ 2
x1, x2, x3 ≥ 0
129
[Ans. Max Z = 3, x1 = 0, x2 = 0, x3 = 1]
4. Min Z = 3x1 + x2
Subject to
x1 + x2 ≥ 1
2x1 + x2 ≥ 0
x1, x2 ≥ 0
[Ans. Min Z = 1, x1 = 0, x2 = 1]
Unit 3
3.1 Duality in LPP
3.2 Important characteristics of Duality
3.3 Advantages and Applications of Duality
3.4 Steps for Standard Primal Form
3.5 Rules for Converting any Primal into its Dual
3.6 Example Problems
3.7 Primal-Dual Relationship
130
3.8 Duality and Simplex Method
131
a1nw1 + a2nw2 + ……….+amnwm ≥ cn
and
w1, w2, …, wm ≥ 0
Matrix Notation
Primal
Max Zx = CX
Subject to
AX ≤ b and X ≥ 0
Dual
Min Zw = bT W
Subject to
AT W ≥ CT and W ≥ 0
Step 2 – If the constraints have an inequality sign ‘≥’ then multiply both sides by -1 and
convert the inequality sign to ‘≤’.
Step 3 – If the constraint has an ‘=’ sign then replace it by two constraints involving the
inequalities going in opposite directions. For example x1+ 2x2 = 4 is written as
x1+2x2 ≤ 4
x1+2x2 ≥ 4 (using step2) → - x1-2x2 ≤ - 4
133
Step5 – We get the standard primal form of the given LPP in which.
o All constraints have ‘≤’ sign, where the objective function is of
maximization form.
o All constraints have ‘≥’ sign, where the objective function is of
minimization from.
Example 1
Min Zx = 2x2 + 5x3
Subject to
x1+x2 ≥ 2
2x1+x2+6x3 ≤ 6
x1 - x2 +3x3 = 4
x1 , x 2 , x 3 ≥ 0
Solution
134
Primal
Max Zx' = -2x2 – 5x3
Subject to
-x1-x2 ≤ -2
2x1+x2+6x3 ≤ 6
x1 - x2 +3x3 ≤ 4
-x1 + x2 -3x3 ≤ -4
x1, x2 , x3 ≥ 0
Dual
Min Zw = -2w1 + 6w2 + 4w3 – 4w4
Subject to
-w1 + 2w2 +w3 –w4 ≥ 0
-w1 + w2 - w3 +w4 ≥ -2
6w2 + 3w3 –3w4 ≥ -5
w1, w2, w3, w4 ≥ 0
Example 2
Min Zx = 3x1 - 2x2 + 4x3
Subject to
3x1+5x2 + 4x3 ≥ 7
6x1+x2+3x3 ≥ 4
7x1 - 2x2 -x3 ≥ 10
x1 - 2x2 + 5x3 ≥ 3
4x1 + 7x2 - 2x3 ≥ 2
x1 , x 2 , x 3 ≥ 0
135
Solution
Primal
Max Zx' = -3x1 + 2x2 - 4x3
Subject to
-3x1 - 5x2 - 4x3 ≤ -7
-6x1 - x2 - 3x3 ≤ -4
-7x1 + 2x2 + x3 ≤ - 10
-x1 + 2x2 - 5x3 ≤ - 3
-4x1 - 7x2 + 2x3 ≤ - 2
x1, x2 , x3 ≥ 0
Dual
Min Zw = -7w1 - 4w2 - 10w3 – 3w4 -2w5
Subject to
-3w1 - 6w2 - 7w3 –w4 – 4w5 ≥ -3
-5w1 - w2 + 2w3 + 2w4 – 7w5 ≥ 2
-4w1 - 3w2 + w3 - 5w4 + 2w5 ≥ -4
w1, w2, w3, w4, w5 ≥ 0
Example 3
Max Z = 2x1+ 3x2 + x3
Subject to
4x1+ 3x2 + x3 = 6
x1+ 2x2 + 5x3 = 4
x1 , x 2 ≥ 0
Solution
Primal
136
Max Zx = 2x1+ 3x2 + x3
Subject to
4x1+ 3x2 + x3 ≤ 6
-4x1 - 3x2 - x3 ≤ -6
x1 + 2x2 + 5x3 ≤ 4
-x1 - 2x2 - 5x3 ≤ -4
x1, x2 ≥ 0
Dual
Min Zw = 6w1 - 6w2 + 4w3 –4w4
Subject to
4w1 - 4w2 + w3 –w4 ≥ 2
3w1 - 3w2 + 2w3 - 2w4 ≥ 3
w1 - w2 + 5w3 - 5w4 ≥ 1
w1, w2, w3, w4≥ 0
Example 4
Min Zx = x1+ x2 + x3
Subject to
x1 - 3x2 + 4x3 = 5
x1 - 2x2 ≤ 3
2x2 - x3 ≥ 4
x1, x2 ≥ 0 ,x3 is unrestricted in sign
Solution
Primal
Max Z' = - x1- x2 – x3' + x3''
Subject to
137
x1 - 3x2 + 4(x3' - x3'') ≤ 5
-x1+ 3x2 - 4(x3' - x3'') ≤ -5
x1 - 2x2 ≤ 3
-2x2 + x3' - x3'' ≤ -4
x1, x2 , x3', x3'' ≥ 0
Dual
Min Zw = 5w1 - 5w2 + 3w3 – 4w4
Subject to
w1 - w2 + w3 ≥ -1
-3w1 + 3w2 - 2w3 - 2w4 ≥ -1
4w1 - 4w2 + w4 ≥ -1
-4w1 + 4w2 - w4 ≥ 1
w1, w2, w3, w4, ≥ 0
Example 5
Max Z = x1 - x2 + 3x3
Subject to
x1 + x2 + x3 ≤ 10
2x1 – x3 ≤ 2
2x1 - 2x2 + 3x3 ≤ 6
x1, x2, x3 ≥ 0
Solution
Primal
Max Zx = x1 - x2 + 3x3
Subject to
x1 + x2 + x3 ≤ 10
2x1 - x3 ≤ 2
2x1 - 2x2 + 3x3 ≤ 6
138
x1, x2, x3 ≥ 0
Dual
Min Zw = 10w1 + 2w2 + 6w3
Subject to
w1 + 2w2 +2w3 ≥ 1
w1 - 2w3 ≥ -1
w1 - w2 + 3w3 ≥ 3
w1, w2, w3 ≥ 0
Symmetry property
For any primal problem and its dual problem, all relationships between them must be
symmetric because dual of dual is primal.
139
If one problem has feasible solution and a bounded objective function (optimal
solution) then the other problem has a finite optimal solution.
If one problem has feasible solution and an unbounded optimal solution then the
other problem has no feasible solution
If one problem has no feasible solution then the other problem has either no
feasible solution or an unbounded solution.
If kth constraint of primal is equality then the dual variable wk is unrestricted in sign
If pth variable of primal is unrestricted in sign then pth constraint of dual is an equality.
1. Solve the given primal problem using simplex method. Hence write the solution of
its dual
Max Z = 30x1 + 23x2 + 29x3
Subject to
140
6x1 + 5x2 + 3x3 ≤ 26
4x1 + 2x2 + 6x3 ≤ 7
x1 ≥ 0, x2 ≥ 0
Solution
Primal form
Max Z = 30x1 + 23x2 + 29x3
Subject to
6x1 + 5x2 + 3x3 ≤ 26
4x1 + 2x2 + 6x3 ≤ 7
x1 ≥ 0, x2 ≥ 0
SLPP
Max Z = 30x1 + 23x2 + 29x3+ 0s1+ 0s2
Subject to
6x1 + 5x2 + 3x3 + s1 = 26
4x1 + 2x2 + 6x3 + s2 = 7
x1, x2, s1, s2 ≥ 0
Cj→ 30 23 29 0 0
Basic Min Ratio
CB XB X1 X2 X3 S1 S2
Variables XB / XK
s1 0 26 6 5 3 1 0 26/6
s2 0 7 4 2 6 0 1 7/4→
↑
Z=0 -30 -23 -29 0 0 ←Δj
s1 0 31/2 0 2 -6 1 -3/2 31/4
x1 30 7/4 1 1/2 3/2 0 1/4 7/2→
↑
Z = 105/2 0 -8 16 0 15/2 ←Δj
141
s1 0 17/2 -4 0 -12 1 -5/2
x2 23 7/2 2 1 3 0 1/2
2. Use duality to solve the given problem. Also read the solution of its primal.
Min Z = 3x1 + x2
Subject to
x1 + x2 ≥ 1
2x1 + 3x2 ≥ 2
x1 ≥ 0 , x2 ≥ 0
Solution
Primal
Min Z =Max Z' = -3x1 - x2
Subject to
- x1 - x2 ≤ -1
-2x1 - 3x2 ≤ - 2
x1 ≥ 0 , x2 ≥ 0
Dual
Min Zw = -w1 - 2w2
Subject to
-w1 - 2w2 ≥ -3
-w1 - 3w2 ≥ -1
w1, w2 ≥ 0
Cj→ 1 2 0 0
Basic Min Ratio
CB WB W1 W2 S1 S2
Variables WB / WK
s1 0 3 1 2 1 0 3/2
s2 0 1 1 3 0 1 1/3←
↑
Zw' = 0 -1 -2 0 0 ←Δj
s1 0 7/3 1/3 0 1 -2/3 7
w2 2 1/3 1/3 1 0 1/3 1→
↑
Zw' = 2/3 -1/3 0 0 2/3 ←Δj
s1 0 2 0 -1 1 -1
w1 1 1 1 3 0 1
Zw' = 1 0 1 0 1 ←Δj
Solution
Primal
Max Z = 4x1 + 2x2
Subject to
- x1 - x2 ≤ -3
-x1 + x2 ≤ -2
x1 ≥ 0, x2 ≥ 0
Dual
Min Zw = -3w1 - 2w2
Subject to
-w1 - w2 ≥ 4
-w1 + w2 ≥ 2
w1, w2 ≥ 0
Cj→ 3 2 0 0 -M -M
144
Basic Min Ratio
CB WB W1 W2 S1 S2 A1 A2
Variables WB / WK
a1 -M 4 -1 -1 -1 0 1 0 -
a2 -M 2 -1 1 0 -1 0 1 2→
↑
2M - 0
Zw' = -6M -2 M M 0 ←Δj
3
a1 -M 6 -2 0 -1 -1 1 X
w2 2 2 -1 1 0 -1 0 X
Δj ≥ 0 and at the positive level an artificial vector (a1) appears in the basis. Therefore the
dual problem does not posses any optimal solution. Consequently there exists no finite
optimum solution to the given problem.
Solution
Primal
Min Z =Max Z' = -x1 + x2
Subject to
- 2x1 - x2 ≤ -2
x1 + x2 ≤ -1
x1 ≥ 0 , x2 ≥ 0
145
Dual
Min Zw = -2w1 - w2
Subject to
-2w1 + w2 ≥ -1
-w1 + w2 ≥ 1
w1, w2 ≥ 0
Auxiliary LPP
Max Zw' = 0w1 + 0w2 + 0s1+ 0s2 - 1a1
Subject to
2w1 - w2 + s1= 1
-w1 + w2 - s2 + a1 = 1
w1, w2, s1, s2, a1 ≥ 0
Phase I
Cj→ 0 0 0 0 -1
Basic Min Ratio
CB WB W1 W2 S1 S2 A1
Variables XB / XK
s1 0 1 2 -1 1 0 0 -
a1 -1 1 -1 1 0 -1 1 1→
↑
Zw' = -1 1 -1 0 1 0 ←Δj
146
s1 0 2 1 0 1 -1 X
w2 0 1 -1 1 0 -1 X
Zw' = 0 0 0 0 0 X ←Δj
Δj ≥ 0 and no artificial vector appear at the positive level of the basis. Hence proceed to
phase II
Phase II
Cj→ 2 1 0 0
Basic Min Ratio
CB WB W1 W2 S1 S2
Variables XB / XK
s1 0 2 1 0 1 -1 2→
w2 1 1 -1 1 0 -1 -
↑
Zw' = 1 -3 0 0 -1 ←Δj
w1 2 2 1 0 1 -1 -
w2 1 3 0 1 1 -2 -
↑
Zw' = 7 0 0 3 -4 ←Δj
Δj = -4 and all the elements of s2 are negative; hence we cannot find the outgoing vector.
This indicates there is an unbounded solution. Consequently by duality theorem the
original primal problem will have no feasible solution.
147
5. Solve the given primal problem using simplex method. Hence write the solution of
its dual
Max Z = 40x1 + 50x2
Subject to
2x1 + 3x2 ≤ 3
8x1 + 4x2 ≤ 5
x1 ≥ 0, x2 ≥ 0
Solution
Primal form
Max Z = 40x1 + 50x2
Subject to
2x1 + 3x2 ≤ 3
8x1 + 4x2 ≤ 5
x1 ≥ 0, x2 ≥ 0
SLPP
Max Zx = 40x1 + 50x2 + 0s1+ 0s2
Subject to
2x1 + 3x2 + s1 = 3
8x1 + 4x2 + s2 = 5
x1, x2, s1, s2 ≥ 0
Cj → 40 50 0 0
Basic Min Ratio
CB XB X1 X2 S1 S2
Variables XB / XK
s1 0 3 2 3 1 0 1→
s2 0 5 8 4 0 1 5/4
↑
Zx = 0 -40 -50 0 0 ←Δj
x2 50 1 2/3 1 1/3 0 3/2
s2 0 1 16/3 0 -4/3 1 3/16→
↑
Zx = 50 -20/3 0 50/3 0 ←Δj
148
x2 50 7/8 0 1 1/2 -1/8
x1 40 3/16 1 0 -1/4 3/16
Exercise
150
3. Max Z = 8x1 + 6x2
Subject to
x1 - x2 ≤ 3/5
x1 - x2 ≥ 2
x1 ≥ 0, x2 ≥ 0
[Ans. Dual problem does not possess feasible solution]
Module 4
Unit 1
1.1 Introduction
1.2 Computational Procedure of Dual Simplex Method
1.3 Worked Examples
1.4 Advantage of Dual Simplex over Simplex Method
1.5 Introduction to Transportation Problem
1.6 Mathematical Formulation
1.7 Tabular Representation
1.8 Some Basic Definitions
1.1 Introduction
Any LPP for which it is possible to find infeasible but better than optimal initial basic
solution can be solved by using dual simplex method. Such a situation can be recognized
by first expressing the constraints in ‘≤’ form and the objective function in the
maximization form. After adding slack variables, if any right hand side element is
negative and the optimality condition is satisfied then the problem can be solved by dual
simplex method.
151
Negative element on the right hand side suggests that the corresponding slack variable is
negative. This means that the problem starts with optimal but infeasible basic solution
and we proceed towards its feasibility.
The dual simplex method is similar to the standard simplex method except that in the
latter the starting initial basic solution is feasible but not optimum while in the former it is
infeasible but optimum or better than optimum. The dual simplex method works towards
feasibility while simplex method works towards optimality.
Step 1 - First convert the minimization LPP into maximization form, if it is given in the
minimization form.
Step 2 - Convert the ‘≥’ type inequalities of given LPP, if any, into those of ‘≤’ type by
multiplying the corresponding constraints by -1.
Step 3 – Introduce slack variables in the constraints of the given problem and obtain an
initial basic solution.
152
Step 5 – Select the most negative XB. The corresponding basis vector then leaves the
basis set B. Let Xr be the most negative basic variable.
Step 7 – Test the new iterated dual simplex table for optimality.
Repeat the entire procedure until either an optimum feasible solution has been attained in
a finite number of steps.
Example 1
Minimize Z = 2x1 + x2
Subject to
3x1 + x2 ≥ 3
4x1 + 3x2 ≥ 6
x1 + 2x2 ≥ 3
and x1 ≥ 0, x2 ≥ 0
Solution
Maximize Z – = ׳2x1 – x2
Subject to
–3x1 – x2 ≤ –3
153
–4x1 – 3x2 ≤ –6
–x1 – 2x2 ≤ –3
x1 , x 2 ≥ 0
Maximize Z – = ׳2x1 – x2
Subject to
–3x1 – x2 + s1 = –3
–4x1 – 3x2 + s2 = –6
–x1 – 2x2 + s3 = –3
x1, x2, s1,s2, s3 ≥ 0
Cj → -2 -1 0 0 0
Basic
CB XB X1 X2 S1 S2 S3
variables
s1 0 -3 -3 -1 1 0 0
s2 0 -6 -4 -3 0 1 0 → outgoing
s3 0 -3 -1 -2 0 0 1
↑
Z = ׳0 2 1 0 0 0 ←Δj
154
Step 6 –The key element is -3. Proceed to next iteration
Cj → -2 -1 0 0 0
Basic
CB XB X1 X2 S1 S2 S3
variables
s1 0 -1 -5/3 0 1 -1/3 0 → outgoing
x2 -1 2 4/3 1 0 -1/3 0
s3 0 1 5/3 0 0 -2/3 1
↑
Z = ׳-2 2/3 0 0 1/3 0 ←Δj
Cj → -2 -1 0 0 0
Basic
CB XB X1 X2 S1 S2 S3
variables
x1 -2 3/5 1 0 -3/5 1/5 0
x2 -1 6/5 0 1 4/5 -3/5 0
s3 0 0 0 0 1 -1 1
155
Example 2
Minimize Z = 3x1 + x2
Subject to
x1 + x2 ≥ 1
2x1 + 3x2 ≥ 2
and x1 ≥ 0, x2 ≥ 0
Solution
Maximize Z – = ׳3x1 – x2
Subject to
–x1 – x2 ≤ –1
–2x1 – 3x2 ≤ –2
x1 , x 2 ≥ 0
SLPP
Maximize Z – = ׳3x1 – x2
Subject to
–x1 – x2 + s1 = –1
–2x1 – 3x2 + s2 = –2
x1, x2, s1,s2 ≥ 0
Cj → -3 -1 0 0
Basic
CB XB X1 X2 S1 S2
variables
s1 0 -1 -1 -1 1 0
s2 0 -2 -2 -3 0 1 →
↑
Z = ׳0 3 1 0 0 ←Δj
156
s1 0 -1/3 -1/3 0 1 -1/3 →
x2 -1 2/3 2/3 1 0 -1/3
↑
Z = ׳-2/3 7/3 0 0 1/3 ←Δj
s2 0 1 1 0 -3 1
x2 -1 1 1 1 -1 0
Z = ׳-1 2 0 1 0 ←Δj
Δj ≥ 0 and XB ≥ 0, therefore the optimal solution is Max Z = ׳-1, Z = 1, and x1= 0, x2 = 1
Example 3
Max Z = –2x1 – x3
Subject to
x1 + x2 – x3 ≥ 5
x1 – 2x2 + 4x3 ≥ 8
and x1 ≥ 0, x2 ≥ 0, x3 ≥ 0
Solution
Max Z = –2x1 – x3
Subject to
–x1 – x2 + x3 ≤ –5
–x1 + 2x2 – 4x3 ≤ –8
x1, x2, x3 ≥ 0
SLPP
Max Z = –2x1 – x3
Subject to
–x1 – x2 + x3 + s1 = –5
–x1 + 2x2 – 4x3 + s2 = –8
x1, x2, x3, s1, s2 ≥ 0
157
Cj → -2 0 -1 0 0
Basic
CB XB X1 X2 X3 S1 S2
variables
s1 0 -5 -1 -1 1 1 0
s2 0 -8 -1 2 -4 0 1 →
↑
Z=0 2 0 1 0 0 ←Δj
s1 0 -7 -5/4 -1/2 0 1 1/4 →
x3 -1 2 1/4 -1/2 1 0 -1/4
↑
Z = -2 7/4 1/2 0 0 1/4 ←Δj
x2 0 14 5/2 1 0 -2 -1/2
x3 -1 9 3/2 0 1 -1 -1/2
Example 4
Find the optimum solution of the given problem without using artificial variable.
Max Z = –4x1 –6x2 – 18x3
Subject to
x1 + 3x3 ≥ 3
x2 + 2x3 ≥ 5
and x1 ≥ 0, x2 ≥ 0, x3 ≥ 0
Solution
SLPP
Max Z = –4x1 –6x2 – 18x3
Subject to
–x1 – 3x3 + s1 = –3
–x2 – 2x3 + s2 = –5
x1, x2, x3, s1, s2 ≥ 0
Cj → -4 -6 -18 0 0
Basic
CB XB X1 X2 X3 S1 S2
variables
s1 0 -3 -1 0 -3 1 0
s2 0 -5 0 -1 -2 0 1 →
↑
Z=0 4 6 18 0 0 ←Δj
s1 0 -3 -1 0 -3 1 0 →
x2 -6 5 0 1 2 0 -1
↑
Z = -30 4 0 6 0 6 ←Δj
x3 -18 1 1/3 0 1 -1/3 0
x2 -6 3 -2/3 1 0 2/3 -1
Z = -36 2 0 0 2 6 ←Δj
Example 5
Min Z = 6x1 + 7x2 + 3x3 + 5x4
159
Subject to
5x1 + 6x2 - 3x3 + 4x4 ≥ 12
x2 + 5x3 - 6x4 ≥ 10
2x1 + 5x2 + x3 + x4 ≥ 8
and x1 ≥ 0, x2 ≥ 0, x3 ≥ 0, x4 ≥ 0
Solution
SLPP
Max Z' = - 6x1 - 7x2 - 3x3 - 5x4
Subject to
-5x1 - 6x2 + 3x3 - 4x4 + s1 = -12
-x2 - 5x3 + 6x4 + s2 = -10
-2x1 - 5x2 - x3 - x4 + s3 = -8
x1, x2, x3, x4, s1, s2, s3 ≥ 0
Cj → -6 -7 -3 -5 0 0 0
Basic
CB XB X1 X2 X3 X4 S1 S2 S3
variables
s1 0 -12 -5 -6 3 -4 1 0 0 →
s2 0 -10 0 -1 -5 6 0 1 0
160
s3 0 -8 -2 -5 -1 1 0 0 1
↑
Z'= 0 6 7 3 5 0 0 0
x2 -7 2 5/6 1 -1/2 2/3 -1/6 0 0
s2 0 -8 5/6 0 -11/2 20/3 -1/6 1 0 →
s3 0 2 13/6 0 -7/2 7/3 -5/6 0 1
↑
Z'= -14 1/6 0 13/2 1/3 7/6 0 0
x2 -7 30/11 25/33 1 0 2/33 -5/33 -1/11 0
x3 -3 16/11 -5/33 0 1 -40/33 1/33 -2/11 0
s3 0 78/11 18/11 0 0 -21/11 -8/11 -7/11 1
Z'= -258/11 38/33 0 0 271/33 32/33 13/11 0
The main advantage of dual simplex over the usual simplex method is that we do not
require any artificial variables in the dual simplex method. Hence a lot of labor is saved
whenever this method is applicable.
161
It can also be defined as to ship goods from various origins to various destinations in such
a manner that the transportation cost is a minimum.
The availability as well as the requirements is finite. It is assumed that the cost of
shipping is linear.
Let cij be the cost of shipping one unit from ith source to jth destination
Let xij be the amount to be shipped from ith source to jth destination
It is assumed that the total availabilities Σai satisfy the total requirements Σbj i.e.
The problem now, is to determine non-negative of xij satisfying both the availability
constraints
162
and the minimizing cost of transportation (shipping)
W→
F Capacities
W1 W2 … Wn
↓ (Availability)
F1 c11 c12 … c1n a1
F2 c21 c22 … c2n a2
. . . . . .
. . . . . .
Fm cm1 cm2 … cmn am
Required b1 b2 … bn Σai = Σbj
W→
F Capacities
W1 W2 … Wn
↓ (Availability)
F1 x11 x12 … x1n a1
F2 x21 x22 … x2n a2
. . . . . .
. . . . . .
Fm xm1 xm2 … xmn am
Required b1 b2 … bn Σai = Σbj
163
In general these two tables are combined by inserting each unit cost cij with the
corresponding amount xij in the cell (i, j). The product cij xij gives the net cost of shipping
units from the factory Fi to warehouse Wj.
Feasible Solution
A set of non-negative individual allocations (xij ≥ 0) which simultaneously
removes deficiencies is called as feasible solution.
Optimum Solution
A feasible solution is said to be optimal if it minimizes the total transportation
cost.
Exercise
Solve by dual simplex method
165
5x1 + 2x2 + x3 + 6x4 ≥ 15
and x1 ≥ 0, x2 ≥ 0, x3 ≥ 0, x4 ≥ 0
[Ans. Min Z = 215/23, x1 = 65/23, x2 = 0, x3 = 20, x4 = 0]
5. Min Z = x1 + x2
Subject to
2x1 + x2 ≥ 2
-x1 - x2 ≥ 1
and x1 ≥ 0, x2 ≥ 0
[Ans. Pseudo Optimum basic feasible solution]
Unit 2
2.1 Methods for Initial Basic Feasible Solution
2.1.1 North-West Corner Rule
2.1.2 Row Minima Method
2.1.3 Column Minima Method
166
2.1.4 Lowest Cost Entry Method (Matrix Minima Method)
2.1.5 Vogel’s Approximation Method (Unit Cost Penalty Method)
Some simple methods to obtain the initial basic feasible solution are
Step 1
The first assignment is made in the cell occupying the upper left-hand (north-
west) corner of the table.
The maximum possible amount is allocated here i.e. x11 = min (a1, b1). This value
of x11 is then entered in the cell (1,1) of the transportation table.
Step 2
i. If b1 > a1, move vertically downwards to the second row and make the second
allocation of amount x21 = min (a2, b1 - x11) in the cell (2, 1).
ii. If b1 < a1, move horizontally right side to the second column and make the second
allocation of amount x12 = min (a1 - x11, b2) in the cell (1, 2).
iii. If b1 = a1, there is tie for the second allocation. One can make a second allocation
of magnitude x12 = min (a1 - a1, b2) in the cell (1, 2) or x21 = min (a2, b1 - b1) in the
cell (2, 1)
167
Step 3
Start from the new north-west corner of the transportation table and repeat steps 1 and 2
until all the requirements are satisfied.
Find the initial basic feasible solution by using North-West Corner Rule
1. W→
F Factory
W1 W2 W3 W4
↓ Capacity
F1 19 30 50 10 7
F2 70 30 40 60 9
F3 40 8 70 20 18
Warehouse
5 8 7 14 34
Requirement
Solution
W1 W2 W3 W5 Availability
5 2
F1 7 2 0
(19) (30)
6 3
F2 9 3 0
(30) (40)
4 14
F3 18 14 0
(70) (20)
5 8 7 14
Requirement 0 6 4 0
0 0
Initial Basic Feasible Solution
x11 = 5, x12 = 2, x22 = 6, x23 = 3, x33 = 4, x34 = 14
The transportation cost is 5 (19) + 2 (30) + 6 (30) + 3 (40) + 4 (70) + 14 (20) = Rs. 1015
168
2.
D1 D2 D3 D4 Supply
O1 1 5 3 3 34
O2 3 3 1 2 15
O3 0 2 2 3 12
O4 2 7 2 4 19
Demand 21 25 17 17 80
Solution
D1 D2 D3 D4 Supply
21 13
O1 (1) (5) 34 13 0
12 3
O2 (3) (1) 15 3 0
12
O3 (2) 12 0
2 17
O4 (2) (4) 19 17
Demand 21 25 17 17
0 12 14 0
0 2
0
Initial Basic Feasible Solution
x11 = 21, x12 = 13, x22 = 12, x23 = 3, x33 = 12, x43 = 2, x44 = 17
The transportation cost is 21 (1) + 13 (5) + 12 (3) + 3 (1) + 12 (2) + 2 (2) + 17 (4) = Rs.
221
3.
From To Supply
169
2 11 10 3 7 4
1 4 7 2 1 8
3 1 4 8 12 9
Demand 3 3 4 5 6
Solution
From To Supply
3 1
(2) (11) 4 1 0
2 4 2
(4) (7) (2) 8 6 2 0
3 6
(8) (12) 9 6 0
3 3 4 5 6
Demand 0 2 0 3 0
0 0
Step 1
The smallest cost in the first row of the transportation table is determined.
Allocate as much as possible amount xij = min (a1, bj) in the cell (1, j) so that the
capacity of the origin or the destination is satisfied.
Step 2
170
If x1j = a1, so that the availability at origin O1 is completely exhausted, cross out
the first row of the table and move to second row.
If x1j = bj, so that the requirement at destination Dj is satisfied, cross out the jth
column and reconsider the first row with the remaining availability of origin O1.
If x1j = a1 = bj, the origin capacity a1 is completely exhausted as well as the
requirement at destination Dj is satisfied. An arbitrary tie-breaking choice is
made. Cross out the jth column and make the second allocation x1k = 0 in the cell
(1, k) with c1k being the new minimum cost in the first row. Cross out the first
row and move to second row.
Step 3
Repeat steps 1 and 2 for the reduced transportation table until all the requirements are
satisfied
Determine the initial basic feasible solution using Row Minima Method
1.
W1 W2 W3 W4 Availability
F1 19 30 50 10 7
F2 70 30 40 60 9
F3 40 80 70 20 18
Requirement 5 8 7 14
Solution
W1 W2 W3 W4
7
X
F1 (19) (30) (50) (10)
F2 9
(70) (30) (40) (60)
F3 (80) (70) (20) 18
171
(40)
5 8 7 7
W1 W2 W3 W4
7
X
F1 (19) (30) (50) (10)
8
F2 (70) (30) (40) (60) 1
F3 18
(40) (80) (70) (20)
5 X 7 7
W1 W2 W3 W4
7
X
F1 (19) (30) (50) (10)
8 1
X
F2 (70) (30) (40) (60)
W1 W2 W3 W4
7
X
F1 (19) (30) (50) (10)
8 1
X
F2 (70) (30) (40) (60)
5 6 7
X
F3 (40) (80) (70) (20)
172
X X X X
Initial Basic Feasible Solution
x14 = 7, x22 = 8, x23 = 1, x31 = 5, x33 = 6, x34 = 7
The transportation cost is 7 (10) + 8 (30) + 1 (40) + 5 (40) + 6 (70) + 7 (20) = Rs. 1110
2.
A B C Availability
I 50 30 220 1
II 90 45 170 4
III 250 200 50 4
Requirement 4 2 3
Solution
A B C Availability
1
I 1 0
(30)
3 1
II 4 3 0
(90) (45)
1 3
III 4 1 0
(250) (50)
Requirement 4 2 3
1 1 0
0 0
Step 1
173
Determine the smallest cost in the first column of the transportation table. Allocate x i1 =
min (ai, b1) in the cell (i, 1).
Step 2
If xi1 = b1, cross out the first column of the table and move towards right to the
second column
If xi1 = ai, cross out the ith row of the table and reconsider the first column with the
remaining demand.
If xi1 = b1= ai, cross out the ith row and make the second allocation xk1 = 0 in the
cell (k, 1) with ck1 being the new minimum cost in the first column, cross out the
column and move towards right to the second column.
Step 3
Repeat steps 1 and 2 for the reduced transportation table until all the requirements are
satisfied.
W1 W2 W3 W4 Availability
F1 19 30 50 10 7
F2 70 30 40 60 9
F3 40 80 70 20 18
Requirement 5 8 7 14
Solution
W1 W2 W3 W4
5
F1 2
(19) (30) (50) (10)
174
9
F2 (70) (30) (40) (60)
18
F3 (40) (80) (70) (20)
X 8 7 14
W1 W2 W3 W4
5 2
F1 X
(19) (30) (50) (10)
9
F2 (70) (30) (40) (60)
18
F3 (40) (80) (70) (20)
X 6 7 14
W1 W2 W3 W4
5 2
F1 X
(19) (30) (50) (10)
6
F2 3
(70) (30) (40) (60)
18
F3 (40) (80) (70) (20)
X X 7 14
W1 W2 W3 W4
5 2
F1 X
(19) (30) (50) (10)
6 3
F2 X
(70) (30) (40) (60)
175
18
F3 (40) (80) (70) (20)
X X 4 14
W1 W2 W3 W4
5 2
F1 X
(19) (30) (50) (10)
6 3
F2 X
(70) (30) (40) (60)
4
F3 14
(40) (80) (70) (20)
X X X 14
W1 W2 W3 W4
5 2
F1 X
(19) (30) (50) (10)
6 3
F2 X
(70) (30) (40) (60)
176
4 14
F3 X
(40) (80) (70) (20)
X X X X
2.
D1 D2 D3 D4 Availability
S1 11 13 17 14 250
S2 16 18 14 10 300
S3 21 24 13 10 400
Requirement 200 225 275 250
Solution
D1 D2 D3 D4
200 50
S1 250 50 0
(11) (13)
175 125
S2 300 125 0
(18) (10)
275 125
S3 400 125 0
(13) (10)
200 225 275 250
177
0 175 0 0
0
Step 2
If xij = ai, cross out the ith row of the table and decrease bj by ai. Go to step 3.
If xij = bj, cross out the jth column of the table and decrease ai by bj. Go to step 3.
If xij = ai = bj, cross out the ith row or jth column but not both.
Step 3
Repeat steps 1 and 2 for the resulting reduced transportation table until all the
requirements are satisfied. Whenever the minimum cost is not unique, make an arbitrary
choice among the minima.
Find the initial basic feasible solution using Matrix Minima method
178
1.
W1 W2 W3 W4 Availability
F1 19 30 50 10 7
F2 70 30 40 60 9
F3 40 8 70 20 18
Requirement 5 8 7 14
Solution
W1 W2 W3 W4
F1 7
(19) (30) (50) (10)
F2 9
(70) (30) (40) (60)
F3 8 10
(40) (8) (70) (20)
5 X 7 14
W1 W2 W3 W4
7
F1 X
(19) (30) (50) (10)
F2 9
(70) (30) (40) (60)
8
F3 10
(40) (8) (70) (20)
5 X 7 7
179
W1 W2 W3 W4
7
F1 X
(19) (30) (50) (10)
F2 9
(70) (30) (40) (60)
8 7
F3 3
(40) (8) (70) (20)
5 X 7 X
W1 W2 W3 W4
7
F1 X
(19) (30) (50) (10)
F2 9
(70) (30) (40) (60)
3 8 7
F3 X
(40) (8) (70) (20)
2 X 7 X
W1 W2 W3 W4
7
F1 X
(19) (30) (50) (10)
2 7
F2 X
(70) (30) (40) (60)
3 8 7
F3 X
(40) (8) (70) (20)
X X X X
Initial Basic Feasible Solution
To Availability
2 11 10 3 7 4
From 1 4 7 2 1 8
3 9 4 8 12 9
Requirement 3 3 4 5 6
Solution
To
4
4 0
(3)
3 5
8 5 0
(1) (1)
From 3 4 1 1
9 5 4 1 0
(9) (4) (8) (12)
3 3 4 5 6
0 0 0 1 1
0 0
Initial Basic Feasible Solution
x14 = 4, x21 = 3, x25 = 5, x32 = 3, x33 = 4, x34 = 1, x35 = 1
The transportation cost is 4 (3) + 3 (1) + 5(1) + 3 (9) + 4 (4) + 1 (8) + 1 (12) = Rs. 78
Step1
For each row of the table, identify the smallest and the next to smallest cost. Determine
the difference between them for each row. These are called penalties. Put them aside by
enclosing them in the parenthesis against the respective rows. Similarly compute
penalties for each column.
181
Step 2
Identify the row or column with the largest penalty. If a tie occurs then use an arbitrary
choice. Let the largest penalty corresponding to the ith row have the cost cij. Allocate the
largest possible amount xij = min (ai, bj) in the cell (i, j) and cross out either ith row or jth
column in the usual manner.
Step 3
Again compute the row and column penalties for the reduced table and then go to step 2.
Repeat the procedure until all the requirements are satisfied.
Find the initial basic feasible solution using vogel’s approximation method
1.
W1 W2 W3 W4 Availability
F1 19 30 50 10 7
F2 70 30 40 60 9
F3 40 8 70 20 18
Requirement 5 8 7 14
Solution
W1 W2 W3 W4 Availability Penalty
F1 19 30 50 10 7 19-10=9
F2 70 30 40 60 9 40-30=10
F3 40 8 70 20 18 20-8=12
Requirement 5 8 7 14
Penalty 40-19=21 30-8=22 50-40=10 20-10=10
182
W1 W2 W3 W4 Availability Penalty
F1 (19) (30) (50) (10) 7 9
F2 (70) (30) (40) (60) 9 10
F3 (40) 8(8) (70) (20) 18/10 12
Requirement 5 8/0 7 14
Penalty 21 22 10 10
W1 W2 W3 W4 Availability Penalty
F1 5(19) (30) (50) (10) 7/2 9
F2 (70) (30) (40) (60) 9 20
F3 (40) 8(8) (70) (20) 18/10 20
Requirement 5/0 X 7 14
Penalty 21 X 10 10
W1 W2 W3 W4 Availability Penalty
F1 5(19) (30) (50) (10) 7/2 40
F2 (70) (30) (40) (60) 9 20
F3 (40) 8(8) (70) 10(20) 18/10/0 50
Requirement X X 7 14/4
Penalty X X 10 10
W1 W2 W3 W4 Availability Penalty
F1 5(19) (30) (50) 2(10) 7/2/0 40
F2 (70) (30) (40) (60) 9 20
F3 (40) 8(8) (70) 10(20) X X
Requirement X X 7 14/4/2
Penalty X X 10 50
183
W1 W2 W3 W4 Availability Penalty
F1 5(19) (30) (50) 2(10) X X
F2 (70) (30) 7(40) 2(60) X X
F3 (40) 8(8) (70) 10(20) X X
Requirement X X X X
Penalty X X X X
2.
Stores Availability
I II III IV
A 21 16 15 13 11
Warehouse B 17 18 14 23 13
C 32 27 18 41 19
Requirement 6 10 12 15
Solution
Stores Availability Penalty
I II III IV
A (21) (16) (15) (13) 11 2
Warehouse B (17) (18) (14) (23) 13 3
C (32) (27) (18) (41) 19 9
Requirement 6 10 12 15
184
Penalty 4 2 1 10
185
Stores Availability Penalty
I II III IV
A (21) (16) (15) 11(13) X X
Warehouse B 6(17) 3(18) (14) 4(23) 13/9/3/0 4
C (32) (27) (18) (41) 19 9
Requirement X 10/7 12 X
Penalty X 9 4 X
186
Exercise
1. Determine an initial basic feasible solution to the following transportation
problem using north-west corner rule.
I II III IV Supply
A 13 11 15 20 2000
From B 17 14 12 13 6000
C 18 18 15 12 7000
Demand 3000 3000 4000 5000
187
[Ans. x12 = 6, x23 = 2, x24 = 6, x31 = 4, x32 = 0, x33 = 6]
4. Determine the minimum cost to the following transportation problem using
Vogel’s method.
D1 D2 D3 D4 D5 Capacity
O1 2 11 10 3 7 4
From O2 1 4 7 2 1 8
O3 3 9 4 8 12 9
Demand 3 3 4 5 6 21
5. Determine the minimum cost to the following transportation problem using matrix
minima method and vogel’s method
D1 D2 D3 D4 Capacity
O1 1 2 1 4 30
From O2 3 3 2 1 50
O3 4 2 5 9 20
Demand 20 40 30 10
188
Unit 3
Examine the initial basic feasible solution for non-degeneracy. If it is said to be non-
degenerate then it has the following two properties
Initial basic feasible solution must contain exactly m + n – 1 number of individual
allocations.
These allocations must be in independent positions
Independent Positions
189
Non-Independent Positions
Step 1
Construct the transportation table entering the origin capacities ai, the destination
requirement bj and the cost cij
Step 2
Find an initial basic feasible solution by vogel’s method or by any of the given method.
Step 3
190
For all the basic variables xij, solve the system of equations ui + vj = cij, for all i, j for
which cell (i, j) is in the basis, starting initially with some ui = 0, calculate the values of ui
and vj on the transportation table
Step 4
Compute the cost differences dij = cij – ( ui + vj ) for all the non-basic cells
Step 5
Apply optimality test by examining the sign of each dij
If all dij ≥ 0, the current basic feasible solution is optimal
If at least one dij < 0, select the variable xrs (most negative) to enter the basis.
Solution under test is not optimal if any dij is negative and further improvement is
required by repeating the above process.
Step 6
Let the variable xrs enter the basis. Allocate an unknown quantity Ө to the cell (r, s). Then
construct a loop that starts and ends at the cell (r, s) and connects some of the basic cells.
The amount Ө is added to and subtracted from the transition cells of the loop in such a
manner that the availabilities and requirements remain satisfied.
Step 7
Assign the largest possible value to the Ө in such a way that the value of at least one
basic variable becomes zero and the other basic variables remain non-negative. The basic
cell whose allocation has been made zero will leave the basis.
Step 8
Now, return to step 3 and repeat the process until an optimal solution is obtained.
191
Example 1
Find an optimal solution
W1 W2 W3 W4 Availability
F1 19 30 50 10 7
F2 70 30 40 60 9
F3 40 8 70 20 18
Requirement 5 8 7 14
Solution
1. Applying vogel’s approximation method for finding the initial basic feasible
solution
W1 W2 W3 W4 Availability Penalty
F1 5(19) (30) (50) 2(10) X X
F2 (70) (30) 7(40) 2(60) X X
F3 (40) 8(8) (70) 10(20) X X
Requirement X X X X
Penalty X X X X
Minimum transportation cost is 5 (19) + 2 (10) + 7 (40) + 2 (60) + 8 (8) + 10 (20) = Rs.
779
ui
(19) (10) u1= -10
(40) (60) u2 = 40
(8) (20) u3 = 0
vj v1 = 29 v2 = 8 v3 = 0 v4 = 20
Assign a ‘u’
value to zero. (Convenient rule is to select the ui, which has the largest number of
allocations in its row)
Let u3 = 0, then
u3 + v4= 20 which implies 0 + v4 = 20, so v4 = 20
u2 + v4= 60 which implies u2 + 20 = 60, so u2 = 40
u1 + v4= 10 which implies u1 + 20 = 10, so u1 = -10
u2 + v3= 40 which implies 40 + v3 = 40, so v3 = 0
u3 + v2= 8 which implies 0 + v2 = 8, so v2 = 8
u1 + v1= 19 which implies -10 + v1= 19, so v1 = 29
4. Calculation of cost differences for non basic cells dij = cij – ( ui + vj )
cij ui + vj
(30) (50) -2 -10
(70) (30) 69 48
(40) (70) 29 0
dij = cij – ( ui + vj )
32 60
1 -18
11 70
193
5. Optimality test
dij < 0 i.e. d22 = -18
so x22 is entering the basis
We allocate Ө to the cell (2, 2). Reallocation is done by transferring the maximum
possible amount Ө in the marked cell. The value of Ө is obtained by equating to zero to
the corners of the closed loop. i.e. min(8-Ө, 2-Ө) = 0 which gives Ө = 2. Therefore x24 is
outgoing as it becomes zero.
5 (19) 2 (10)
2 (30) 7 (40)
6 (8) 12 (20)
Minimum transportation cost is 5 (19) + 2 (10) + 2 (30) + 7 (40) + 6 (8) + 12 (20) = Rs.
743
7. Improved Solution
ui
(19) (10) u1= -10
(30) (40) u2 = 22
(8) (20) u3 = 0
194
vj v1 = 29 v2 = 8 v3 = 18 v4 = 20
cij ui + vj
(30) (50) -2 8
(70) (60) 51 42
(40) (70) 29 18
dij = cij – ( ui + vj )
32 42
19 18
11 52
Since dij > 0, an optimal solution is obtained with minimal cost Rs.743
Example 2
Solve by lowest cost entry method and obtain an optimal solution for the following
problem
Available
50 30 220 1
From 90 45 170 3
250 200 50 4
Required 4 2 2
195
Solution
By lowest cost entry method
Available
1(30) 1/0
From 2(90) 1(45) 3/2/0
2(250) 2(50) 4/2/0
Required 4/2/2 2/1/0 2/0
Minimum transportation cost is 1 (30) + 2 (90) + 1 (45) + 2 (250) + 2 (50) = Rs. 855
ui
(30) u1= -15
(90) (45) u2 = 0
(250) (50) u3 = 160
vj v1 = 90 v2 = 45 v3 = -110
cij ui + vj
50 220 75 -125
170 -110
200 205
196
dij = cij – ( ui + vj )
-25 345
280
-5
Optimality test
dij < 0 i.e. d11 = -25 is most negative
So x11 is entering the basis
1(50)
1(90) 2(45)
2(250) 2(50)
Minimum transportation cost is 1 (50) + 1 (90) + 2 (45) + 2 (250) + 2 (50) = Rs. 830
197
II Iteration
ui
(50) u1= -40
(90) (45) u2 = 0
(250) (50) u3 = 160
vj v1 = 90 v2 = 45 v3 = -110
cij ui + vj
30 220 5 -150
170 -110
200 205
dij = cij – ( ui + vj )
25 370
280
-5
Optimality test
dij < 0 i.e. d32 = -5
So x32 is entering the basis
198
2 – Ө = 0 which gives Ө = 2. Therefore x22 and x31 is outgoing as it becomes zero.
1(50)
3(90) 0(45)
2(200) 2(50)
III Iteration
ui
(50) u1= -40
(90) (45) u2 = 0
(200) (50) u3 = 155
vj v1 = 90 v2 = 45 v3 = -105
199
cij ui + vj
30 220 5 -145
170 -105
250 245
dij = cij – ( ui + vj )
25 365
275
5
Since dij > 0, an optimal solution is obtained with minimal cost Rs.820
Example 3
Is x13 = 50, x14 = 20, x21 = 55, x31 = 30, x32 = 35, x34 = 25 an optimal solution to the
transportation problem.
Available
6 1 9 3 70
From 11 5 2 8 55
10 12 4 7 90
Required 85 35 50 45
Solution
Available
From 50(9) 20(3) X
200
55(11) X
30(10) 35(12) 25(7) X
Required X X X X
ui
(9) (3) u1= -4
(11) u2 = 1
(10) (12) (7) u3 = 0
vj v1 = 10 v2 = 12 v3 = 13 v4 = 7
cij ui + vj
6 1 6 8
5 2 8 13 14 8
4 13
dij = cij – ( ui + vj )
0 -7
201
-8 -12 0
-9
Optimality test
dij < 0 i.e. d23 = -12 is most negative
So x23 is entering the basis
min(50-Ө, 55-Ө, 25-Ө) = 25 which gives Ө = 25. Therefore x34 is outgoing as it becomes
zero.
25(9) 45(3)
30(11) 25(2)
55(10) 35(12)
ui
(9) (3) u1= 8
202
(11) (2) u2 = 1
(10) (12) u3 = 0
vj v1 = 10 v2 = 12 v3 = 1 v4 = -5
cij ui + vj
6 1 18 20
5 8 13 -4
4 7 1 -5
dij = cij – ( ui + vj )
-12 -19
-8 12
3 12
Optimality test
dij < 0 i.e. d12 = -19 is most negative
So x12 is entering the basis
203
min(25-Ө, 30-Ө, 35-Ө) = 25 which gives Ө = 25. Therefore x13 is outgoing as it becomes
zero.
25(1) 45(3)
5(11) 50(2)
80(10) 10(12)
III Iteration
ui
(1) (3) u1= -11
(11) (2) u2 = 1
(10) (12) u3 = 0
vj v1 = 10 v2 = 12 v3 = 1 v4 = 14
dij = cij – ( ui + vj )
204
7 19
-8 -7
3 -7
Optimality test
dij < 0 i.e. d22 = -8 is most negative
So x22 is entering the basis
25(1) 45(3)
5(5) 50(2)
85(10) 5(12)
Minimum transportation cost is 25 (1) + 45 (3) + 5 (5) + 50 (2) + 85 (10) + 5 (12) = Rs.
1195
IV Iteration
205
ui
(1) (3) u1= -11
(5) (2) u2 = -7
(10) (12) u3 = 0
vj v1 = 10 v2 = 12 v3 = 9 v4 = 14
cij ui + vj
6 9 -1 -2
11 8 3 7
4 7 9 14
dij = cij – ( ui + vj )
7 11
8 1
-5 -7
Optimality test
dij < 0 i.e. d34 = -7 is most negative
So x34 is entering the basis
206
min(5-Ө, 45-Ө) = 5 which gives Ө = 5. Therefore x32 is outgoing as it becomes zero.
30(1) 40(3)
5(5) 50(2)
85(10) 5(7)
Minimum transportation cost is 30 (1) + 40 (3) + 5 (5) + 50 (2) + 85 (10) + 5 (7) = Rs.
1160
V Iteration
ui
(1) (3) u1= -4
(5) (2) u2 = 0
(10) (7) u3 = 0
vj v1 = 10 v2 = 5 v3 = 2 v4 = 7
cij ui + vj
6 9 6 -2
11 8 10 7
12 4 5 2
dij = cij – ( ui + vj )
0 11
1 1
207
7 2
Since dij > 0, an optimal solution is obtained with minimal cost Rs.1160. Further more d11
= 0 which indicates that alternative optimal solution also exists.
Exercise
To Supply
2 3 11 7 6
1 0 6 1 1
From
5 8 15 10 10
Demand 7 5 3 2 17
[Ans. x12 = 5, x13 = 1, x24 = 1, x31 = 7, x33 = 2, x34 = 1 Min cost = Rs 102]
2. Using North-West Corner rule for initial basic feasible solution, obtain an
optimum basic feasible solution to the following problem
To Available
7 3 4 2
From 2 1 3 3
3 4 6 5
Demand 4 1 5 10
To Supply
10 7 3 6 3
208
From 1 6 7 3 5
7 4 5 3 7
Demand 3 2 6 4
[Ans. x13 = 3, x21 = 3, x24 = 2, x32 = 2, x33 = 3, x34 = 2, Min cost = Rs 47]
Module 5
Unit 1
1.1 Introduction to Assignment Problem
1.2 Algorithm for Assignment Problem
1.3 Worked Examples
1.4 Unbalanced Assignment Problem
1.5 Maximal Assignment Problem
In assignment problems, the objective is to assign a number of jobs to the equal number
of persons at a minimum cost of maximum profit.
Suppose there are ‘n’ jobs to be performed and ‘n’ persons are available for doing these
jobs. Assume each person can do each job at a time with a varying degree of efficiency.
Let cij be the cost of ith person assigned to jth job. Then the problem is to find an
assignment so that the total cost for performing all jobs is minimum. Such problems are
known as assignment problems.
These problems may consist of assigning men to offices, classes to the rooms or
problems to the research team etc.
Mathematical formulation
Cost matrix: cij= c11 c12 c13 … c1n
c21 c22 c23 … c2n
.
209
.
Where xij denotes that jth job is to be assigned to the ith person.
Step 1
Subtract the minimum of each row of the effectiveness matrix, from all the elements of
the respective rows (Row reduced matrix).
Step 2
Further modify the resulting matrix by subtracting the minimum element of each column
from all the elements of the respective columns. Thus first modified matrix is obtained.
Step 3
210
Draw the minimum number of horizontal and vertical lines to cover all the zeroes in the
resulting matrix. Let the minimum number of lines be N. Now there may be two
possibilities
If N = n, the number of rows (columns) of the given matrix then an optimal
assignment can be made. So make the zero assignment to get the required
solution.
If N < n then proceed to step 4
Step 4
Determine the smallest element in the matrix, not covered by N lines. Subtract this
minimum element from all uncovered elements and add the same element at the
intersection of horizontal and vertical lines. Thus the second modified matrix is obtained.
Step 5
Repeat step 3 and step 4 until minimum number of lines become equal to number of rows
(columns) of the given matrix i.e. N = n.
Step 6
To make zero assignment - examine the rows successively until a row-wise exactly single
zero is found; mark this zero by ‘1’‘to make the assignment. Then, mark a ‘X’ over all
zeroes if lying in the column of the marked zero, showing that they cannot be considered
for further assignment. Continue in this manner until all the rows have been examined.
Repeat the same procedure for the columns also.
Step 7
Repeat the step 6 successively until one of the following situations arise
If no unmarked zero is left, then process ends
If there lies more than one of the unmarked zeroes in any column or row, then
mark ‘1’‘one of the unmarked zeroes arbitrarily and mark a cross in the cells of
remaining zeroes in its row and column. Repeat the process until no unmarked
zero is left in the matrix.
211
Step 8
Exactly one marked zero in each row and each column of the matrix is obtained. The
assignment corresponding to these marked zeroes will give the optimal assignment.
Example 1
A department head has four subordinates and four tasks have to be performed.
Subordinates differ in efficiency and tasks differ in their intrinsic difficulty. Time each
man would take to perform each task is given in the effectiveness matrix. How the tasks
should be allocated to each person so as to minimize the total man-hours?
Subordinates
I II III IV
Tasks A 8 26 17 11
B 13 28 4 26
C 38 19 18 15
D 19 26 24 10
Solution
I Modified Matrix
212
N = 4, n = 4
Since N = n, we move on to zero assignment
Zero assignment
Example 2
A car hire company has one car at each of five depots a, b, c, d and e. a customer requires
a car in each town namely A, B, C, D and E. Distance (kms) between depots (origins) and
towns (destinations) are given in the following distance matrix
a b c d e
A 160 130 175 190 200
B 135 120 130 160 175
C 140 110 155 170 185
D 50 50 80 80 110
E 55 35 70 80 105
213
Solution
I Modified Matrix
II Modified Matrix
N = 5, n = 5
Since N = n, we move on to zero assignment
Zero assignment
214
Minimum distance travelled = 200 + 130 + 110 + 50 + 80 = 570 kms
Example 3
Solve the assignment problem whose effectiveness matrix is given in the table
1 2 3 4
A 49 60 45 61
B 55 63 45 69
C 52 62 49 68
D 55 64 48 66
Solution
Row-Reduced Matrix
4 15 0 16
10 18 0 24
3 13 0 19
7 16 0 18
I Modified Matrix
215
N < n i.e 3 < 4, so II modified matrix
II Modified Matrix
Zero assignment
Solution - I
216
Total cost = 49 + 45 + 62 + 66 = 222 units
Solution – II
Example 4
Certain equipment needs 5 repair jobs which have to be assigned to 5 machines. The
estimated time (in hours) that a mechanic requires to complete the repair job is given in
the table. Assuming that each mechanic can be assigned only one job, determine the
minimum time assignment.
J1 J2 J3 J4 J5
M1 7 5 9 8 11
M2 9 12 7 11 10
M3 8 5 4 6 9
M4 7 3 6 9 5
M5 4 6 7 5 11
Solution
217
2 0 4 3 6
2 5 0 4 3
4 1 0 2 5
4 0 3 6 2
0 2 3 1 7
I Modified Matrix
N<n
II Modified Matrix
N=n
Zero assignment
If the number of rows and columns are not equal then such type of problems are called as
unbalanced assignment problems.
Example 1
A company has 4 machines on which to do 3 jobs. Each job can be assigned to one and
only one machine. The cost of each job on each machine is given in the following table
Machines
W X Y Z
A 18 24 28 32
Jobs
B 8 13 17 19
C 10 15 19 22
Solution
18 24 28 32
8 13 17 19
10 15 19 22
0 0 0 0
219
0 6 10 14
0 5 9 11
0 5 9 12
0 0 0 0
I Modified Matrix
II Modified Matrix
N=n
Zero assignment
220
Multiple assignments exists
Solution -I
Minimum cost = 18 + 13 + 19 = Rs 50
Solution -II
Minimum cost = 18 + 17 + 15 = Rs 50
Example 2
Solve the assignment problem whose effectiveness matrix is given in the table
R1 R2 R3 R4
C1 9 14 19 15
C2 7 17 20 19
C3 9 18 21 18
C4 10 12 18 19
221
C5 10 15 21 16
Solution
9 14 19 15 0
7 17 20 19 0
9 18 21 18 0
10 12 18 19 0
10 15 21 16 0
9 14 19 15 0
7 17 20 19 0
9 18 21 18 0
10 12 18 19 0
10 15 21 16 0
I Modified Matrix
II Modified Matrix
222
N < n i.e. 4 < 5
N=n
Zero assignment
Example 1
223
A company has 5 jobs to be done. The following matrix shows the return in terms of
rupees on assigning ith ( i = 1, 2, 3, 4, 5 ) machine to the jth job ( j = A, B, C, D, E ).
Assign the five jobs to the five machines so as to maximize the total expected profit.
Jobs
A B C D E
1 5 11 10 12 4
2 2 4 6 3 5
Machines
3 3 12 5 14 6
4 6 14 4 11 7
5 7 9 8 12 5
Solution
9 3 4 2 10
12 10 8 11 9
11 2 9 0 8
8 0 10 3 7
7 5 6 2 9
7 1 2 0 8
4 2 0 3 1
11 2 9 0 8
224
8 0 10 3 7
5 3 4 0 7
I Modified Matrix
II Modified Matrix
N=n
Zero assignment
225
Optimal assignment 1 – C 2 – E 3 – D 4 – B 5 – A
Maximum profit = 10 + 5 + 14 + 14 + 7 = Rs. 50
Exercise
Find the optimal solution for the assignment problem with the following cost matrix
I II III IV
A 5 3 1 8
B 7 9 2 6
C 6 4 5 7
226
D 5 7 7 6
The jobs A, B, C are to be assigned to three machines X, Y, Z. The processing costs (Rs.)
are as given in the matrix below. Find the allocation which will minimize the overall
processing cost.
X Y Z
A 19 28 31
B 11 17 16
C 12 15 13
[Ans. A – X, B - Y, C – Z]
A company is faced with the problem of assigning 4 machines to 6 different jobs (one
machine to one job only).the profits are estimated as follows
A B C D
1 3 6 2 6
2 7 1 4 4
3 3 8 5 8
4 6 4 3 7
227
5 5 2 4 3
6 5 7 6 4
Unit 2
228
2.5 Solving Two-Person and Zero-Sum Game
Game theory is a distinct and interdisciplinary approach to the study of human behavior.
The disciplines most involved in game theory are mathematics, economics and the other
social and behavioral sciences. Game theory (like computational theory and so many
other contributions) was founded by the great mathematician John von Neumann.
Game theory is a type of decision theory in which one’s choice of action is determined
after taking into account all possible alternatives available to an opponent playing the
same game, rather than just by the possibilities of several outcome results. Game theory
does not insist on how a game should be played but tells the procedure and principles by
which action should be selected. Thus it is a decision theory useful in competitive
situations.
Game is defined as an activity between two or more persons according to a set of rules at
the end of which each person receives some benefit or suffers loss. The set of rules
defines the game. Going through the set of rules once by the participants defines a play.
A Scientific Metaphor
Since the work of John von Neumann, "games" have been a scientific metaphor for a
much wider range of human interactions in which the outcomes depend on the interactive
strategies of two or more persons, who have opposed or at best mixed motives. Among
the issues discussed in game theory are
1) What does it mean to choose strategies "rationally" when outcomes depend on the
strategies chosen by others and when information is incomplete?
229
2) In "games" that allow mutual gain (or mutual loss) is it "rational" to cooperate to
realize the mutual gain (or avoid the mutual loss) or is it "rational" to act aggressively in
seeking individual gain regardless of mutual gain or loss?
5) Can moral rules of cooperation emerge spontaneously from the interactions of rational
egoists?
6) How does real human behavior correspond to "rational" behavior in these cases?
7) If it differs, in what direction? Are people more cooperative than would be "rational?"
More aggressive? Both?
Bankruptcy
Barbarians at the Gate
Battle of the Networks
Caveat Emptor
Conscription
Coordination
Escape and Evasion
Frogs Call for Mates
Hawk versus Dove
Mutually Assured Destruction
Majority Rule
Market Niche
Mutual Defense
230
Prisoner's Dilemma
Subsidized Small Business
Tragedy of the Commons
Ultimatum
Video System Coordination
• Games are a convenient way in which to model the strategic interactions among
economic agents.
• Many economic issues involve strategic interaction.
– Behavior in imperfectly competitive markets, e.g. Coca-Cola versus Pepsi.
– Behavior in auctions, e.g. Investment banks bidding on U.S. Treasury
bills.
– Behavior in economic negotiations, e.g. trade.
• Game theory is not limited to Economics
231
7. The player playing the game always tries to choose the best course of action
which results in optimal pay off called ‘optimal strategy’.
8. The expected pay off when all the players of the game follow their optimal
strategies is known as ‘value of the game’. The main objective of a problem of a
game is to find the value of the game.
9. The game is said to be ‘fair’ game if the value of the game is zero otherwise it s
known as ‘unfair’.
1. Competitive game
A competitive situation is called a competitive game if it has the following four
properties
1. There are finite number of competitors such that n ≥ 2. In case n = 2, it is called a
two-person game and in case n > 2, it is referred as n-person game.
2. Each player has a list of finite number of possible activities.
3. A play is said to occur when each player chooses one of his activities. The choices
are assumed to be made simultaneously i.e. no player knows the choice of the
other until he has decided on his own.
4. Every combination of activities determines an outcome which results in a gain of
payments to each player, provided each player is playing uncompromisingly to
get as much as possible. Negative gain implies the loss of same amount.
2. Strategy
The strategy of a player is the predetermined rule by which player decides his course of
action from his own list during the game. The two types of strategy are
1. Pure strategy
2. Mixed strategy
232
Pure Strategy
If a player knows exactly what the other player is going to do, a deterministic
situation is obtained and objective function is to maximize the gain. Therefore, the
pure strategy is a decision rule always to select a particular course of action.
Mixed Strategy
If a player is guessing as to which activity is to be selected by the other on any
particular occasion, a probabilistic situation is obtained and objective function is
to maximize the expected gain. Thus the mixed strategy is a selection among pure
strategies with fixed probabilities.
• In repeated games, the sequential nature of the relationship allows for the
adoption of strategies that are contingent on the actions chosen in previous plays
of the game.
• Most contingent strategies are of the type known as "trigger" strategies.
• Example trigger strategies
– In prisoners' dilemma: Initially play doesn’t confess. If your opponent
plays Confess, then play Confess in the next round. If your opponent plays
don’t confess, then play doesn’t confess in the next round. This is known
as the "tit for tat" strategy.
– In the investment game, if you are the sender: Initially play Send. Play
Send as long as the receiver plays Return. If the receiver plays keep, never
play Send again. This is known as the "grim trigger" strategy.
3. Number of persons
233
A game is called ‘n’ person game if the number of persons playing is ‘n’. The person
means an individual or a group aiming at a particular objective.
4. Number of activities
The activities may be finite or infinite.
5. Payoff
The quantitative measure of satisfaction a person gets at the end of each play is called a
payoff
6. Payoff matrix
Suppose the player A has ‘m’ activities and the player B has ‘n’ activities. Then a payoff
matrix can be formed by adopting the following rules
Row designations for each matrix are the activities available to player A
Column designations for each matrix are the activities available to player B
Cell entry Vij is the payment to player A in A’s payoff matrix when A chooses the
activity i and B chooses the activity j.
With a zero-sum, two-person game, the cell entry in the player B’s payoff matrix
will be negative of the corresponding cell entry Vij in the player A’s payoff matrix
so that sum of payoff matrices for player A and player B is ultimately zero.
234
7. Value of the game
Value of the game is the maximum guaranteed game to player A (maximizing player) if
both the players uses their best strategies. It is generally denoted by ‘V’ and it is unique.
235
Generally games are classified into
Pure strategy games
Mixed strategy games
The method for solving these two types varies. By solving a game, we need to find best
strategies for both the players and also to find the value of the game.
236
Two-person zero-sum games may be deterministic or probabilistic. The deterministic
games will have saddle points and pure strategies exist in such games. In contrast, the
probabilistic games will have no saddle points and mixed strategies are taken with the
help of probabilities.
The best strategies for player A and B will be those which correspond to the row and
column respectively through the saddle point.
Examples
Solve the payoff matrix
1.
Player B
Player A
B1 B2 B3
237
A1 2 4 5
A2 10 7 9
A3 4 5 6
Solution
Strategy of player A – A2
Strategy of player B – B2
Value of the game = 7
2.
Player B
I II III IV V
I -2 0 0 5 3
Player A II 3 2 1 2 2
III -4 -3 0 -2 6
IV 5 3 -4 2 -6
238
Solution
Strategy of player A – II
Strategy of player B - III
Value of the game = 1
3..
B1 B2 B3 B4
A1 1 7 3 4
A2 5 6 4 5
A3 7 2 0 3
Solution
239
Strategy of player A – A2
Strategy of player B – B3
Value of the game = 4
4.
B’s Strategy
B1 B2 B3 B4 B5
A1 8 10 -3 -8 -12
A’s A2 3 6 0 6 12
Strategy A3 7 5 -2 -8 17
A4 -11 12 -10 10 20
A5 -7 0 0 6 2
Solution
240
Strategy of player A – A2
Strategy of player B – B3
Value of the game = 0
5.
Solution
241
Value of the game = 4
242
Exercise
1. Explain the concept of game theory.
2. What is a rectangular game?
3. What is a saddle point?
4. Define pure and mixed strategy in a game.
5. What are the characteristics of game theory?
6. Explain two-person zero-sum game giving suitable examples.
7. What are the limitations of game theory?
8. Explain the following terms
a. Competitive Game
b. Strategy
c. Value of the game
d. Pay-off-matrix
e. Optimal strategy
9. Explain Maximin and Minimax used in game theory
10. For the game with payoff matrix
Determine the best strategies for player A and B and also the value of the game.
243
Unit 3
3.1 Games with Mixed Strategies
3.1.1 Analytical Method
3.1.2 Graphical Method
3.1.3 Simplex Method
In certain cases, no pure strategy solutions exist for the game. In other words, saddle
point does not exist. In all such game, both players may adopt an optimal blend of the
strategies called Mixed Strategy to find a saddle point. The optimal mix for each player
may be determined by assigning each strategy a probability of it being chosen. Thus these
mixed strategies are probabilistic combinations of available better strategies and these
games hence called Probabilistic games.
The probabilistic mixed strategy games without saddle points are commonly solved by
any of the following methods
Sl.
Method Applicable to
No.
1 Analytical Method 2x2 games
2 Graphical Method 2x2, mx2 and 2xn games
3 Simplex Method 2x2, mx2, 2xn and mxn games
A 2 x 2 payoff matrix where there is no saddle point can be solved by analytical method.
Given the matrix
244
Value of the game is
Find the difference of two numbers in column 1 and enter the resultant under
column 2. Neglect the negative sign if it occurs.
Find the difference of two numbers in column 2 and enter the resultant under
column 1. Neglect the negative sign if it occurs.
Repeat the same procedure for the two rows.
1. Solve
Solution
It is a 2 x 2 matrix and no saddle point exists. We can solve by analytical method
245
V = 17 / 5
SA = (x1, x2) = (1/5, 4 /5)
SB = (y1, y2) = (3/5, 2 /5)
Solution
V=-1/4
SA = (x1, x2) = (1/4, 3 /4)
SB = (y1, y2) = (1/4, 3 /4)
The graphical method is used to solve the games whose payoff matrix has
246
Two rows and n columns (2 x n)
m rows and two columns (m x 2)
Draw two vertical axes 1 unit apart. The two lines are x1 = 0, x1 = 1
Take the points of the first row in the payoff matrix on the vertical line x1 = 1 and
the points of the second row in the payoff matrix on the vertical line x1 = 0.
The point a1j on axis x1 = 1 is then joined to the point a2j on the axis x1 = 0 to give
a straight line. Draw ‘n’ straight lines for j=1, 2… n and determine the highest
point of the lower envelope obtained. This will be the maximin point.
The two or more lines passing through the maximin point determines the required
2 x 2 payoff matrix. This in turn gives the optimum solution by making use of
analytical method.
Example 1
Solve by graphical method
Solution
247
V = 66/13
SA = (4/13, 9 /13)
SB = (0, 10/13, 3 /13)
Example 2
Solution
248
V = 8/7
SA = (3/7, 4 /7)
SB = (2/7, 0, 5 /7)
Draw two vertical axes 1 unit apart. The two lines are x1 =0, x1 = 1
Take the points of the first row in the payoff matrix on the vertical line x1 = 1 and
the points of the second row in the payoff matrix on the vertical line x1 = 0.
The point a1j on axis x1 = 1 is then joined to the point a2j on the axis x1 = 0 to give
a straight line. Draw ‘n’ straight lines for j=1, 2… n and determine the lowest
point of the upper envelope obtained. This will be the minimax point.
249
The two or more lines passing through the minimax point determines the required
2 x 2 payoff matrix. This in turn gives the optimum solution by making use of
analytical method.
Example 1
Solve by graphical method
Solution
250
V = 3/9 = 1/3
SA = (0, 5 /9, 4/9, 0)
SB = (3/9, 6 /9)
Example 2
Solution
251
V = 73/17
SA = (0, 16/17, 1/17, 0, 0)
SB = (5/17, 12 /17)
252
3.1.3 Simplex Method
As per the assumptions, A always attempts to choose the set of strategies with the non-
zero probabilities say p1, p2, p3 where p1 + p2 + p3 = 1 that maximizes his minimum
expected gain.
Similarly B would choose the set of strategies with the non-zero probabilities say q1, q2,
q3 where q1 + q2 + q3 = 1 that minimizes his maximum expected loss.
Step 1
Find the minimax and maximin value from the given matrix
Step 2
The objective of A is to maximize the value, which is equivalent to minimizing the value
1/V. The LPP is written as
Min 1/V = p1/V + p2/V + p3/V
and constraints ≥ 1
It is written as
Min 1/V = x1 + x2 + x3
and constraints ≥ 1
Similarly for B, we get the LPP as the dual of the above LPP
Max 1/V = Y1 + Y2 + Y3
and constraints ≤ 1
253
Where Y1 = q1/V, Y2 = q2/V, Y3 = q3/V
Step 3
Solve the LPP by using simplex table and obtain the best strategy for the players
Example 1
Solve by Simplex method
Solution
We can infer that 2 ≤ V ≤ 3. Hence it can be concluded that the value of the game lies
between 2 and 3 and the V > 0.
LPP
Max 1/V = Y1 + Y2 + Y3
Subject to
3Y1 – 2Y2 + 4Y3 ≤ 1
-1Y1 + 4Y2 + 2Y3 ≤ 1
2Y1 + 2Y2 + 6Y3 ≤ 1
Y1, Y2, Y3 ≥ 0
254
SLPP
Max 1/V = Y1 + Y2 + Y3 + 0s1 + 0s2 + 0s3
Subject to
3Y1 – 2Y2 + 4Y3 + s1 = 1
-1Y1 + 4Y2 + 2Y3 + s2 =1
2Y1 + 2Y2 + 6Y3 + s3 = 1
Y1, Y2, Y3, s1, s2, s3 ≥ 0
Cj→ 1 1 1 0 0 0
Basic Min Ratio
CB YB Y1 Y2 Y3 S1 S2 S3
Variables YB / YK
S1 0 1 3 -2 4 1 0 0 1/3→
S2 0 1 -1 4 2 0 1 0 -
S3 0 1 2 2 6 0 0 1 1/2
↑
1/V = 0 -1 -1 -1 0 0 0
Y1 1 1/3 1 -2/3 4/3 1/3 0 0 -
S2 0 4/3 0 10/3 10/3 1/3 1 0 2/5
S3 0 1/3 0 10/3 10/3 -2/3 0 1 1/10→
↑
1/V =1/3 0 -5/3 1/3 1/3 0 0
Y1 1 2/5 1 0 2 1/5 0 1/5
S2 0 1 0 0 0 1 1 -1
Y2 1 1/10 0 1 1 -1/5 0 3/10
255
y1 = 2/5 * 2 = 4/5
y2 = 1/10 * 2 = 1/5
y3 = 0 * 2 = 0
x1 = 0*2 = 0
x2 = 0*2 = 0
x3 = 1/2*2 = 1
SA = (0, 0, 1)
SB = (4/5, 1/5, 0)
Value = 2
Example 2
Solution
Maximin = -1
Minimax = 1
256
Since maximin value is -1, it is possible that value of the game may be negative or zero,
thus the constant ‘C’ is added to all the elements of matrix which is at least equal to the
negative of maximin.
Let C = 1, add this value to all the elements of the matrix. The resultant matrix is
LPP
Max 1/V = Y1 + Y2 + Y3
Subject to
2Y1 + 0Y2 + 0Y3 ≤ 1
0Y1 + 0Y2 + 4Y3 ≤ 1
0Y1 + 3Y2 + 0Y3 ≤ 1
Y1, Y2, Y3 ≥ 0
SLPP
Max 1/V = Y1 + Y2 + Y3 + 0s1 + 0s2 + 0s3
Subject to
2Y1 + 0Y2 + 0Y3 + s1 = 1
0Y1 + 0Y2 + 4Y3 + s2 = 1
0Y1 + 3Y2 + 0Y3 + s3 = 1
Y1, Y2, Y3, s1, s2, s3 ≥ 0
257
Cj→ 1 1 1 0 0 0
Basic Min Ratio
CB YB Y1 Y2 Y3 S1 S2 S3
Variables YB / YK
S1 0 1 2 0 0 1 0 0 1/2→
S2 0 1 0 0 4 0 1 0 -
S3 0 1 0 3 0 0 0 1 -
↑
1/V =0 -1 -1 -1 0 0 0
Y1 1 1/2 1 0 0 1/2 0 0 -
S2 0 1 0 0 4 0 1 0 -
S3 0 1 0 3 0 0 0 1 1/3→
↑
1/V =1/2 0 -1 -1 1/2 0 0
Y1 1 1/2 1 0 0 1/2 0 0 -
S2 0 1 0 0 4 0 1 0 1/4→
Y2 1 1/3 0 1 0 0 0 1/3 -
↑
1/V = 5/6 0 0 -1 1/2 0 1/3
Y1 1 1/2 1 0 0 1/2 0 0
Y3 1 1/4 0 0 1 0 1/4 0
Y2 1 1/3 0 1 0 0 0 1/3
1/V =13/12
V = 12/13
258
y2 = 1/3 * 12/13 = 4/13
y3 = 1/4 * 12/13 = 3/13
x1 = 1/2*12/13 = 6/13
x2 = 1/4 * 12/13 = 3/13
x3 = 1/3 * 12/13 = 4/13
Exercise
1. Explain the method of solving a problem with mixed strategy using algebraic method.
2.
259
3. Use simplex to solve the following
1.
2.
4. Two companies A and B are competing for the same product. Their different strategies
are given in the following pay off matrix
Module 6
Unit 1
1.1 Shortest Route Problem
1.2 Minimal Spanning Tree Problem
260
1.3 Maximal Flow Problem
The criterion of this method is to find the shortest distance between two nodes with
minimal cost.
Example 1
Find the shortest path
Solution
Solved
nodes Closest
nth
directly connected Total distance Minimum Last
n nearest
connected to unsolved involved distance connection
node
unsolved node
nodes
1 a c 7 c 7 a-c
a b 13 b 13 a-b
2
c e 7+6 =13 e 13 c-e
b d 13+5 =18 d 18 b-d
3 c f 7+11 =18 f 18 c-f
e h 13+8 =21 - - -
4 e h 13+8 =21 h 21 e-h
261
d g 18+9 =27 - - -
f h 18+5 =23 - - -
e g 13+10 =23 g 23 e-g
5 h i 21+10 =31 - - -
d g 18+9 =27 - - -
g i 23+6 =29 i 29 g-i
6
h i 21+10 =31 - - -
Example 2
262
Solution
Solved nodes
Closest
directly Total
connected nth nearest Minimum Last
n connected to distance
unsolved node distance connection
unsolved involved
node
nodes
1 1 3 1 3 1 1-3
1 2 5 - - -
2
3 2 1+2 =3 2 3 3-2
2 5 3+1 =4 5 4 2-5
3
3 4 1+6 =7 - - -
2 6 3+6 =9 - - -
4 3 4 1+6 =7 4 7 3-4
5 4 4+3 =7 4 7 5-4
2 6 3+6 =9 6 9 2-6
5 4 6 7+4 =11 - - -
5 6 4+5 =9 6 9 5-6
4 7 7+6 =13 - - -
6 5 7 4+9 =13 - - -
6 7 9+2 =11 7 11 6-7
263
1 →3 → 2 → 6 →7
Total distance is 11 units
1 → 3 → 2 →5 → 6 →7
Total distance = 11 units
264
Prim’s Algorithm
It starts at any vertex (say A) in a graph and finds the least cost vertex (say B)
connected to the start vertex.
Now either from A or B, it will find the next least costly vertex connection,
without creating cycle (say C)
Now either from A, B or C find the next least costly vertex connection, without
creating a cycle and so on.
Eventually all the vertices will be connected without any cycles and a minimum
spanning tree will be the result.
Example 1
Suppose it is desired to establish a cable communication network that links major cities,
which is shown in the figure. Determine how the cities are connected such that the total
cable mileage is minimized.
Solution
265
C = {LA, SE, DE} C' = {DA, EH, NY, DC}
C = {LA, SE, DE, DA} C' = {EH, NY, DC}
C = {LA, SE, DE, DA, EH} C' = {NY, DC}
C = {LA, SE, DE, DA, EH, NY} C' = {DC}
C = {LA, SE, DE, DA, EH, NY, DC} C' = { }
Thus the total cable mileage is 1100 + 1300 + 780 + 900 + 800 + 200 = 5080
Example 2
For the following graph obtain the minimum spanning tree. The numbers on the branches
represent the cost.
Solution
266
C = {A} C' = {B, C, D, E, F, G}
C = {A, D} C' = {B, C, E, F, G}
C = {A, D, B} C' = {C, E, F, G}
C = {A, D, B, C} C' = {E, F, G}
C = {A, D, B, C, G} C' = {E, F}
C = {A, D, B, C, G, F} C' = {E}
C = {A, D, B, C, G, F, E} C' = { }
Cost = 2 + 1 + 4 + 3 + 3 + 5 = 18 units
Example 3
Solve the minimum spanning problem for the given network. The numbers on the
branches represent in terms of miles.
267
Solution
1 + 4 + 5+ 3 + 3 = 16 miles
Algorithm
268
Step1
Find a path from source to sink that can accommodate a positive flow of material. If no
path exists go to step 5
Step2
Determine the maximum flow that can be shipped from this path and denote by ‘k’ units.
Step3
Decrease the direct capacity (the capacity in the direction of flow of k units) of each
branch of this path ‘k’ and increase the reverse capacity k1. Add ‘k’ units to the amount
delivered to sink.
Step4
Goto step1
Step5
The maximal flow is the amount of material delivered to the sink. The optimal shipping
schedule is determined by comparing the original network with the final network. Any
reduction in capacity signifies shipment.
Example 1
Consider the following network and determine the amount of flow between the networks.
269
Solution
Iteration 1: 1 – 3 – 5
Iteration 2: 1 – 2 – 3 – 4 – 5
270
Iteration 3: 1 – 4 – 5
Iteration 4: 1 – 2 – 5
271
Iteration 5: 1 – 3 – 2 – 5
272
Example 2
Solve the maximal flow problem
Solution
Iteration 1: O – A – D – T
Iteration 2: O – B – E – T
273
Iteration 3: O – A – B – D – T
Iteration 4: O – C – E – D – T
Iteration 5: O – C – E – T
274
Iteration 6: O – B – D – T
Therefore there are no more augmenting paths. So the current flow pattern is optimal.
The maximum flow is 13 units.
275
Exercise
1. Find the shortest path
276
Unit 2
2.1 Introduction to CPM / PERT Techniques
2.2 Applications of CPM / PERT
2.3 Basic Steps in PERT / CPM
2.4 Frame work of PERT/CPM
2.5 Network Diagram Representation
2.6 Rules for Drawing Network Diagrams
2.7 Common Errors in Drawing Networks
2.8 Advantages and Disadvantages
2.9 Critical Path in Network Analysis
CPM (Critical Path Method) was the discovery of M.R.Walker of E.I.Du Pont de
Nemours & Co. and J.E.Kelly of Remington Rand, circa 1957. The computation was
designed for the UNIVAC-I computer. The first test was made in 1958, when CPM was
applied to the construction of a new chemical plant. In March 1959, the method was
applied to maintenance shut-down at the Du Pont works in Louisville, Kentucky.
Unproductive time was reduced from 125 to 93 hours.
277
PERT (Project Evaluation and Review Technique) was devised in 1958 for the
POLARIS missile program by the Program Evaluation Branch of the Special Projects
office of the U.S.Navy, helped by the Lockheed Missile Systems division and the
Consultant firm of Booz-Allen & Hamilton. The calculations were so arranged so that
they could be carried out on the IBM Naval Ordinance Research Computer (NORC) at
Dahlgren, Virginia.
The methods are essentially network-oriented techniques using the same principle.
PERT and CPM are basically time-oriented methods in the sense that they both lead to
determination of a time schedule for the project. The significant difference between two
approaches is that the time estimates for the different activities in CPM were assumed to
be deterministic while in PERT these are described probabilistically. These techniques
are referred as project scheduling techniques.
USED IN: Production management - for the jobs of repetitive in nature where the
activity time estimates can be predicted with considerable certainty due to the existence
of past experience.
278
USED IN: Project management - for non-repetitive jobs (research and development
work), where the time and cost estimates tend to be quite uncertain. This technique uses
probabilistic time estimates.
Benefits of PERT/CPM
Mathematically simple
Limitations of PERT/CPM
These methods have been applied to a wide variety of problems in industries and have
found acceptance even in government organizations. These include
Construction of a dam or a canal system in a region
Construction of a building or highway
Maintenance or overhaul of airplanes or oil refinery
Space flight
Cost control of a project using PERT / COST
Designing a prototype of a machine
Development of supersonic planes
279
2.3 Basic Steps in PERT / CPM
1. Planning
The planning phase is started by splitting the total project in to small projects.
These smaller projects in turn are divided into activities and are analyzed by the
department or section.
The relationship of each activity with respect to other activities are defined and
established and the corresponding responsibilities and the authority are also
stated.
Thus the possibility of overlooking any task necessary for the completion of the
project is reduced substantially.
2. Scheduling
The ultimate objective of the scheduling phase is to prepare a time chart showing
the start and finish times for each activity as well as its relationship to other
activities of the project.
Moreover the schedule must pinpoint the critical path activities which require
special attention if the project is to be completed in time.
For non-critical activities, the schedule must show the amount of slack or float
times which can be used advantageously when such activities are delayed or when
limited resources are to be utilized effectively.
3. Allocation of resources
Allocation of resources is performed to achieve the desired objective. A resource
is a physical variable such as labour, finance, equipment and space which will
impose a limitation on time for the project.
280
When resources are limited and conflicting, demands are made for the same type
of resources a systematic method for allocation of resources become essential.
Resource allocation usually incurs a compromise and the choice of this
compromise depends on the judgment of managers.
4. Controlling
The final phase in project management is controlling. Critical path methods
facilitate the application of the principle of management by expectation to identify
areas that are critical to the completion of the project.
By having progress reports from time to time and updating the network
continuously, a better financial as well as technical control over the project is
exercised.
Arrow diagrams and time charts are used for making periodic progress reports. If
required, a new course of action is determined for the remaining portion of the
project.
Essentially, there are six steps which are common to both the techniques. The procedure
is listed below:
I. Define the Project and all of its significant activities or tasks. The Project (made
up of several tasks) should have only a single start activity and a single finish
activity.
II. Develop the relationships among the activities. Decide which activities must
precede and which must follow others.
281
III. Draw the "Network" connecting all the activities. Each Activity should have
unique event numbers. Dummy arrows are used where required to avoid giving
the same numbering to two activities.
V. Compute the longest time path through the network. This is called the critical
path.
VI. Use the Network to help plan, schedule, and monitor and control the project.
The Key Concept used by CPM/PERT is that a small set of activities, which make up the
longest path through the activity network control the entire project. If these "critical"
activities could be identified and assigned to responsible persons, management resources
could be optimally used by concentrating on the few activities which determine the fate
of the entire project.
Non-critical activities can be replanned, rescheduled and resources for them can be
reallocated flexibly, without affecting the whole project.
1. Activity
282
Any individual operation which utilizes resources and has an end and a beginning is
called activity. An arrow is commonly used to represent an activity with its head
indicating the direction of progress in the project. These are classified into four categories
1. Predecessor activity – Activities that must be completed immediately prior to the
start of another activity are called predecessor activities.
2. Successor activity – Activities that cannot be started until one or more of other
activities are completed but immediately succeed them are called successor
activities.
3. Concurrent activity – Activities which can be accomplished concurrently are
known as concurrent activities. It may be noted that an activity can be a
predecessor or a successor to an event or it may be concurrent with one or more of
other activities.
4. Dummy activity – An activity which does not consume any kind of resource but
merely depicts the technological dependence is called a dummy activity.
The dummy activity is inserted in the network to clarify the activity pattern in the
following two situations
To make activities with common starting and finishing points distinguishable
To identify and maintain the proper precedence relationship between activities
that is not connected by events.
For example, consider a situation where A and B are concurrent activities. C is dependent
on A and D is dependent on A and B both. Such a situation can be handled by using a
dummy activity as shown in the figure.
2. Event
283
An event represents a point in time signifying the completion of some activities and the
beginning of new ones. This is usually represented by a circle in a network which is also
called a node or connector.
The events are classified in to three categories
1. Merge event – When more than one activity comes and joins an event such an
event is known as merge event.
2. Burst event – When more than one activity leaves an event such an event is
known as burst event.
3. Merge and Burst event – An activity may be merge and burst event at the same
time as with respect to some activities it can be a merge event and with respect to
some other activities it may be a burst event.
3. Sequencing
The first prerequisite in the development of network is to maintain the precedence
relationships. In order to make a network, the following points should be taken into
considerations
What job or jobs precede it?
What job or jobs could run concurrently?
What job or jobs follow it?
What controls the start and finish of a job?
Since all further calculations are based on the network, it is necessary that a network be
drawn with full care.
2.6 Rules for Drawing Network Diagram
Rule 1
284
Each activity is represented by one and only one arrow in the network
Rule 2
No two activities can be identified by the same end events
Rule 3
In order to ensure the correct precedence relationship in the arrow diagram, following
questions must be checked whenever any activity is added to the network
What activity must be completed immediately before this activity can start?
What activities must follow this activity?
What activities must occur simultaneously with this activity?
In case of large network, it is essential that certain good habits be practiced to draw an
easy to follow network
Try to avoid arrows which cross each other
Use straight arrows
Do not attempt to represent duration of activity by its arrow length
Use arrows from left to right. Avoid mixing two directions, vertical and standing
arrows may be used if necessary.
Use dummies freely in rough draft but final network should not have any
redundant dummies.
285
The network has only one entry point called start event and one point of
emergence called the end event.
The three types of errors are most commonly observed in drawing network diagrams
1. Dangling
To disconnect an activity before the completion of all activities in a network diagram is
known as dangling. As shown in the figure activities (5 – 10) and (6 – 7) are not the last
activities in the network. So the diagram is wrong and indicates the error of dangling
2. Looping or Cycling
Looping error is also known as cycling error in a network diagram. Drawing an endless
loop in a network is known as error of looping as shown in the following figure.
286
3. Redundancy
Unnecessarily inserting the dummy activity in network logic is known as the error of
redundancy as shown in the following diagram
PERT/CPM facilitates identification of the critical path and makes this visible,
PERT/CPM facilitates identification of early start, late start, and slack for each
activity,
The network charts tend to be large and unwieldy requiring several pages to print
and requiring special size paper,
287
When the PERT/CPM charts become unwieldy, they are no longer used to
manage the project.
Step 1
The computation begins from the start node and move towards the end node. For
easiness, the forward pass computation starts by assuming the earliest occurrence
time of zero for the initial project event.
Step 2
i. Earliest starting time of activity (i, j) is the earliest event time of the tail
end event i.e. (Es)ij = Ei
288
ii. Earliest finish time of activity (i, j) is the earliest starting time + the
activity time i.e. (Ef)ij = (Es)ij + Dij or (Ef)ij = Ei + Dij
iii. Earliest event time for event j is the maximum of the earliest finish times
of all activities ending in to that event i.e. Ej = max [(Ef)ij for all
immediate predecessor of (i, j)] or Ej =max [Ei + Dij]
Step 1
For ending event assume E = L. Remember that all E’s have been computed by
forward pass computations.
Step 2
Latest finish time for activity (i, j) is equal to the latest event time of event j i.e.
(Lf)ij = Lj
Step 3
Latest starting time of activity (i, j) = the latest completion time of (i, j) – the
activity time or (Ls)ij =(Lf)ij - Dij or (Ls)ij = Lj - Dij
Step 4
Latest event time for event ‘i’ is the minimum of the latest start time of all
activities originating from that event i.e. Li = min [(Ls)ij for all immediate
successor of (i, j)] = min [(Lf)ij - Dij] = min [Lj - Dij]
289
Total float – The amount of time by which the completion of an activity could be
delayed beyond the earliest expected completion time without affecting the
overall project duration time.
Mathematically
(Tf)ij = (Latest start – Earliest start) for activity ( i – j)
(Tf)ij = (Ls)ij - (Es)ij or (Tf)ij = (Lj - Dij) - Ei
Free float – The time by which the completion of an activity can be delayed
beyond the earliest finish time without affecting the earliest start of a subsequent
activity.
Mathematically
(Ff)ij = (Earliest time for event j – Earliest time for event i) – Activity time for ( i,
j)
(Ff)ij = (Ej - Ei) - Dij
Independent float – The amount of time by which the start of an activity can be
delayed without effecting the earliest start time of any immediately following
activities, assuming that the preceding activity has finished at its latest finish time.
Mathematically
(If)ij = (Ej - Li) - Dij
The negative independent float is always taken as zero.
Event slack - It is defined as the difference between the latest event and earliest
event times.
Mathematically
Head event slack = Lj – Ej, Tail event slack = Li - Ei
290
Critical event – The events with zero slack times are called critical events. In
other words the event i is said to be critical if Ei = Li
Critical activity – The activities with zero total float are known as critical
activities. In other words an activity is said to be critical if a delay in its start will
cause a further delay in the completion date of the entire project.
291
Exercise
1. What is PERT and CPM?
a. Earliest time
b. Latest time
d. Event slack
e. Critical path
6. What are the rules for drawing network diagram? Also mention the common
errors that occur in drawing networks.
292
Unit 3
3.1 Worked Examples on CPM
3.2 PERT
3.3 Worked Examples
Example 1
Determine the early start and late start in respect of all node points and identify critical
path for the following network.
Solution
Calculation of E and L for each node is shown in the network
293
Normal Earliest Time Latest Time
Activity(i, Float Time
Time Start Finish Start Finish
j) (Li - Dij ) - Ei
(Dij) (Ei) (Ei + Dij ) (Li - Dij ) (Li)
(1, 2) 10 0 10 0 10 0
(1, 3) 8 0 8 1 9 1
(1, 4) 9 0 9 1 10 1
(2, 5) 8 10 18 10 18 0
(4, 6) 7 9 16 10 17 1
(3, 7) 16 8 24 9 25 1
(5, 7) 7 18 25 18 25 0
(6, 7) 7 16 23 18 25 2
(5, 8) 6 18 24 18 24 0
(6, 9) 5 16 21 17 22 1
(7, 10) 12 25 37 25 37 0
(8, 10) 13 24 37 24 37 0
(9, 10) 15 21 36 22 37 1
Network Analysis Table
From the table, the critical nodes are (1, 2), (2, 5), (5, 7), (5, 8), (7, 10) and (8, 10)
Example 2
Find the critical path and calculate the slack time for the following network
Solution
The earliest time and the latest time are obtained below
295
(8, 9) 3 11 14 12 15 1
From the above table, the critical nodes are the activities (1, 3), (3, 5) and (5, 9)
Example 3
A project has the following times schedule
296
2. Float for each activity
3. Critical path and its duration
Solution
The network is
Event No.: 1 2 3 4 5 6 7 8 9 10
TE: 0 4 1 5 7 11 15 17 18 25
TL: 0 12 1 13 7 16 15 17 18 25
297
(6 – 8) 1 11 17 5
(7 – 8) 2 15 17 0
(8 – 9) 1 17 18 0
(8 – 10) 8 17 25 0
(9 – 10) 7 18 25 0
The main objective in the analysis through PERT is to find out the completion for a
particular event within specified date. The PERT approach takes into account the
uncertainties. The three time values are associated with each activity
1. Optimistic time – It is the shortest possible time in which the activity can be
finished. It assumes that every thing goes very well. This is denoted by t0.
298
2. Most likely time – It is the estimate of the normal time the activity would take.
This assumes normal delays. If a graph is plotted in the time of completion and
the frequency of completion in that time period, then most likely time will
represent the highest frequency of occurrence. This is denoted by tm.
3. Pessimistic time – It represents the longest time the activity could take if
everything goes wrong. As in optimistic estimate, this value may be such that
only one in hundred or one in twenty will take time longer than this value. This is
denoted by tp.
In PERT calculation, all values are used to obtain the percent expected value.
299
Task: A B C D E F G H I J K
Least time: 4 5 8 2 4 6 8 5 3 5 6
Greatest time: 8 10 12 7 10 15 16 9 7 11 13
Find the earliest and latest expected time to each event and also critical path in the
network.
Solution
300
C 10.67 5.33 5.33 16 16 0
D 3.5 0 10 3.5 13.5 10
E 7 16 16 23 23 0
F 9.5 3.5 13.5 13 23 10
G 12 3.5 18.5 15.5 30.5 15
H 6.33 23 23 29.33 29.33 0
I 5 23 25.5 28 30.5 2.5
J 8 28 30.5 36 38.5 2.5
K 9.17 29.33 29.33 31.5 38.5 0
The network is
Example 2
A project has the following characteristics
301
(2 – 3) 1 3 2
(2 – 4) 1 5 3
(3 – 5) 3 5 4
(4 – 5) 2 4 3
(4 – 6) 3 7 5
(5 – 7) 4 6 5
(6 – 7) 6 8 7
(7 – 8) 2 6 4
(7 – 9) 5 8 6
(8 – 10) 1 3 2
(9 – 10) 3 7 5
Construct a PERT network. Find the critical path and variance for each event.
Solution
te v
Activity (a) (b) (m) (4m)
(a + b + 4m)/6 [(b – a) / 6]2
(1 – 2) 1 5 1.5 6 2 4/9
(2 – 3) 1 3 2 8 2 1/9
(2 – 4) 1 5 3 12 3 4/9
(3 – 5) 3 5 4 16 4 1/9
(4 – 5) 2 4 3 12 3 1/9
(4 – 6) 3 7 5 20 5 4/9
(5 – 7) 4 6 5 20 5 1/9
(6 – 7) 6 8 7 28 7 1/9
(7 – 8) 2 6 4 16 4 4/9
(7 – 9) 5 8 6 24 6.17 1/4
(8 – 10) 1 3 2 8 2 1/9
(9 – 10) 3 7 5 20 5 4/9
Example 3
Calculate the variance and the expected time for each activity
Solution
te v
Activity (to) (tm) (tp)
(to + tp + 4tm)/6 [(tp – to) / 6]2
(1 – 2) 3 6 10 6.2 1.36
(1 – 3) 6 7 12 7.7 1.00
(1 – 4) 7 9 12 9.2 0.69
(2 – 3) 0 0 0 0.0 0.00
303
(2 – 5) 8 12 17 12.2 2.25
(3 – 6) 10 12 15 12.2 0.69
(4 – 7) 8 13 19 13.2 3.36
(5 – 8) 12 14 15 13.9 0.25
(6 – 7) 8 9 10 9.0 0.11
(6 – 9) 13 16 19 16.0 1.00
(8 – 9) 4 7 10 7.0 1.00
(7 – 10) 10 13 17 13.2 1.36
(9 – 11) 6 8 12 8.4 1.00
(10 – 11) 10 12 14 12.0 0.66
Example 4
A project is represented by the network as shown below and has the following data
Task: A B C D E F G H I
Least time: 5 18 26 16 15 6 7 7 3
Greatest time: 10 22 40 20 25 12 12 9 5
304
Most likely time: 15 20 33 18 20 9 10 8 4
Solution
1.
2.
305
Earliest time
E1 = 0
E2 = 0 +7.8 = 7.8
E3 = 0 +20 = 20
E4 = 0 +33 = 33
E5 = 7.8 + 18 = 25.8
Latest time
L7 = 42.8
L6 = 42.8 – 4 = 38.8
L5 = 42.8 – 8 = 34.3
L4 = 42.8 – 9.8 = 33
L3 = 38.8 – 9 = 29.8
Exercise
1. What is PERT?
2. For the following data, draw network. Find the critical path, slack time after
calculating the earliest expected time and the latest allowable time
306
Activity Duration Activity Duration
(1 – 2) 5 (5 – 9) 3
(1 – 3) 8 (6 – 10) 5
(2 – 4) 6 (7 – 10) 4
(2 – 5) 4 (8 – 11) 9
(2 – 6) 4 (9 – 12) 2
(3– 7) 5 (10 – 12) 4
(3 – 8) 3 (11 – 13) 1
(4 – 9) 1 (12 – 13) 7
Activity Most optimistic time Most likely time Most pessimistic time
(1 – 2) 1 2 3
(2 – 3) 1 2 3
(2 – 4) 1 3 5
(3 – 5) 3 4 5
(4 – 5) 2 5 4
(4 – 6) 3 5 7
(5 – 7) 4 5 6
(6 – 7) 6 7 8
(7 – 8) 2 4 6
(7 – 9) 4 6 8
(8 – 10) 1 2 3
(9 – 10) 3 5 7
307
Construct a PERT network and find out
c. Slack values
d. Critical path
a. optimistic time
c. Pessimistic time
d. Expected time
e. Variance
5. Calculate the variance and the expected time for each activity
308