Or Notes
Or Notes
ON
OPERATION RESEARCH
2018 – 2019
If the original problem is in the standard form then the dual problem can be formulated using the
following rules:
The number of constraints in the original problem is equal to the number of dual variables. The
number of constraints in the dual problem is equal to the number of variables in the original
problem.
The original problem profit coefficients appear on the right hand side of the dual problem
constraints.
If the original problem is a maximization problem then the dual problem is a minimization
problem. Similarly, if the original problem is a minimization problem then the dual problem is a
maximization problem.
The original problem has less than or equal to (≤) type of constraints while the dual problem has
greater than or equal to (≥) type constraints.
The coefficients of the constraints of the original problem which appear from left to right are
placed from top to bottom in the constraints of the dual problem and vice versa.
The Dual Linear Programming Problem is explained with the help of the following Example.
Example
Consider the following product mix problem:
Three machine shops A, B, C produces three types of products X, Y, Z respectively. Each product
involves operation of each of the machine shops. The time required for each operation on various
products is given as follows:
Machine Shops
Products A B C Profit per unit
X $12
10 7 2
Y $3
2 3 4
Z $1
1 2 1
Available Hours 100 77 80
Dr.Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
The available hours at the machine shops A, B, C are 100, 77, and 80 only. The profit per unit of
products X, Y, and Z is $12, $3, and $1 respectively.
Solution:
The formulation of Linear Programming (original problem) is as follows:
Maximize
12x1 + 3x2 + x3
Subject to:
10x1 + 2x2 + x3 ≤ 100
7x1 + 3x2 + 2x3 ≤ 77
2x1 + 4x2 + x3 ≤ 80
x1, x2, x3 ≥ 0
We introduce the slack variables s4, s5 and s6 then the equalities becomes as:
Maximize
12x1 + 3x2 + x3
Subject to:
10x1 + 2x2 + x3 + s4 = 100
7x1 + 3x2 + 2x3 + s5 = 77
2x1 + 4x2 + x3 +s6 = 80
x1, x2, x3, s4, s5, s6 ≥ 0
Form the above equations, the first simplex table is obtained is as follows:
CB Basic Cj 12 3 1 0 0 0
Variable XB x1 x2 x3 s4 s5 s6
0 s4 100 10 2 1 1 0 0
0 s5 77 7 3 2 0 1 0
0 s6 80 2 4 1 0 0 1
zj-cj -12 -3 -1 0 0 0
Note that the basic variables are s4, s5 and s6. Therefore CB1 = 0, CB2 = 0, CB3 = 0.
The smallest negative element in the above table of z1 – c1 is -12. Hence, x1 becomes a
basic variable in the next iteration.
Determine the minimum ratios
Dr.Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
By using this way we get the elements of the second and the third row in Table 2.
Similarly, the calculation of numerical values of basic variables in Table 2 is done
CB Basic Cj 22 6 2 0 0 0
Variable XB x1 x2 x3 s4 s5 s6
10, 7 , 60
Min 2 16 18 = Min 50, 70, 300 = 70
10 10 5 16 18 16
So that the variable s5 will be a non basic variable in the next iteration.
6. From Table 2, the Table 3 is calculated using the rules (i), (ii) and (iii) mentioned above.
CB Basic Cj 12 3 1 0 0 0
Variable XB x1 x2 x3 s4 s5 s6
Dr.Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
12 x1 73/8 1 0 -1/16 3/16 -1/8 0
Let, assume that W1, W2 and W3 are the offers made per hour of machine time A, B and C respectively.
Then these prices W1, W2 and W3 must satisfy the conditions given below:
W1, W2, W3 ≥ 0
Assume that the investor is behaving in a rational manner; he would try to bargain as much as possible
so that the total annual payable to the produces would be as little as possible. This leads to the following
condition:
Minimize
100W1 + 77W2 + 80W3
The total amount offer by the investor to the three resources viz. A, B and C required to produce
one unit of each product must be at least as high as the profit gained by the producer per unit.
Since, these resources enable the producer to earn the specified profit corresponding to the
product he would not like to sell it for anything less assuming he is behaving rationally. This leads to the
following conditions:
10w1 + 7w2 + 2w3 ≥ 12
2w1 + 3w2 + 4w3 ≥ 3
w1 + 2w2 + w3 ≥ 1
Thus, in this case we have a linear problem to ascertain the values of the variable w1, w2, w3. The
variables w1, w2 and w3 are called as dual variables.
Note:
The original (primal) problem illustrated in this example
considers the objective function maximization
contains ≤ type constraints
has non-negative constraints
This original problem is called as primal problem in the standard form.
Dual Problem Properties
The following are the different properties of dual programming problem:
If the original problem is in the standard form, then the dual problem solution is obtained from the zj –
cj values of slack variables.
For example: In the Example 4.1, the variables s4, s4 and s6 are the slack variables. Hence the dual
problem solution is w1 = z4 – c4 = 15/16, w2 = z5 – c5 = 3/8 and w3 = z6 – c6 = 0.
The original problem objective function maximum value is the minimum value of the dual problem
objective function.
For example:
From the above Example 4.1 we know that the original problem maximum values is 981/8 = 122.625.
So that the minimum value of the dual problem objective function is
Dr.Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
100*15/16 + 77*3/8 + 80*0 = 981/8
Here the result has an important practical implication. If both producer and investor analyzed the
problem then neither of the two can outmanoeuvre the other Shadow Price: A resource shadow price is
its unit cost, which is equal to the increase in profit to be realized by one additional unit of the resource.
For example:
Let the minimum objective function value is expressed as:
100*15/16 + 77*3/8 + 80*0
If the first resource is increased by one unit the maximum profit also increases by 15/16, which is the
first dual variable of the optimum solution. Therefore, the dual variables are also referred as the resource
shadow price or imputed price. Note that in the previous example the shadow price of the third resource
is zero because there is already an unutilized amount, so that profit is not increased by more of it until
the current supply is totally exhausted.
In the originals problem, if the number of constraints and variables is m and n then the
constraint and variables in the dual problem is n and m respectively. Suppose the slack variables in the
original problem is represented by y1, y1, ….., yn and the surplus variables are represented by z1, z2, …,
zn in the dual problem.
Suppose, the original problem is not in a standard form, then the dual problem structure is
unchanged. However, if a constraint is greater than or equal to type, the corresponding dual variable is
negative or zero. Similarly, if a constraint in the original problem is equal to type, then the
corresponding dual variables is unrestricted in sign.
Example 4.2
Consider the following linear programming
problem Maximize
22x1 + 25x2 +19x3
Subject to:
18x1 + 26x2 + 22x3 ≤ 350
14x1 + 18x2 + 20x3 ≥180
17x1 + 19x2 + 18x3 = 205
x1, x2, x3 ≥ 0
Note that this is a primal or original problem.
The corresponding dual problem for this problem is as follows:
Minimize
250w1 + 80w2 +105w3
Subject to:
18w1 + 4w2 + 7w3 ≥ 22
26w1 + 18w2 + 19w3 ≥ 25
22w1 + 20w2 + 18w3 ≥ 19
w1 ≥ 0, w2 ≤, and w3 is unrestricted in sign (+ or -).
Now, we can solve this using simplex method as usual.
Simple Way of Solving Dual Problem
Solving of dual problem is simple; this is illustrated with the help of the following Example.
Example :
Minimize
P = x1 + 2x2
Subject to:
x1 + x2 ≥ 8
2x1 + y ≥ 12
x1 ≥ 1
Solution:
1 1 8
2 1 12
P= 1 0 1
1 2 0
Pivoting
w1 w2 w3 s1 s2 g z
w1 w2 w3 s1 s2 g z
w1 w2 w3 s1 s2 g z
The most negative entry in the bottom row to the left of the last column is -2. The smallest non-
negative ratio is the 1/2 in the first row. This is the next pivot element.
Dr.Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
w1 w2 w3 s1 s2 g z
Since there are no negative entries in the bottom row and to the left of the last column, the
process is complete. The solutions are at the feet of the slack variable columns.
Therefore, w1 w2 w3 s1 s2 g z
0 -1 -1 -1 1 0 1
The Minimum Value
is: 8 0 4 7 8 0 1 8
Dr.Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
1 9 13 36 51
50
50
24 12 16 20 1
100 60
60 40
14 33 1 23 26
50 50 50
150 100 50
Requirement 100 60 50 50 40
50
The Least Cost method is applied in the following manner:
We observe that C11=1 is the minimum unit cost in the table. Hence X 11=50 and the first row is
crossed out since the row has no more capacity. Then the minimum unit cost in the uncrossed-out row and
column is C25=1, hence X25=40 and the fifth column is crossed out. Next C 33=1is the minimum unit cost,
hence X33=50 and the third column is crossed out. Next C 22=12 is the minimum unit cost, hence X 22=60 and
the second column is crossed out. Next we look for the uncrossed-out row and column now C 31=14 is the
minimum unit cost, hence X31=50 and crossed out the first column since it was satisfied. Finally C 34=23 is
the minimum unit cost, hence X34=50 and the fourth column is crossed out.
So that the basic feasible solution developed by the Least Cost Method has transportation cost is
Dr.Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
1 * 50 + 12 * 60 + 1 * 40 + 14 * 50 + 1 * 50 + 23 * 50 = 2710
Note that the minimum transportation cost obtained by the least cost method is much lower than
the corresponding cost of the solution developed by using the north-west corner method.
Dr.Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
Vogel Approximation Method (VAM):
VAM is an improved version of the least cost method that generally produces better solutions.
The steps involved in this method are:
Step 1: For each row (column) with strictly positive capacity (requirement), determine a penalty by
subtracting the smallest unit cost element in the row (column) from the next smallest unit cost element
in the same row (column).
Step 2: Identify the row or column with the largest penalty among all the rows and columns. If the
penalties corresponding to two or more rows or columns are equal we select the topmost row and the
extreme left column.
Step 3: We select Xij as a basic variable if Cij is the minimum cost in the row or column with largest
penalty. We choose the numerical value of Xij as high as possible subject to the row and the column
th th
constraints. Depending upon whether ai or bj is the smaller of the two i row or j column is crossed out
Step 4: The Step 2 is now performed on the uncrossed-out rows and columns until all the basic
variables have been satisfied.
Example 1.4:
Consider the following transportation problem
Destination
Origin 1 2 3 4 ai
1 20 22 17 4 120
2 24 37 9 7 70
3 32 37 20 15 50
bj 60 40 30 110 240
bj 60 40 30 110 240
Row Penalty 4 15 8 3
Look for the highest penalty in the row or column, the highest penalty occurs in the second
column and the minimum unit cost i.e. cij in this column is c12=22. Hence assign 40 to this cell i.e.
x12=40 and cross out the second column (since second column was satisfied. This is shown in the
following table:
Origin ai
Destinatio Colum
Dr.Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
n n
1 2 3 4
Penalty
1 20 22 40 17 4 80 13
2 24 37 9 7 70 2
3 32 37 20 15 50 5
24
bj 60 40 30 110 0
Row Penalty 4 15 8 3
The next highest penalty in the uncrossed-out rows and columns is 13 which occur in the first row
and the minimum unit cost in this row is c14=4, hence x14=80 and cross out the first row. The
modified table is as follows:
Destination
Origin 1 2 3 4 ai Column
Penalty
1 20 22 17 4 0 13
40 80
2 24 37 9 7 70 2
3 32 37 20 15 50 5
bj 60 40 30 110 240
Row Penalty 4 15 8 3
The next highest penalty in the uncrossed-out rows and columns is 8 which occurs in the third
column and the minimum cost in this column is c23=9, hence x23=30 and cross out the third column
with adjusted capacity, requirement and penalty values. The modified table is as follows:
Destination
Origin 1 2 3 4 ai Column
Penalty
1 20 22 17 4 0 13
40 80
2 24 37 9 7 40 17
30
3 32 37 20 15 50 17
bj 60 40 30 110 240
Dr.Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
Row Penalty 8 15 8 8
The next highest penalty in the uncrossed-out rows and columns is 17 which occurs in the
second row and the smallest cost in this row is c24=15, hence x24=30 and cross out the fourth column
with the adjusted capacity, requirement and penalty values. The modified table is as follows:
Destinatio
n
Origin 1 2 3 4 ai Column
Penalty
1 20 22 17 4 0 13
40 80
2 24 37 9 7 10 17
30 30
3 32 37 20 15 50 17
bj 60 40 30 110 240
Row Penalty 8 15 8 8
The next highest penalty in the uncrossed-out rows and columns is 17 which occurs in the
second row and the smallest cost in this row is c21=24, hence xi21=10 and cross out the second row
with the adjusted capacity, requirement and penalty values. The modified table is as follows:
Destination
Origin 1 2 3 4 ai Column
Penalty
1 20 22 17 40 13
40 80
2 24 37 9 7 0 17
10 30 30
3 32 37 20 15 50 17
bj 60 40 30 110 240
Row Penalty 8 15 8 8
The next highest penalty in the uncrossed-out rows and columns is 17 which occurs in the third
row and the smallest cost in this row is c31=32, hence xi31=50 and cross out the third row or first
column. The modified table is as follows:
Origin Destination ai Column
Dr.Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
1 2 3 4
Penalty
1 20 22 17 4 0 13
40 80
2 24 37 9 7 0 17
10 30 30
3 32 37 20 15 0 17
50
30 110 240
bj 60 40
Row Penalty 8 15 8 8
is 22 * 40 + 4 * 80 + 9 * 30 + 7 * 30 + 24 * 10 + 32 * 50 = 3520
1 9 13 36 51
50
24 12 16 20 1 10
0
14 33 1 23 26
15
0
Step 1: First we have to determine the basic feasible solution. The basic feasible solution using least
cost method is
x11=50, x22=60, x25=40, x31=50, x32=10, x33=50 and x34=40
Step 2: The dual variables u1, u2, u3 and v1, v2, v3, v4, v5 can be calculated from the corresponding cij
values, that is
u1+v1=1 u2+v2=12 u2+v5=1 u3+v1=14
u3+v2=33 u3+v3=1 u3+v4=23
Step 3: Choose one of the dual variables arbitrarily is zero that is u3=0 as it occurs most often in the
above equations. The values of the variables calculated are
u1= -13, u2= -21, u3=0
v1=14, v2=33, v3=1, v4=23, v5=22
Step 4: Now we calculate cij – ui – vj values for all the cells where xij=0 (.e. unallocated cell by the
basic feasible solution)
That is
Cell(1,2)= c12-u1-v2 = 9+13-33 = -11
Cell(1,3)= c13-u1-v3 = 13+13-1 = 25
Cell(1,4)= c14-u1-v4 = 36+13-23 = 26
Cell(1,5)= c15-u1-v5 = 51+13-22 = 42
Cell(2,1)= c21-u2-v1 = 24+21-14 = 31
Cell(2,3)= c23-u2-v3 = 16+21-1 = 36
Cell(2,4)= c24-u2-v4 = 20+21-23 = 18
Cell(3,5)= c35-u3-v5 = 26-0-22 = 4
Note that in the above calculation all the cij – ui – vj ≥ 0 except for cell (1, 2) where c12 – u1 – v2 =
9+13-33 = -11.
Thus in the next iteration x12 will be a basic variable changing one of the present basic variables non-
basic. We also observe that for allocating one unit in cell (1, 2) we have to reduce one unit in cells (3, 2)
and (1, 1) and increase one unit in cell (3, 1). The net transportation cost for each unit of such
reallocation is
-33 -1 + 9 +14 = -11
The maximum that can be allocated to cell (1, 2) is 10 otherwise the allocation in the cell (3, 2) will be
negative. Thus, the revised basic feasible solution is
x11=40, x12=10, x22=60, x25=40, x31=60, x33=50, x34=40
Dr.Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
w Suppl
Plant w1 w2 3 y
20 17 25
X 400
10 10 20
Y 500
Plant w1 w2 Supply
w3
20 17 25
X 400
10 10 20
Y 500
Unsatisfied
0 0 0
Demand 400
Dr.Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
Warehouses
Plant w1 w2 Supply (ai)
w3
20 17 25
X 400
10 10 20
Y 500
Unsatisfied
0 0 0
demand 400
ASSIGNMENT PROBLEM
Introduction
The Assignment Problem can define as follows:
Given n facilities, n jobs and the effectiveness of each facility to each job, here the problem is to
assign each facility to one and only one job so that the measure of effectiveness if optimized. Here the
Dr.Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
optimization means Maximized or Minimized. There are many management problems has a assignment
Dr.Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
problem structure. For example, the head of the department may have 6 people available for assignment
and 6 jobs to fill. Here the head may like to know which job should be assigned to which person so that
all tasks can be accomplished in the shortest time possible. Another example a container company may
have an empty container in each of the location 1, 2,3,4,5 and requires an empty container in each of the
locations 6, 7, 8,9,10. It would like to ascertain the assignments of containers to various locations so as
to minimize the total distance. The third example here is, a marketing set up by making an estimate of
sales performance for different salesmen as well as for different cities one could assign a particular
salesman to a particular city with a view to maximize the overall sales.
Note that with n facilities and n jobs there are n! possible assignments. The simplest way of
finding an optimum assignment is to write all the n! possible arrangements, evaluate their total cost and
select the assignment with minimum cost. Bust this method leads to a calculation problem of formidable
size even when the value of n is moderate. For n=10 the possible number of arrangements is 3268800.
Assignment Problem Structure and Solution
The structure of the Assignment problem is similar to a transportation problem, is as follows:
1 2 … n
. . . . .
Workers
. . . .
. . . .
1 1 … 1
th th
The element cij represents the measure of effectiveness when i person is assigned j job. Assume that
th
the overall measure of effectiveness is to be minimized. The element x ij represents the number of i
th th th
individuals assigned to the j job. Since i person can be assigned only one job and j job can be
assigned to only one person we have the following
xi1 + xi2 + ……………. + xin = 1, where i = 1, 2,.............., n
x1j + x2j + ……………. + xnj = 1, where j = 1, 2,.............., n
and the objective function is formulated as
Minimize c11x11 + c12x12 +................+ cnnxnn
xij ≥ 0
The assignment problem is actually a special case of the transportation problem where m = n and
ai = bj = 1. However, it may be easily noted that any basic feasible solution of an assignment problem
contains (2n – 1) variables of which (n – 1) variables are zero. Because of this high degree of degeneracy
the usual computation techniques of a transportation problem become very inefficient. So, hat a separate
computation technique is necessary for the assignment problem.
The solution of the assignment problem is based on the following results:
“If a constant is added to every element of a row/column of the cost matrix of an assignment
problem the resulting assignment problem has the same optimum solution as the original assignment
problem and vice versa”. – This result may be used in two different methods to solve the assignment
problem. If in an assignment problem some cost elements cij are negative, we may have to convert them
into an equivalent assignment problem where all the cost elements are non-negative by adding a suitable
large constant to the cost elements of the relevant row or column, and then we look for a feasible
solution which has zero assignment cost after adding suitable constants to the cost elements of the
Dr.Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
various rows and columns. Since it has been assumed that all the cost elements are non-negative, this
assignment must be optimum. On the basis of this principle a computational technique known as
Hungarian Method is developed. The Hungarian Method is discussed as follows.
Hungarian Method:
The Hungarian Method is discussed in the form of a series of computational steps as follows,
when the objective function is that of minimization type.
Step 1:
From the given problem, find out the cost table. Note that if the number of origins is not equal to the
number of destinations then a dummy origin or destination must be added.
Step 2:
In each row of the table find out the smallest cost element, subtract this smallest cost element from each
element in that row. So, that there will be at least one zero in each row of the new table. This new table
is known as First Reduced Cost Table.
Step 3:
In each column of the table find out the smallest cost element, subtract this smallest cost element from
each element in that column. As a result of this, each row and column has at least one zero element. This
new table is known as Second Reduced Cost Table.
Step 4:
Now determine an assignment as follows:
For each row or column with a single zero element cell that has not be assigned or
eliminated, box that zero element as an assigned cell.
For every zero that becomes assigned, cross out all other zeros in the same row and for
column.
If for a row and for a column there are two or more zero and one can’t be chosen by
inspection, choose the assigned zero cell arbitrarily.
The above procedures may be repeated until every zero element cell is either assigned
(boxed) or crossed out.
Step 5:
An optimum assignment is found, if the number of assigned cells is equal to the number of rows (and
columns). In case we had chosen a zero cell arbitrarily, there may be an alternate optimum. If no
optimum solution is found i.e. some rows or columns without an assignment then go to Step 6.
Step 6:
Draw a set of lines equal to the number of assignments which has been made in Step 4, covering all the
zeros in the following manner
Mark check (√) to those rows where no assignment has been made.
Examine the checked (√) rows. If any zero element cell occurs in those rows, check (√) the
respective columns that contains those zeros.
Examine the checked (√) columns. If any assigned zero element occurs in those columns,
check (√) the respective rows that contain those assigned zeros.
The process may be repeated until now more rows or column can be checked.
Draw lines through all unchecked rows and through all checked columns.
Step 7:
Examine those elements that are not covered by a line. Choose the smallest of these elements and
subtract this smallest from all the elements that do not have a line through them.
Add this smallest element to every element that lies at the intersection of two lines. Then the
resulting matrix is a new revised cost table.
Example:
Problem
A work shop contains four persons available for work on the four jobs. Only one person can work on
any one job. The following table shows the cost of assigning each person to each job. The objective is
to assign person to jobs such that the total assignment cost is a minimum.
Dr.Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
Jobs
1 2 3 4
20 25 22 28
A
15 18 23 17
Persons B
19 17 21 24
C
25 23 24 24
D
Solution
20 25 22 28
A
15 18 23 17
Persons B
C 19 17 21 24
D 25 23 24 24
Dr.Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
Step 2: Find the First Reduced Cost Table
Jobs
1 2 3 4
0 5 2 8
A
0 3 8 2
Persons B
2 0 4 7
C
2 0 1 1
Jobs
1 2 3 4
0 5 1 7
A
0 3 7 1
Persons B
2 0 3 6
C
2 0 0 0
By examine row A of the table in Step 3, we find that it has only one zero (cell A1) box this zero
and cross out all other zeros in the boxed column. In this way we can eliminate cell B1.
Now examine row C, we find that it has one zero (cell C2) box this zero and cross out (eliminate) the
zeros in the boxed column. This is how cell D2 gets eliminated.
Dr.Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
There is one zero in the column 3. Therefore, cell D3 gets boxed and this enables us to eliminate
cell D4.
Therefore, we can box (assign) or cross out (eliminate) all zeros.
The resultant table is shown below:
Jobs
1 2 3 4
0 5 1 7
A
0 3 7 1
Persons B
C 2 3 6
D 2 0 0
Step 5: 0
The solution obtained in Step 4 is not optimal. Because we were able to make three assignments
when four were required.
Step 6:
Cover all the zeros of the table shown in the Step 4 with three lines (since already we made
three assignments).
Check row B since it has no assignment. Note that row B has a zero in column 1, therefore check
column1. Then we check row A since it has a zero in column 1. Note that no other rows and columns
are checked. Now we may draw three lines through unchecked rows (row C and D) and the checked
column (column 1). This is shown in the table given below:
Jobs
1 2 3 4
0 5 1 7
A
0 3 7 1
Persons B
C 2 3 6
D 2 0 0
Dr.Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
Step 7:
Develop the new revised table.
Examine those elements that are not covered by a line in the table given in Step 6. Take the smallest
element in this case the smallest element is 1. Subtract this smallest element from the uncovered
cells and add 1 to elements (C1 and D1) that lie at the intersection of two lines. Finally, we get the
new revised cost table, which is shown below:
Jobs
1 2 3 4
0 4 0 6
A
0 2 6 0
Persons B
C 3 0 3 6
D 3 0 0 0
Step 8:
Now, go to Step 4 and repeat the procedure until we arrive at an optimal solution (assignment).
Step 9:
Determine an assignment
Examine each of the four rows in the table given in Step 7, we may find that it is only row C which
has only one zero box this cell C2 and cross out D2.
Note that all the remaining rows and columns have two zeros. Choose a zero arbitrarily, say A1 and box
this cell so that the cells A3 and B1 get eliminated.
Now row B (cell B4) and column 3 (cell D4) has one zero box these cells so that cell D4 is eliminated.
Thus, all the zeros are either boxed or eliminated. This is shown in the following table
Jobs
1 2 3 4
4 0 6
Dr.Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
0
A
0 2 6
Persons B
C 3 3 06
D 3 0 0
Since the number of assignments equal to the number of rows (columns), the assignment
20 + 17 + 17 + 24 = 78
In the previous section we assumed that the number of persons to be assigned and the number of jobs
were same. Such kind of assignment problem is called as balanced assignment problem. Suppose if
the number of person is different from the number of jobs then the assignment problem is called as
unbalanced.
If the number of jobs is less than the number of persons, some of them can’t be assigned any job. So that
we have to introduce on or more dummy jobs of zero duration to make the unbalanced assignment
problem into balanced assignment problem. This balanced assignment problem can be solved by using
the Hungarian Method as discussed in the previous section. The persons to whom the dummy jobs are
assigned are left out of assignment.
Similarly, if the number of persons is less than number of jobs then we have introduce one or
more dummy persons with zero duration to modify the unbalanced into balanced and then the problem
is solved using the Hungarian Method. Here the jobs assigned to the dummy persons are left out.
Example:
Solve the following unbalanced assignment problem of minimizing the total time for performing all
the jobs.
Jobs
1 2 3 4 5
5 2 4 2 5
A
2 4 7 6 6
B
Dr.Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
Workers C 6 7 5 8 7
D 5 2 3 3 4
E 8 3 7 8 6
F 3 6 3 5 7
Solution
In this problem the number of jobs is less than the number of workers so we have to introduce a
dummy job with zero duration.
5 2 4 2 5 0
A
2 4 7 6 6 0
B
Workers C 6 7 5 8 7 0
D 5 2 3 3 4 0
Dr.Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
E 8 3 7 8 6 0
F 3 6 3 5 7 0
Now the problem becomes balanced one since the number of workers is equal to the number jobs.
So that the problem can be solved using Hungarian Method.
1 2 3 4 5 6
5 2 4 2 5 0
A
2 4 7 6 6 0
Workers B
C 6 7 5 8 7 0
D 5 2 3 3 4 0
E 8 3 7 8 6 0
F 3 6 3 5 7 0
Dr.Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
Jobs
1 2 3 4 5 6
5 2 4 2 5 0
A
2 4 7 6 6 0
B
Workers C 6 7 5 8 7 0
D 5 2 3 3 4 0
E 8 3 7 8 6 0
F 3 6 3 5 7 0
Dr.Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
1 2 3 4 5 6
3 0 1 0 1 0
A
0 2 4 4 2 0
B
Workers C 4 5 2 6 3 0
D 3 0 0 1 0 0
E 6 1 4 6 2 0
F 1 4 0 3 3 0
Dr.Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
A 3 0 1 0 1 0
2 4 4 2 0
B
4 5 2 6 3
Workers C 0
D 3 0 0 1 0
E 6 1 4 6 2 0
F 1 4 3 3 0
Step 5:
The solution obtained in Step 4 is not optimal. Because we were able to make five assignments
when six were required.
Step 6:
Cover all the zeros of the table shown in the Step 4 with five lines (since already we made five
assignments).
Check row E since it has no assignment. Note0 that row B has a zero in column 6, therefore check
column6. Then we check row C since it has a zero in column 6. Note that no other rows and columns are
Dr.Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
checked. Now we may draw five lines through unchecked rows (row A, B, D and F) and the checked
column (column 6). This is shown in the table given below:
Jobs
1 2 3 4 5 6
A 3 0 1 0 1 0
2 4 4 2 0
B
4 5 2 6 3
Workers C 0
D 3 0 0 1 0
E 6 1 4 6 2 0
F 1 4 3 3 0
0
Step 7:
Examine those elements that are not covered by a line in the table given in Step 6. Take the
smallest element in this case the smallest element is 1. Subtract this smallest element from the
uncovered cells and add 1 to elements (A6, B6, D6 and F6) that lie at the intersection of two lines.
Finally, we get the new revised cost table, which is shown below:
1 2 3 4 5 6
0
Dr. CH. Lakshmi Tulasi Chadalawada Ramanamma Engineering College
3 0 1 0 1 1
A
0 2 4 4 2 1
B
Workers C 3 4 1 5 2 0
D 3 0 0 1 0 1
E 5 0 3 5 1 0
F 1 4 0 3 3 1
Step 8:
Now, go to Step 4 and repeat the procedure until we arrive at an optimal solution
(assignment).
Step 9:
Determine an assignment
Jobs
1 2 3 4 5 6
3 0 1 0 1 1
A
2 4 4 2 1
B
Dr. CH. Lakshmi Tulasi Chadalawada Ramanamma Engineering College
Workers C 30 4 1 5 2
D 3 0 0 1 1
E 5 3 5 1 0 0
F 1 4 3 3 1
Since the number of assignments equal to the number of rows (columns), the assignment
shown in the above tale is optimal.
Thus, the worker A is assigned to Job4, worker B is assigned to job 1, worker C is
assigned to job 6, worker D is assigned to job 5, worker E is assigned to job 2, and worker F
is assigned to job 3. Since the Job 6 is dummy so that worker C can’t be assigned.
The total minimum time is: 14 that is A4 + B1 + D5 + E2 + F3
2 + 2 + 4 + 3 + 3 = 14
Dr. Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
DYNAMIC PROGRAMMING
NETWORK PROBLEMS
Introduction
A network consists of several destinations or jobs which are linked with one another. A
manager will have occasions to deal with some network or other. Certain problems pertaining to
networks are taken up for consideration in this unit.
SHORTEST PATH PROBLEM
Imagine a salesman or a milk vendor or a post man who has to cover certain previously
earmarked places to perform his daily routines. It is assumed that all the places to be visited
by him are connected well for a suitable mode of transport. He has to cover all the locations.
While doing so, if he visits the same place again and again on the same day, it will be a loss
of several resources such as time, money, etc. Therefore he shall place a constraint upon
himself not to visit the same place again and again on the same day. He shall be in a position
to determine a route which would enable him to cover all the locations, fulfilling the
constraint.
The shortest route method aims to find how a person can travel from one location to
another, keeping the total distance traveled to the minimum. In other words, it seeks to
identify the shortest route to a series of destinations.
EXAMPLE
Let us consider a real life situation involving a shortest route problem.
A leather manufacturing company has to transport the finished goods from the
factory to the store house. The path from the factory to the store house is through certain
intermediate stations as indicated in the following diagram. The company executive wants to
identify the path with the shortest distance so as to minimize the transportation cost. The
problem is to achieve this objective.
Store house
Factory 40 2 95 4
35 65 70 6
40
1 5
100 3
20
The shortest route technique can be used to minimize the total distance from a node
designated as the starting node or origin to another node designated as the final node.
In the example under consideration, the origin is the factory and the final node is the store house.
STEPS IN THE SHORTEST ROUTE TECHNIQUE
The procedure consists of starting with a set containing a node and enlarging the set by
choosing a node in each subsequent step.
Step 1:
First, locate the origin. Then, find the node nearest to the origin. Mark the distance between
the origin and the nearest node in a box by the side of that node.
In some cases, it may be necessary to check several paths to find the nearest node.
Step 2:
Repeat the above process until the nodes in the entire network have been accounted for. The
last distance placed in a box by the side of the ending node will be the distance of the
shortest route. We note that the distances indicated in the boxes by each node constitute the
Dr. Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
shortest route to that node. These distances are used as intermediate results in determining
the next nearest node.
The points M and N denote optimal level of maintenance and optimal cost
respectively Types of replacement problem
Dr. Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
The replacement problem can be classified into two categories. Replacement of assets that deteriorate
with time (replacement due to gradual failure, due to wear and tear of the components of the machines)
this can be further classified into the following types. Determination of economic type of an asset.
Replacement of an existing asset with a new asset. Simple probabilistic model for assets which will fail
completely (replacement due to sudden failure).
Determination of Economic Life of an asset
Any asset will have the following cost components
Capital recovery cost (average first cost), Computed form the first cost (Purchase price) of the asset.
Average operating and maintenance cost.
Total cost which is the sum of capital recovery cost (average first cost) and average operating and
maintenance cost.
A typical shape of each of the above cost with respect to life of the asset is shown below
Dr. Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
From figure, when the life of the machine increases, it is clear that the capital recovery cost
(average first cost) goes on decreasing and the average operating and maintenance cost goes on increasing.
From the beginning the total cost goes on decreasing upto a particular life of the asset and then it starts
increasing. The point P were the total cost in the minimum is called the Economic life of the asset. To
solve problems under replacement, we consider the basics of interest formula. Present worth factor
denoted by (P/F, i,n). If an amount P is invested now with amount earning interest at the rate i per year,
then the future sum (F) accumulated after n years can be obtained.
P - Principal sum at year Zero
th
F - Future sum of P at the end of the n year
i - Annual interest rate
- Number of interest periods. Then
n
the formula for future sum F = P ( 1 + i )
n
P = F/(1 +i) = Fx (present worth factor)
If A is the annual equivalent amount which occurs at the end of every year from year one through n
years is given by
A = P x i (1 +i)n
n
(1 +i) - 1
= P ( A / P, i, n )
= P x equal payment series capital recovery factor
Example:
A firm is considering replacement of an equipment whose first cost is Rs. 1750 and the scrap value is
negligible at any year. Based on experience, it is found that maintenance cost is zero during the first year
and it increases by Rs. 100 every year thereafter.When should be the equipment replaced if
i = 0%
i = 12%
Solution :
Given the first cost = Rs 1750 and the maintenance cost is Rs. Zero during the first years and
then increases by Rs. 100 every year thereafter. Then the following table shows the calculation.
Calculations to determine Economic life
(a) First cost Rs. 1750 Interest rate = 0%
The value corresponding to any end-of-year (n) in Column F represents the average total cost of
using the equipment till the end of that particulars year.
In this problem, the average total cost decreases till the end of the year 6 and then it increases.
Hence the optimal replacement period is 6 years ie the economic life of the equipment is 6 years.
(e) When interest rate i = 12%
When the interest rate is more than 0% the steps to get the economic life are summarized in the following
table.
Ans :
flooring
Construction of a house involves various activities. Flooring is an activity in this project. We can say
that a project is completed only when all the activities in the project are completed.
2. Event
It is the beginning or the end of an activity. Events are represented by circles in a project
network diagram. The events in a network are called the nodes.
Example:
Punchig
Starting a punching machine is an activity. Stopping the punching machine is another activity.
3. Predecessor Event
The event just before another event is called the predecessor event.
4. Successor Event
The event just following another event is called the successor event.
Example: Consider the following.
1 6
2 4
5
Dr. Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
Activity
12 A -
13 B -
14 C -
25 D A
36 E B
46 F C
56 G D
Dr. Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
Solution:
The start event is node 1.
The activities A, B, C start from node 1 and none of them has a predecessor activity. A
joins nodes1 and 2; B joins nodes 1 and 3; C joins nodes 1 and 4. So we get the following:
Next, activity E has B as the predecessor activity. E joins nodes 3 and 6. So we get
B E
1 3 6
Next, activity G has D as the predecessor activity. G joins nodes 5 and 6. Thus we obtain
D G
1 2 5
5 G
3 6
E
F
4
Activity
A - 3
B A 5
C A 7
D B 10
E C 5
Dr. Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
F D,E 4
Determine the critical path, the critical activities and the project completion time.
Solution:
First let us construct the network diagram for the given project. We mark the time
estimates along the arrows representing the activities. We obtain the following diagram:
Start event B D End event
5 3 10
A
1 2
3 5 F 6
4
C
Consider the paths, beginning with the start node and stopping with the end node. There are
two such paths for the given project. They are as follows:
Critical Path is A B D F
Project duration is 24 weeks
Dr. Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
6
Since we have taken 6 units ( 1 for tp , 4 for tm and 1 for to ), we divide the sum by 6. With
this time estimate, we can determine the project completion time as applicable for CPM.
Since PERT involves the average of three estimates of time for each activity, this method is
very practical and the results from PERT will be have a reasonable amount of reliability.
MEASURE OF CERTAINTY
The 3 estimates of time are such that
t o t m tp .
Therefore the range for the time estimate is t p to .
The time taken by an activity in a project network follows a distribution with a standard deviation of
one sixth of the range, approximately.
t p to
i.e., The standard deviation =
6
2
t t
and the variance = 2 p o
The certainty of the time estimate of an activity can be analysed with the help of the
Dr. Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
variance. The greater the variance, the more uncertainty in the time estimate of an activity.
Dr. Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
Problem 1:
Two experts A and B examined an activity and arrived at the following time estimates.
Expert Time Estimate
to tm tp
A 4 6 8
B 4 7 10
Solution:
2
2 t p to
10 4 2
So, the variance is less in the case of A. Hence, it is concluded that the expert A is more
certain about his estimates of time.
Determination of Project Completion Time in PERT
Problem 2:
Find out the time required to complete the following project and the critical activities:
Activity Predecessor Optimistic time Most likely time Pessimistic time
Activity estimate (to days) estimate (tm days) estimate (tp days)
A - 2 4 6
B A 3 6 9
C A 8 10 12
D B 9 12 15
E C 8 9 10
Dr. Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
F D, E 16 21 26
G D, E 19 22 25
H F 2 5 8
I G 1 3 5
Solution:
From the three time estimates tp , tm and to , calculate te for each activity. We obtain the
following table:
Activity Optimistic 4 x Most likely Pessimistic to+ 4tm+ tp Time estimate
A 2 16 6 24 4
B 3 24 9 36 6
C 8 40 12 60 10
D 9 48 15 72 12
E 8 36 10 54 9
F 16 84 26 126 21
G 19 88 25 132 22
H 2 20 8 30 5
I 1 12 5 18 3
UNIT I
INTRODUCTION TO OPERATIONS RESEARCH
Introduction
The British/Europeans refer to "operational research", the Americans to "operations research" -
but both are often shortened to just "OR" - which is the term we will use.
Another term which is used for this field is "management science" ("MS"). The
Americans sometimes combine the terms OR and MS together and say "OR/MS" or "ORMS".
Yet other terms sometimes used are "industrial engineering" ("IE") and "decision science"
("DS"). In recent years there has been a move towards a standardization upon a single term for
the field, namely the term "OR".
Operation Research is a relatively new discipline. The contents and the boundaries of the
OR are not yet fixed. Therefore, to give a formal definition of the term Operations Research is a
difficult task. The OR starts when mathematical and quantitative techniques are used to
substantiate the decision being taken. The main activity of a manager is the decision making. In
our daily life we make the decisions even without noticing them. The decisions are taken simply
by common sense, judgment and expertise without using any mathematical or any other model
in simple situations. But the decision we are concerned here with are complex and heavily
responsible. Examples are public transportation network planning in a city having its own layout
of factories, residential blocks or finding the appropriate product mix when there exists a large
number of products with different profit contributions and production requirement etc.
Operations Research tools are not from any one discipline. Operations Research takes
tools from different discipline such as mathematics, statistics, economics, psychology,
engineering etc. and combines these tools to make a new set of knowledge for decision making.
Today, O.R. became a professional discipline which deals with the application of scientific
methods for making decision, and especially to the allocation of scarce resources. The main
purpose of O.R. is to provide a rational basis for decisions making in the absence of complete
information, because the systems composed of human, machine, and procedures may do not
have complete information.
Operations Research can also be treated as science in the sense it describing,
understanding and predicting the systems behavior, especially man-machine system. Thus O.R.
specialists are involved in three classical aspect of science, they are as follows:
i) Determining the systems behavior
ii) Analyzing the systems behavior by developing appropriate models
iii) Predict the future behavior using these models
The emphasis on analysis of operations as a whole distinguishes the O.R. from other research
and engineering. O.R. is an interdisciplinary discipline which provided solutions to problems of
military operations during World War II, and also successful in other operations.
This is a constrained optimization technique, which optimize some criterion within some
constraints. In Linear programming the objective function (profit, loss or return on investment) and
constraints are linear. There are different methods available to solve linear programming.
Game Theory:
This is used for making decisions under conflicting situations where there are one or more
players/opponents. In this the motive of the players are dichotomized. The success of one player tends to
be at the cost of other players and hence they are in conflict.
Decision Theory:
Decision theory is concerned with making decisions under conditions of complete certainty about
the future outcomes and under conditions such that we can make some probability about what will happen
in future.
Queuing Theory:
This is used in situations where the queue is formed (for example customers waiting for service,
aircrafts waiting for landing, jobs waiting for processing in the computer system, etc). The objective here
is minimizing the cost of waiting without increasing the cost of servicing.
Inventory Models:
Inventory model make a decisions that minimize total inventory cost. This model successfully
reduces the total cost of purchasing, carrying, and out of stock inventory.
Simulation:
Simulation is a procedure that studies a problem by creating a model of the process involved in the
problem and then through a series of organized trials and error solutions attempt to determine the best
solution. Some times this is a difficult/time consuming procedure. Simulation is used when actual
experimentation is not feasible or solution of model is not possible.
Non-linear Programming:
This is used when the objective function and the constraints are not linear in nature. Linear
relationships may be applied to approximate non-linear constraints but limited to some range, because
approximation becomes poorer as the range is extended. Thus, the non-linear programming is used to
determine the approximation in which a solution lies and then the solution is obtained using linear
methods.
Dynamic Programming:
Dynamic programming is a method of analyzing multistage decision processes. In this each
elementary decision depends on those preceding decisions and as well as external factors.
Integer Programming:
If one or more variables of the problem take integral values only then dynamic programming
method is used. For example number or motor in an organization, number of passenger in an aircraft,
number of generators in a power generating plant, etc.
Markov Process:
Markov process permits to predict changes over time information about the behavior of a system is
known. This is used in decision making in situations where the various states are defined. The probability
from one state to another state is known and depends on the current state and is independent of how we
have arrived at that particular state.
Network Scheduling:
Dr. Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
This technique is used extensively to plan, schedule, and monitor large projects (for example
computer system installation, R & D design, construction, maintenance, etc.). The aim of this technique is
minimize trouble spots (such as delays, interruption, production bottlenecks, etc.) by identifying the critical
factors. The different activities and their relationships of the entire project are represented
diagrammatically with the help of networks and arrows, which is used for identifying critical activities and
path. There are two main types of technique in network scheduling, they are:
Program Evaluation and Review Technique (PERT) – is used when activities time is not known
accurately/ only probabilistic estimate of time is available.
Critical Path Method (CPM) – is used when activities time is know accurately.
Information Theory:
This analytical process is transferred from the electrical communication field to O.R. field. The
objective of this theory is to evaluate the effectiveness of flow of information with a given system. This is
used mainly in communication networks but also has indirect influence in simulating the examination of
business organizational structure with a view of enhancing flow of information.
Accounting:
Marketing:
Dr. Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
linear programming problem means determining actual values of the decision variables that optimize the
objective function subject to the limitation imposed by the constraints.
The main important feature of linear programming model is the presence of linearity in the
problem. The use of linear programming model arises in a wide variety of applications. Some model may
not be strictly linear, but can be made linear by applying appropriate mathematical transformations. Still
some applications are not at all linear, but can be effectively approximated by linear models. The ease with
which linear programming models can usually be solved makes an attractive means of dealing with
otherwise intractable nonlinear models.
Linear Programming Problem Formulation
The linear programming problem formulation is illustrated through a product mix problem. The
product mix problem occurs in an industry where it is possible to manufacture a variety of products. A
product has a certain margin of profit per unit, and uses a common pool of limited resources. In this case
the linear programming technique identifies the products combination which will maximize the profit
subject to the availability of limited resource constraints.
Example:
Suppose an industry is manufacturing two types of products P1 and P2. The profits per Kg of the two
products are Rs.30 and Rs.40 respectively. These two products require processing in three types of
machines. The following table shows the available machine hours per day and the time required on each
machine to produce one Kg of P1 and P2. Formulate the problem in the form of linear programming
model.
Solution:
30x1 + 40x2
Since one Kg of P1 requires 3 hours of processing time in machine 1 while the corresponding
requirement of P2 is 2 hours. So, the first constraint can be expressed as
3x1 + 2x2 ≤ 600
Similarly, corresponding to machine 2 and 3 the constraints
are 3x1 + 5x2 ≤ 800
5x1 + 6x2 ≤ 1100
In addition to the above there is no negative production, which may be represented algebraically
as x1 ≥ 0 ; x2 ≥ 0
Thus, the product mix problem in the linear programming model is as follows:
Dr. Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
Maximize
30x1 + 40x2
Subject to:
3x1 + 2x2 ≤ 600
3x1 + 5x2 ≤ 800
5x1 + 6x2 ≤ 1100
x1≥ 0, x2 ≥ 0
Solution:
Let us define x1 and x2 are the mills A and B. Here the objective is to minimize the cost of the machine
runs and to satisfy the contract order. The linear programming problem is given by
Minimize
2000x1 + 1500x2
Subject to:
6x1 + 2x2 ≥ 8
2x1 + 4x2 ≥ 12
4x1 + 12x2 ≥ 24
x1 ≥ 0, x2 ≥ 0
This section shows how a two-variable linear programming problem is solved graphically, which is
illustrated as follows:
Example :
Consider the problem discussed
Maximize
30x1 + 40x2
Subject to:
3x1 + 2x2 ≤ 600
3x1 + 5x2 ≤ 800
5x1 + 6x2 ≤ 1100
x1≥ 0, x2 ≥ 0
From the first constraints 3x1 + 2x2 ≤ 600, draw the line 3x1 + 2x2 = 600 which passes through the point
(200, 0) and (0, 300). This is shown in the following graph as line 1.
300
D
0 50 100 150 X1
200 275
Close Half Plane – Half plane with its boundary is called as a closed half plane.
In this case we must decide in which side of the line 3x1 + 2x2 = 600 the half plane is located. The
easiest way to solve the inequality for x2 is
3x1 ≤ 600 – 2x2
And for the fixed x1, the coordinates satisfy this inequality are smaller than the corresponding
ordinate on the line and thus the inequality is satisfied for all the points below the line 1.
Similarly, we have to determine the closed half planes for the inequalities 3x1 + 5x2 ≤ 800 and
5x1 + 6x2 ≤ 1100 (line 2 and line 3 in the graph). Since all the three constraints must be satisfied
simultaneously we have consider the intersection of these three closed half planes. The complete
intersection of these three closed half planes is shown in the above graph as ABCD. The region ABCD is
called the feasible region, which is shaded in the graph.
Feasible Solution:
Any non-negative value of x1, x2 that is x1 ≥ 0 and x2 ≥ 0 is known as feasible solution of the linear
programming problem if it satisfies all the existing constraints.
Feasible Region:
The collection of all the feasible solution is called as the feasible region.
LINEAR PROGRAMMING – SIMPLEX METHOD
Introduction
The Linear Programming with two variables can be solved graphically. The graphical method of
solving linear programming problem is of limited application in the business problems as the number of
variables is substantially large. If the linear programming problem has larger number of variables, the
suitable method for solving is Simplex Method. The simplex method is an iterative process, through which
it reaches ultimately to the minimum or maximum value of the objective function.
The simplex method also helps the decision maker/manager to identify the following:
Redundant Constraints
Multiple Solutions
Unbounded Solution
Infeasible Problem
The basic of simplex method is explained with the following linear programming problem.
Example:
Maximize
60x1 + 70x2
Subject to:
2x1 + x2 ≤ 300
3x1 + 4x2 ≤ 509
4x1 + 7x2 ≤ 812
x1, x2 ≥ 0
Solution
s3, s4, s5 ≥ 0
So that the constraints becomes equations, thus
2x1 + x2 + s3 = 300
3x1 + 4x2 + s4 = 509
4x1 + 7x2 + s5 = 812
Corresponding to the three constraints, the variables s3, s4, s5 are called as slack variables. Now, the
system of equation has three equations and five variables.
There are two types of solutions they are basic and basic feasible, which are discussed as follows:
Basic Solution
We may equate any two variables to zero in the above system of equations, and then the system
will have three variables. Thus, if this system of three equations with three variables is solvable such a
solution is called as basic solution.
For example suppose we take x1=0 and x2=0, the solution of the system with remaining three
variables is s3=300, s4=509 and s5=812, this is a basic solution and the variables s3, s4, and s5 are known
as basic variables where as the variables x1, x2 are known as non-basic variables.
The number of basic solution of a linear programming problem is depends on the presence of the
number of constraints and variables. For example if the number of constraints is m and the number of
n n
variables including the slack variables is n then there are at most Cn-m = Cm basic solutions.
Maximize
60x1 + 70x2
Subject to:
2x1 + x2 + s3 = 300
3x1 + 4x2 + s4 = 509
4x1 + 7x2 + s5 = 812
x1, x2, s3, s4 ,s5 ≥ 0
Dr. Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
The profit Z=60x1 + 70x2 i.e. Maximize 60x1 + 70x2
The standard form can be summarized in a compact table form as
In this problem the slack variables s3, s4, and s5 provide a basic feasible solution from which the
simplex computation starts. That is s3==300, s4=509 and s5=812. This result follows because of the
special structure of the columns associated with the slacks.
If z represents profit then z=0 corresponding to this basic feasible solution. We represent by C B
the coefficient of the basic variables in the objective function and by XB the numerical values of the
basic variable.
So that the numerical values of the basic variables are: XB1=300, XB2=509, XB3=812. The
profit z=60x1+70x2 can also expressed as z-60x1-70x2=0. The simplex computation starts with the first
compact standard simplex table as given below:
CB Basic Cj 60 70 0 0 0
Variables XB x1 x2 s3 s4 s5
0 s3 300 2 1 1 0 0
0 s4 509 3 4 0 1 0
0 s5 812 4 7 0 0 1
z -60 -70 0 0 0
In the objective
function the coefficients of the variables are CB1=CB2=CB3=0. The topmost row of the Table 1 denotes
the coefficient of the variables x1, x2, s3, s4, s5 of the objective function respectively. The column under
x1 indicates the coefficient of x1 in the three equations respectively. Similarly the remaining column also
formed.
On seeing the equation z=60x1+70x2 we may observe that if either x1 or x2, which is currently
non-basic is included as a basic variable so that the profit will increase. Since the coefficient of x2 is
higher we choose x2 to be included as a basic variable in the next iteration. An equivalent criterion of
choosing a new basic variable can be obtained the last row of Table 1 i.e. corresponding to z.
Since the entry corresponding to x2 is smaller between the two negative values, x2 will be
included as a basic variable in the next iteration. However with three constraints there can be only three
basic variables.
Thus, by bringing x2 a basic variable one of the existing basic variables becomes non-basic. The
question here is How to identify this variable? The following statements give the solution to this
question.
Consider the first equation i.e. 2x1 + x2 + s3 = 300
From this equation
2x1+s3=300-x2
Similarly consider the second equation i.e. 3x1 + 4x2 + s4 = 509 From
this equation
Dr. Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
3x1+s4=509-4x2
But, x1=0. Hence, in order that s4≥0
509-4x2≥0
i.e. x2≤509/9
Therefore x2=116
So that the revised values of the other two basic variables are
S3=300-x2=184
S4=509-4*116=45
Refer to Table 1, we obtain the elements of the next Table i.e. Table using the following rules:
We allocate the quantities which are negative in the z-row. Suppose if all the quantities are
positive, the inclusion of any non-basic variable will not increase the value of the objective function.
Hence the present solution maximizes the objective function. If there are more than one negative values
we choose the variable as a basic variable corresponding to which the z value is least as this is likely to
increase the more profit.
th
Let xj be the incoming basic variable and the corresponding elements of the j row column be denoted
by Y1j, Y2j and Y3j respectively. If the present values of the basic variables are XB1, XB2 and XB3
respectively, then we can compute.
Note that if any Yij≤0, this need not be included in the comparison. If the minimum occurs
th
corresponding to XBr/Yrj then the r basic variable will become non-basic in the next iteration.
Using the following rules the Table 2 is computed from the Table
The revised basic variables are s3, s4 and x2. Accordingly, we make CB1=0, CB2=0 and CB3=70.
Dr. Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
As x2 is the incoming basic variable we make the coefficient of x2 one by dividing each element of row-
3 by 7. Thus the numerical value of the element corresponding to x1 is 4/7, corresponding to s5 is 1/7 in
Table 2.
The incoming basic variable should appear only in the third row. So we multiply the third-
row of Table 2 by 1 and subtract it from the first-row of Table 1 element by element. Thus the element
corresponding to x2 in the first-row of Table 2 is 0.
Therefore the element corresponding to x1 is 2-
1*4/7=10/7 and the element corresponding to s5 is
0-1*1/7=-1/7
In this way we obtain the elements of the first and the second row in Table 2. In Table 2 the
numerical values can also be calculated in a similar way.
CB Basic Cj 60 70 0 0 0
Variables XB x1 x2 s3 s4 s5
0 s4 45 5/7 0 0 1 -4/7
Let CB1, CB2, Cb3 be the coefficients of the basic variables in the objective function. For
example in Table 2 CB1=0, CB2=0 and CB3=70. Suppose corresponding to a variable J, the quantity zj is
defined as zj=CB1, Y1+CB2, Y2j+CB3Y3j. Then the z-row can also be represented as Zj-Cj.
For example:
z1 - c1 = 10/7*0+5/7*0+70*4/7-60 = -140/7
z5 – c5 = -1/7*0-4/7*0+1/7*70-0 = 70/7
Now we apply rule (1) to Table 2. Here the only negative zj-cj is z1-c1 = -
140/7 Hence x1 should become a basic variable at the next iteration.
3. Like Table 2, the Table 3 is computed sing the rules (i), (ii), (iii) as described above.
CB Basic Cj 60 70 0 0 0
Variables XB x1 x2 s3 s4 s5
0 s3 94 0 0 1 -2 1
60 x1 63 1 0 0 7/5 -4/5
70 x2 80 0 1 0 -4/5 3/5
zj-cj 0 0 0 28 -6
94, 80
Min 1 3 = 94
5
Note: Since y25 = -4/5 < 0, the corresponding ratio is not taken for comparison.
The variable s3 becomes non basic in the next iteration.
CB Basic Cj 60 70 0 0 0
Variables XB x1 x2 s3 s4 s5
0 s5 94 0 0 1 -2 1
60 x1 691/5 1 0 4/5 -1/5 0
70 x2 118/5 0 1 -3/5 2/5 0
zj-cj 0 0 6 16 0
Note that zj – cj ≥ 0 for all j, so that the objective function can’t be improved any further.
Thus, the objective function is maximized for x1 = 691/5 and x2=118/5 and
The maximum value of the objective function is 9944.
Even though the surplus variables can convert greater than or equal to type constraints into
Dr. Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
equations they are unable to provide initial basic variables to start the simplex method calculation. So
we may have to introduce two more additional variables a6 and a7 called as artificial variable to
facilitate the calculation of an initial basic feasible solution.
In this method the calculation is carried out in two phases hence tow phase method.
Phase I
In this phase we will consider the following linear programming problem
Maximize
-a6 –a7
Subject to:
x1 + x2 -s3 +a6 = 2000
40x1 + 75x2 -s4 + a7 = 100000
75x1 + 100x2 +s5 = 200000
x1, x2.s3,s4,s5,a6,a7 ≥ 0
As the minimum value of the objective function of the Phase I is zero at the end of the Phase I
calculation both a6 and a7 become zero.
CB Basic Cj 0 0 0 0 0 -1 -1
variables XB x1 x2 s3 s4 s5 a6 a7
-1 a6 2000 1 1 -1 0 0 1 0
-1 a7 100000 40 75 0 -1 0 0 1
0 s5 200000 75 100 0 0 1 0 0
CB Basic Cj 0 0 0 0 0 -1
variables XB x1 x2 s3 s4 s5 a6
Here x2 becomes a basic variable and a7 becomes non basic variable in the next iteration. It is no
longer considered for re-entry in the table.
Dr. Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
Table 2
Then x1 becomes a basic variable and a6 becomes a non basic variable in the next iteration.
CB Basic Cj 0 0 0 0 0
variables XB x1 x2 s3 s4 s5
zj-cj 0 0 0 0 0
The calculation of Phase I end at this stage. Note that, both the artificial variable have been
removed and also found a basic feasible solution of the problem.
The basic feasible solution is:
x1 = 10000/7, x2 = 4000/2, s5 = 250000/7.
Phase II
The initial basic feasible solution obtained at the end of the Phase I calculation is used as the initial basic
feasible solution of the problem. In this Phase II calculation the original objective function is introduced
and the usual simplex procedure is applied to solve the linear programming problem.
250000/
0 s5 7 0 0 325/7 5/7 1
143/1
zj-cj 0 0 4 2/35 0
In this Table 1 all zj-cj ≥ 0 the current solution maximizes the revised objective function.
Thus, the solution of the problem is:
x1 = 10000/7 = 1428 and x2 = 4000/7 = 571.4 and
The Minimum Value of the objective function is: 26135.3
Dr. Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
M Method
In this method also we need artificial variables for determining the initial basic feasible solution. The M
method is explained in the next Example 3.4 with the help of the previous Example.
Example
Maximize
-12.5x1 – 14.5x2
Subject to:
x1 + x2 –s3 = 2000
40x1 + 75x2 -s4 = 100000
75x1 + 100x2 +s5 = 200000
x1, x2, s3, s4, s5 ≥ 0.
Introduce the artificial variables a6 and a7 in order to provide basic feasible solution in the second and
third constraints. The objective function is revised using a large positive number say M.
Thus, instead of the original problem, consider the following problem i.e.
Maximize
-12.5x1 – 14.5x2 – M (a6 + a7)
Subject to:
x1 + x2 –s3 + a6 = 2000
40x1 + 75x2 -s4 +a7 = 100000
75x1 + 100x2 +s5 = 200000
x1, x2, s3, s4, s5, a6, a7 ≥ 0.
The coefficient of a6 and a7 are large negative number in the objective function. Since the
objective function is to be maximized in the optimum solution, the artificial variables will be zero.
Therefore, the basic variable of the optimum solution are variable other than the artificial variables and
hence is a basic feasible solution of the original problem.
The successive calculation of simplex tables is as follows:
CB Basic Cj -12.5 -14.5 0 0 0 -M -M
variables XB x1 x2 s3 s4 s5 a6 a7
-M a6 2000 1 1 -1 0 0 1 0
-M a7 100000 40 75 0 -1 0 0 1
0 s5 200000 75 100 0 0 1 0 0
Since M is a large positive number, the coefficient of M in the z j – cj row would decide the entering
basic variable. As -76M < -41M, x 2 becomes a basic variable in the next iteration replacing a 7. The
artificial variable a7 can’t be re-entering as basic variable.
CB Basic Cj -12.5 -14.5 0 0 0 -M
variables XB x1 x2 s3 s4 s5 a6
Now x1 becomes a basic variable replacing a6. Like a7 the variable a6 also artificial variable so
it can’t be re-entering in the table.
Hence
The optimum solution of the problem is x1 = 10000/7, x2 = 4000/7 and
The Minimum Value of the Objective Function is: 26135.3
Multiple Solutions
The simplex method also helps in identifying multiple solutions of a linear programming
problem. This is explained with the help of the following Example.
Example
Consider the following linear programming
problem. Maximize
2000x1 + 3000x2
Subject to:
6x1 + 9x2 ≤ 100
2x1 + x2 ≤ 20
x1, x2 ≥ 0.
Dr. Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
Solution
Introduce the slack variables s3 and s4, so that the inequalities can be converted in to equation
as follows:
6x1 + 9x2 + s3 = 100
2x1 + x2 + s4 = 20
x1, x2, s3, s4 ≥ 0.
The computation of simple procedure and tables are as follows:
0 s3 100 6 9 1 0
0 s4 20 2 1 0 1
zj-cj 0 0 3000/9 0
Here zj-cj ≥ 0 for all the variables so that we can’t improve the simplex table any more. Hence it
is optimum.
The optimum solution is x1 = 0, x2 = 100/9 and
The maximum value of the objective function is: 100000/3 = 33333.33.
However, the zj-cj value corresponding to the non basic variable x1 is also zero. This indicates
that there is more than one optimum solution for the problem exists.
In order to calculate the value of the alternate optimum solution we have to introduce x1 as a
basic variable replacing s4. The next Table 3 shows the computation of this.
Dr. Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
Solution :
Introduce the slack variables s3 and s4, so that the inequalities becomes as equation as follows:
x1 + s3 = 7
x1 – x2 + s4 = 8
x1, x2, s3, s4 ≥ 0.
CB Basic Cj 5 4 0 0
variables XB x1 x2 s3 s4
0 s3 7 1 0 1 0
Dr. Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
0 s4 8 1 -1 0 1
zj-cj -5 -4 0 0
CB Basic Cj 5 4 0 0
variables XB x1 x2 s3 s4
5 x1 7 1 0 1 0
0 s4 1 0 -1 -1 1
zj-cj 0 -4 5 0
Note that z2-c2 < 0 which indicates x2 should be introduced as a basic variable in the next
iteration. However, both y12≤0, y22≤0.
Thus, it is not possible to proceed with the simplex method of calculation any further as we
cannot decide which variable will be non basic at the next iteration. This is the criterion for unbounded
solution.
NOTE: If in the course of simplex computation zj-cj < 0 but yij ≤ 0 for all i then the problem has no
finite solution.
But in this case we may observe that the variable x 2 is unconstrained and can be increased
arbitrarily. This is why the solution is unbounded.
This section illustrates how to identify the infeasible solution using simplex method. This is explained
with the help of the following Example.
Example
Consider the following problem.
Minimize
200x1 + 300x2
Subject to:
2x1 + 3x2 ≥ 1200
x1 + x2 ≤ 400
2x1 + 3/2x2 ≥ 900
x1, x2 ≥ 0
Dr. Lakshmi Tulasi Chavali Chadalawada Ramanamma Engineering College
Solution
Since it is a minimization problem we have to convert it into maximization problem and
introduce the slack, surplus and artificial variables. The problem appears in the following manner after
doing all these procedure.
Maximize
-200x1 - 300x2
Subject to:
2x1 + 3x2 -s3 +a6 = 1200
x1 + x2 +s4 = 400
2x1 + 3/2x2 - s5 + a7 = 900
x1, x2, s3, s4, s5, a6, a7 ≥ 0
Here the a6 and a7 are artificial variables. We use two phase method to solve this problem.
Phase I
Maximize
-a6 –a7
Subject to:
2x1 + 3x2 -s3 +a6 = 1200
x1 + x2 +s4 = 400
2x1 + 3/2x2 - s5 + a7 = 900
x1, x2, s3, s4, s5, a6, a7 ≥ 0
The calculation of simplex procedures and tables are as follows:
CB Basic Cj 0 0 0 0 0 -1 -1
variables XB x1 x2 s3 s4 s5 a6 a7
-1 a6 1200 2 3 -1 0 0 1 0
0 s4 400 1 1 0 1 0 0 1
-1 a7 900 2 3/2 0 0 -1 0 0
zj-cj -4 -9/2 1 0 1 0 0
Dr. Lakshmi Tulasi Chavali Chadalawada Ramanamma
Engineering College
CB Basic Cj 0 0 0 0 0 -1
variables XB x1 x2 s3 s4 s5 a7
0 s4 0 1/3 0 1/3 1 0 0
-1 a7 300 1 0 1/2 0 -1 1
zj-cj -1 0 -1/2 0 1 0
Table 2
CB Basic Cj 0 0 0 0 0 -1
variables XB x1 x2 s3 s4 s5 a7
0 x2 400 0 1 -1 -2 0 0
0 x1 0 1 0 1 3 0 0
-1 a7 300 0 0 -1/2 -3 -1 1
zj-cj 0 0 1/2 3 1 0
Note that zj-cj ≥ 0 for all the variables but the artificial variable a7 is still a basic
variable. This situation indicates that the problem has no feasible solution.