Documente Academic
Documente Profesional
Documente Cultură
=
machine j the to assigned is job i the if
machine j the to assigned not is job
x
th th
th
ij
1
th
i the if 0
Since only one job is assigned to each machine, you have
=
n
1 i
x
ij
= 1 and
=
n
1 j
x
ij
= 1
Hence, the total assignment cost is given by
z =
= =
n
1 i
n
1 j
x
ij
c
ij
Thus the assignment problem takes the following mathematical form:
Determine x
ij
0 (i, j =1 n)
Minimise z =
= =
n
1 j
n
1 i
x
ij
c
ij
Subject to the constraints
=
n
1 i
x
ij =
1 j =1, 2, n
And
=
n
1 j
x
ij
= 1 i = 1, 2 n
With x
ij
= 0 or 1
Note: In an assignment problem, if you add a real number to or subtract a
real number from each element of a row or column of the cost matrix, then
the optimum assignment for the modified matrix is also optimum for the
original one.
Operations Research Unit 7
Sikkim Manipal University Page No. 137
Self Assessment Questions
1. In an AP, the constraints are of equality type. (True/False)
2. The number of facilities should be equal to the number of resources.
(True/False)
3. A balanced assignment problem is one where the number of rows the
number of columns. (True/False)
7.3 Hungarian Method Algorithm
Hungarian method algorithm is based on the concept of opportunity cost
and is more efficient in solving assignment problems. The following steps
are adopted to solve an AP using the Hungarian method algorithm.
Step 1: Prepare row ruled matrix by selecting the minimum values for each
row and subtract it from the other elements of the row.
Step 2: Prepare column-reduced matrix by subtracting minimum value of
the column from the other values of that column.
Step 3: Assign zero row-wise if there is only one zero in the row and cross
(X) or cancel other zeros in that column.
Step 4: Assign column wise if there is only one zero in that column and
cross other zeros in that row.
Step 5: Repeat steps 3 and 4 till all zeros are either assigned or crossed. If
the number of assignments is equal to number of rows present, you have
arrived at an optimal solution, if not, proceed to step 6.
Step 6: Mark () the unassigned rows. Look for crossed zero in that row.
Mark the column containing the crossed zero. Look for assigned zero in that
column. Mark the row containing assigned zero. Repeat this process till all
the makings are done.
Step 7: Draw a straight line through unmarked rows and marked column.
The number of straight line drawn will be equal to the number of
assignments made.
Step 8: Examine the uncovered elements. Select the minimum.
- Subtract it from the uncovered elements.
- Add it at the point of intersection of lines.
Operations Research Unit 7
Sikkim Manipal University Page No. 138
- Leave the rest as is.
- Prepare a new table.
Step 9: Repeat steps 3 to 7 till optimum assignment is obtained.
Step 10: Repeat steps 5 to 7 till number of allocations = number of rows.
The assignment algorithm applies the concept of opportunity costs. The cost
of any kind of action or decision consists of the opportunities that are
sacrificed in taking that action.
Example 1
Consider the problem of assigning five jobs to five persons. The
assignment costs are depicted in table 7.1.
Table 7.1: Assignment Costs Table
Determine the optimum assignment schedule.
Solution: Applying Hungarian method
Table 7.2: Row Reduced Matrix (Optimum Assignment Schedule)
Column reduced matrix will be the same as each columns minimum
value is zero. Then you can start assigning the jobs as depicted in table
7.3.
Operations Research Unit 7
Sikkim Manipal University Page No. 139
Table 7.3: Column Reduced Matrix
Since the number of assignments is 5.
Therefore, the optimum assignment schedule is A to 5, B to 1, C to 4,
D to 3, and E to 2.
Self Assessment Questions
4. In Hungarian method, you prepare row-reduced matrix. (True/False)
5. The number of assignments should be equal to the number of rows for
an optimum solution. (True/False)
6. There can be more than one allocation in a row. (True/False)
7.4 Routing Problem
7.4.1 Unbalanced AP
Unbalanced assignment problem is an assignment where the number of
rows is not equal to the number of columns and vice versa. For example,
the number of machines may be more than the number of jobs or the
number of jobs may be more than the number of machines. In such a
situation, you have to introduce dummy rows or columns in the matrix. The
dummy rows or columns will contain all cost elements as zero. This
balances the problem and then you can use Hungarian method to find the
optimal assignment.
Unbalanced assignment problem: No. of rows No. of columns.
Operations Research Unit 7
Sikkim Manipal University Page No. 140
Solved problem 1
Solve the following AP.
Table 7.4: Assignment Operations Table
Solution: Introducing a dummy row and applying Hungarian method,
you have:
Table 7.5: Reduced Matrix
Table 7.6: Optimum Assignment Solution
Hungarian method leads to multiple solutions. Selecting (0
3
, M
2
)
arbitrarily.
Therefore, the optimum assignment schedule is O
1
to M
1
, O
2
to M
3
, O
3
to M
2
, and O
4
to M
4
.
Operations Research Unit 7
Sikkim Manipal University Page No. 141
7.4.2 Infeasible assignments
It is sometimes possible that a particular person is incapable of doing certain
work or a specific job cannot be performed on a particular machine. The
solution of the assignment problem should take into account these
restrictions so that the infeasible assignment can be avoided. This can be
achieved by assigning a very high cost (say or M) to the cells where
assignments are prohibited, thereby, restricting the entry of this pair of job
machine or resource activity into the final solution. After inserting a high
value o at the cell we need to apply Hungarian method to solve the problem.
Solved problem 2
Solve the following A.P.
Table 7.7: Assignment Table
Solution: Introducing o in places having dashes and applying
Hungarian method, you have:
Table 7.8: Assignment Table
Table 7.9: Row-reduced Matrix
Operations Research Unit 7
Sikkim Manipal University Page No. 142
Table 7.10: Column Reduced Matrix
Therefore, the optimum assignment schedule is T
1
to P
1
, T
2
to P
4
, T
3
to
P
2
, and T
4
to P
3
.
7.4.3 Maximisation in AP
Some assignment problems are phrased in terms of maximising the profit or
effectiveness or payoff of an assignment of people to tasks or of jobs to
machines. You cannot apply the Hungarian method to such maximisation
problems. Therefore, you need to reduce it to a minimisation problem.
It is easy to obtain an equivalent minimisation problem by converting every
number in the table to an opportunity loss. To do so, you need to subtract
every value from the highest value of the matrix and then proceed as usual.
You will notice that minimising the opportunity loss produces the same
assignment solution as the original maximisation problem.
Operations Research Unit 7
Sikkim Manipal University Page No. 143
Solved problem 3
Solve the following maximisation assignment problem.
Table 7.11: Assignment Table
Solution: Since it is a maximisation problem, subtract every value from
the maximum value of 90. Thus you have:
Table 7.12: Opportunity Loss Table
Table 7.13: Row Reduced Matrix
Table 7.14: Column Reduced Matrix
Operations Research Unit 7
Sikkim Manipal University Page No. 144
Therefore, the optimum assignment schedule is C
1
to P
2
, C
2
to P
1
, C
3
to
P
3
, and C
4
to P
4
.
Case-let
A tailoring unit has four sewing machines of different makes. Each
machine is capable of stitching all the required designs and patterns.
However, the profit factor differs for each assignment. The unit is looking
at maximising profit.
To do so, the unit needs to carry out an optimal assignment exercise of
assigning the right jobs to the right machines.
Solved problem 4
Five different machines can do any of the required five jobs with
different profits resulting from each assignment as depicted in table
7.15.
Table 7.15: Five Different Machines and Their Jobs
Find out the maximum profit possible through optimal assignment.
Solution: To start with, convert an assignment problem of profit
maximisation type into an assignment problem of cost minimisation type.
To do so, form a new modified matrix by subtracting each entry of the
matrix from the greatest entry 62 of the matrix. Use the resulting matrix
to solve the problem of cost minimisation type.
Operations Research Unit 7
Sikkim Manipal University Page No. 145
Table 7.16: Opportunity Matrix
Now apply the Hungarian method to this problem and get the row and
column reduced matrices as depicted in table 7.17 and 7.18.
Table 7.17: Row Reduction Table 7.18: Column Reduction
Then draw the minimum number of lines to suppress the zeros as
depicted in table 7.19.
Table 7.19: Lines Suppressing Zeros
Here, number of lines drawn N = 4 < number of rows (= 5).
The smallest uncovered entry is 4. Therefore, subtract 4 from all
uncovered entries and add it to all the entries on the intersection of the
lines as depicted in table 7.20.
Operations Research Unit 7
Sikkim Manipal University Page No. 146
Table 7.20: Lines not Suppressing Zeros
Again draw minimum number of lines to cover all the zeros as depicted
in table 7.21.
Table 7.21: Number of Lines = Number of Rows
Here the number of lines drawn N = 5 = number of rows.
Mark the zero entry with that occurs exactly once in a row and cancel
that row or column as depicted in table 7.22.
Table 7.22: Number of Lines Number of Rows
After the above steps, row 2 has zero as the last entry, mark it with .
Now row 1 will have the third entry zero uncovered. Mark it with . So
row 4 will have only one entry in cell (4, 4) with zero. This gives you the
optimal assignment as depicted in table 7.23.
Operations Research Unit 7
Sikkim Manipal University Page No. 147
Table 7.23: Optimum Assignment
Thus, x
13
= x
25
= x
31
= x
44
= x
52
= 1 and rest all x
ij
= 0. The optimal
assignment is depicted in table 7.24.
Table 7.24: Optimal Assignment
Therefore, maximum profit is 214.
Self Assessment Questions
7. In unbalanced AP, the number of rows ________ to number of
columns.
8. Hungarian method cannot be applied directly to _________ problem.
9. If some jobs cannot be assigned to some machines, then it is called
_________ assignment problem.
7.5 Travelling Salesman Problem
Routing problem
Network scheduling is a technique for planning and scheduling of large
projects. It has successfully been applied in transportation and
Operations Research Unit 7
Sikkim Manipal University Page No. 148
communication problems. A typical network problem involves finding route
from one node (origin) to another (destination) between which alternative
paths are available at various stages of the journey. The problem is to select
the route that yields minimum cost. A number of different constraints may be
placed on acceptable routes for instance, not returning to the node passed
or passing through each node just once. These kinds of problems are called
as routing problems.
A wide variety of problems other than routing may be developed in
connection with the construction and utilisation of networks. Here, you are
going to consider the special type of routing problem that occurs frequently
in OR the travelling salesman problem.
Suppose a salesman has to visit n number of cities. He wishes to start from
a particular city, visit each city once, and then return to his starting point.
The objective is to select the sequence to visit the cities in such a way that
his total travelling time is minimised. Starting from a given city, the salesman
will have total of (n-1) different sequences. Further, since the salesman has
to visit all the n number of cities; the optimal solution remains independent
of selection of the starting point.
The problem can be represented as a network where the nodes and arcs
represent the cities and the distance between them respectively. Assume
that in a five city problem, a round trip of the salesman is given by the
following arcs.
(3,1), (1,2), (2,4), (4,5), (5,3)
These arcs in order are the first, second, third, fourth, and fifth directed arcs
for the trip. Generally the k
th
directed arc represents the k
th
leg of the trip that
is on leg k, the salesman travels from city i to city j.
(i, j = 1, 2 n;
j i =
)
To formulate the problem, whose solution will yield the minimum travelling
time, let the variables x
ijk
be defined as:
=
otherwise 0,
j city to i city from directed
th
k if 1, is
ijk
x
Where, i, j, and k are integers that vary between 1 and n.
Operations Research Unit 7
Sikkim Manipal University Page No. 149
Following are the constraints of the problem.
a) Only one directed arc may be assigned to a specific k, thus
j k
x
ijk
= 1 k =1, 2, 3n
j i =
b) Only one other city may be reached from a specific city i, thus
j k
x
ijk
=1, i = 1, 2, n
c) Only one other city can initiate a direct arc to a specified city j, thus
i k
x
ijk
=1, j =1, 2... n
d) Given the k
th
directed arc ends at some specific city j, the (k+1)
th
directed
arc must start at the same city j; thus
i
x
ijk
=
r
x
jr
( k +1) for all j and k.
j i =
j r =
These constraints ensure that the round trip will consist of connected
arcs. The objective function is to minimise
z =
i
j k
d
ij
x
ijk
j i =
Where d
ij
is the distance from city i to city j.
Self Assessment Questions
10. In travelling salesman problem, the objective is to visit each cities
________ __________.
11. Salesman has ________ different sequences if n is the number of
cities to be visited.
7.6 Summary
Let us recapitulate the important concepts discussed in this unit:
- This unit on assignment problems focuses on a special type of
transportation problem, where the objective is to allocate n number of
different facilities to n number of different tasks.
Operations Research Unit 7
Sikkim Manipal University Page No. 150
- Although an assignment problem can be formulated as a linear
programming problem, it is solved by a special method know as
Hungarian method.
- If the number of persons is the same as the number of jobs, the
assignment problem is said to be balanced. The unit also explains the
travelling salesman problem in brief.
7.7 Glossary
Opportunity cost matrix: A cost matrix that depicts the lost opportunity
when allocating resource to activity.
7.8 Terminal Questions
1. Four jobs are to be done on four different machines. The cost in rupees
for producing i
th
on the j
th
machine is given below:
Machines
M
1
M
2
M
3
M
4
J
1
15 11 13 15
J
2
17 12 12 13
J
3
14 15 10 14
J
4
16 13 11 17
Assign the jobs to different machines to minimise the total cost.
2. A marketing manager has 5 salesmen and 5 sales districts. Considering
the capabilities of the salesman and the nature of districts, the marketing
manager estimates that the sales per month (in hundred rupees) for
each salesman in each district would be as follows.
Sales districts
A B C D E
1 32 38 40 28 40
2 40 24 28 21 36
3 41 27 33 30 37
4 22 38 41 36 36
5 29 33 40 35 39
Find the assignment of salesman to districts that will result in maximum
sales.
Job
s
Salesman
Operations Research Unit 7
Sikkim Manipal University Page No. 151
3. In a plant layout, there are five vacant places. The plant orders four
machines to be installed in the vacant places. The cost of installing is as
follows:
M/G A B C D E
M
1
9 11 15 10 11
M
2
12 9 - 10 9
M
3
- 11 14 11 7
M
4
14 8 12 7 8
Find the optimum assignment.
4. Find the assignment that maximises the total sale.
Zone
Sales men 1 2 3 4
M
1
42 35 28 21
M
2
30 25 20 15
M
3
30 25 20 15
M
4
24 20 16 12
7.9 Answers
Self Assessment Questions
1. True
2. True
3. False
4. True
5. True
6. False
7.
8. Maximisation problem
9. Infeasible
10. Only once
11. (n-1)
Terminal Questions
1. The optimum assignment policy is
Job1 to machine 2, Job 2 to machine 4
Operations Research Unit 7
Sikkim Manipal University Page No. 152
Job 3 to machine1, Job 4 to machine 3
And the minimum assignment cost = Rs. (11+13+14+11) = Rs. 49.
Refer 7.3
2. Optimal assignment policy is salesman 1 to district B, 2 to A, 3 to E,
4 to C, and 5 to D. Hence the maximum sales = Rs.
(38+40+37+41+35)