6 Assignment Problem
-
Upload
kumar-vikas -
Category
Documents
-
view
950 -
download
2
Transcript of 6 Assignment Problem
![Page 1: 6 Assignment Problem](https://reader035.fdocuments.net/reader035/viewer/2022073101/547f26e25906b5a6718b47e4/html5/thumbnails/1.jpg)
Operations Research Unit 6
Sikkim Manipal University 98
Unit 6 Assignment Problem
Structure
6.1. Introduction
6.2. Mathematical formulation of the problem
6.3. Hungarian method algorithm
6.4. Routing problem
6.4.1. Unbalanced A.P
6.4.2 Infeasible Assignments
6.4.3 Maximization in A.P
6.5. Traveling salesmen problem
6.6. Summary
Terminal Questions
Answers to SAQs and TQs
6.1 Introduction
The assignment problem is a special case of the transportation problem, where the objective is to
minimize the cost or time of completing a number of jobs by a number of persons and Maximize
efficiently Revenue, sales etc In other words, when the problem involves the allocation of n
different facilities to n different tasks, it is often termed as an assignment problem. This model is
mostly used for planning. The assignment model is also useful in solving problems such as,
assignment of machines to jobs, assignment of salesman to sales territories, traveling salesman
problem etc. It may be noted that with n facilities and n jobs, there are n! possible assignments.
One way of finding an optimal assignment is to write all the n! possible arrangement ,evaluate
their total cost and select the assignment with minimum cost. But because of many computational
procedures this method is not possible. In this unit we study an efficient method for solving
assignment problems.
There are n jobs for a factory and factory has n machines to process the jobs. A job i(=1,…,n) ,
when processed by machine j(=1,…,n) is assumed to incur a cost Cij.The assignment is to be
made in such a way that each job can associate with one and only one machine Determine an
assignment of jobs to machines so as to minimize the overall cost.
![Page 2: 6 Assignment Problem](https://reader035.fdocuments.net/reader035/viewer/2022073101/547f26e25906b5a6718b47e4/html5/thumbnails/2.jpg)
Operations Research Unit 6
Sikkim Manipal University 99
Learning Objectives
After studying this unit, you should be able to understand the following
1. At the end of this unit the students formulate a assignment problem Mathematically. 2. Solves a routing problem. 3. Analysis a traveling salesman problem. 4. Know the significance of the assignment problem. 5. Apply the Hungarian method to solve the problem. 6. Solve the practical problems like routing problem and traveling salesman problem.
6.2 Mathematical Formulation Of The Problem Let xij be a variable defined by
= . machine j the to assigned is job i the if 1
machine j the to assigned not is job i the if 0 x th th
th th ij
Then, since only one job is to be assigned to each machine we have
∑=
n
1 i xij = 1 and ∑
=
n
1 j xij = 1
Also the total assignment cost is given by
z = ∑ ∑ = =
n
1 i
n
1 j xij cij
Thus the assignment problem takes the following mathematical form
Determine xij ≥ 0 (i , j =1,…, n)
So as to minimize
z = ∑ ∑ = =
n
1 j
n
1 i xij cij
Subject to the constraints
∑=
n
1 i xij = 1 j =1, 2,…, n
![Page 3: 6 Assignment Problem](https://reader035.fdocuments.net/reader035/viewer/2022073101/547f26e25906b5a6718b47e4/html5/thumbnails/3.jpg)
Operations Research Unit 6
Sikkim Manipal University 100
and ∑=
n
1 j xij = 1 i = 1, 2,…, n
with xij = 0 or 1
Note: In an assignment problem if we add (or subtract) a real number to (from) every element of
a row or column of the cost matrix, then an assignment which is optimum for the modified matrix
is also optimum for the original one.
Self Assessment Questions 1
State True or False
1. In A.P the constraints are of equality type.
2. The no. of facilities should be equal to no. of resources.
3. The decision variables can take any value.
6.3 Hungarian Method: Algorithm
Step 1: Prepare Row ruled Matrix by selecting the minimum values for each row and subtract it from 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: First rowwise assign a zero by if there is only one zero in the row and cross (X) other zeros in that column.
Step 4: Now assign column wise if there is only one zero in that column and cross other zeros in that row.
Repeat Step 3 and 4 till all zeros are either assigned or crossed. If the number of assignments
made is equal to number of rows present, then it is the optimal solution otherwise proceed as
follows. Step 5: Mark (P) the row which is not assigned. 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 makings are over. Step 6: Draw straight line through unmarked rows and marked column. The number of straight line drawn will be equal to number of assignments made. Step 7: Examine the uncovered elements. Select the minimum.
![Page 4: 6 Assignment Problem](https://reader035.fdocuments.net/reader035/viewer/2022073101/547f26e25906b5a6718b47e4/html5/thumbnails/4.jpg)
Operations Research Unit 6
Sikkim Manipal University 101
a. Subtract it from uncovered elements.
b. Add it at the point of intersection of lines.
c. Leave the rest as it is.
Prepare a New Table. Step 8: Repeat Steps 3 to 7 till number of allocations = Number of rows.
Example 1: Find the optimum assignment so as to minimize the cost.
Persons Jobs 1 2 3 4 5
A
B
C
D
E
8 4 2 6 1
0 9 5 5 4
3 8 9 2 6
4 3 1 0 3
9 5 8 9 5
Example: Consider the problem of assigning five jobs to five persons. The assignment costs are given as
follows.
Persons Job
1 2 3 4 5 A 8 4 2 6 1 B 0 9 5 5 4 C 3 8 9 2 6 D 4 3 1 0 3 E 9 5 8 9 5
Determine the optimum assignment schedule.
Solution:
Persons Jobs 1 2 3 4 5
A B C
7 3 1 5 0 0 9 5 5 4 1 6 7 0 4
![Page 5: 6 Assignment Problem](https://reader035.fdocuments.net/reader035/viewer/2022073101/547f26e25906b5a6718b47e4/html5/thumbnails/5.jpg)
Operations Research Unit 6
Sikkim Manipal University 102
D E
4 3 1 0 3 4 0 3 4 0
Solution: Applying Hungarian Method Row reduced Matrix
Persons Jobs
1 2 3 4 5
A
B
C
D
E
7 3 1 5 0
0 9 5 5 4
1 6 7 0 4
4 3 1 0 3
4 0 3 4 0
Column reduced Matrix: Will be same as each column’s minimum value is zero. We start
assigning the jobs
Jobs P
Persons 1 2 3 4 5
A
B
PC
PD
E
7 3 0 5
9 4 5 4
1 6 6 4
4 3 x 3
4 2 4 x
Since the number of assignments = 5. It is the optimum solution.
Optimum solution
A to 5 1
B to 1 0
C to 4 2
D to 3 1
E to 2 5
9 Total cost Self Assessment Questions 2
0 0
0
0 0
![Page 6: 6 Assignment Problem](https://reader035.fdocuments.net/reader035/viewer/2022073101/547f26e25906b5a6718b47e4/html5/thumbnails/6.jpg)
Operations Research Unit 6
Sikkim Manipal University 103
State Yes / No
1. In Hungarian method first we prepare rowreduced matrix 2. The number of assignments should be equal to number of rows for optimum solution. 3. There can be more than one allocation in a row.
6.4 Routing Problem Network scheduling is a technique for planning and scheduling of large projects. It has
successfully been applied in transportation and communication problems .A typical network
problem consists of 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
e.g.: not returning to the node already passed through or passing through every node once and
only once. Problems of such type are called as routing problems.
Although a wide variety of problems other than routing may be developed in connection with the construction and utilization of networks. Here we consider the special type of routing problem that occurs frequently in O .R. the travelling salesman problem.
6.4.1. Unbalanced A.P
If the number of rows ≠ number of column then it is an unbalanced A.P. We introduce either a dummy row or dummy column and proceed as usual.
Example 2:
Operations Machines M1 M2 M3 M4
01
02
03
10 15 12 11
9 10 9 12
15 16 16 17
Solution: Introducing a dummy row and applying Hungarian method, we have
Operations Machines M1 M2 M3 M4
01 10 15 12 11
![Page 7: 6 Assignment Problem](https://reader035.fdocuments.net/reader035/viewer/2022073101/547f26e25906b5a6718b47e4/html5/thumbnails/7.jpg)
Operations Research Unit 6
Sikkim Manipal University 104
02
03
04
9 10 9 12
15 16 16 16
0 0 0 0
Row reduced Matrix and assigning
Operations Machines M1 M2 M3 M4
01
02
03
04
5 2 1
x 1 3
x 1 1 1
x x x
Iteration 1
Operations Machines M1 M2 M3 M4
01
02
03
04
4 1 x
1 1 3
x x x
1 x x
Hungarian Method leads to Multiple solution. Selecting (03, M2) arbitrarily
The optimum solution is
01 to M1 10
02 to M3 9
03 to M2 16
04 to M4 0
35 Total Wastages
0
0
0
0
0
0
0
![Page 8: 6 Assignment Problem](https://reader035.fdocuments.net/reader035/viewer/2022073101/547f26e25906b5a6718b47e4/html5/thumbnails/8.jpg)
Operations Research Unit 6
Sikkim Manipal University 105
6.4.2. Infeasible Assignments Certain jobs cannot be assigned to certain Machines or operators. We insert a high value α at
these cells and Apply Hungarian Method.
Example 3:
Solve the following A.P
Territory P1 P2 P3 P4
T1
T2
T3
T4
20 32 27
15 20 17 18
16 18 20
20 18 24
Solution: Introducing “α” at dashes places and applying Hungarian Method. We have
P1 P2 P3 P4
T1
T2
T3
T4
20 α 32 27
15 20 17 18
16 18 α 20
α 20 18 24
Rowreduced Matrix
P1 P2 P3 P4
T1
T2
T3
T4
0 α 12 7
0 5 2 3
0 2 α 4
α 2 0 6 Column reduced Matrix
P1 P2 P3 P4
T1
T2
T3
T4
α 12 4
x 3 2
x α 1
α x 3
∴Optimum assignment is
0
0
0
0
![Page 9: 6 Assignment Problem](https://reader035.fdocuments.net/reader035/viewer/2022073101/547f26e25906b5a6718b47e4/html5/thumbnails/9.jpg)
Operations Research Unit 6
Sikkim Manipal University 106
T1 to P1 20
T2 to P4 18
T3 to P2 18
T4 to P3 18
74 Total Cost
6.4.3. Maximization In A.P
Hungarian Method cannot be applied to maximization problems. Therefore we reduce it to
maximization problem by subtracting every value form the highest value of the Matrix and then
proceed as usual.
Example 4: Solve the following A.P Efficiency Matrix
Classes Professors P1 P2 P3 P4
C1
C2
C3
C4
70 75 80 65
80 70 65 75
75 76 85 80
60 65 70 90
Solution: Since it is a Maximization problem we subtract every value from the maximum value of
90. We have.
Professors P1 P2 P3 P4
C1
C2
C3
C4
20 15 10 25
10 20 25 15
15 20 5 10
30 25 20 0
Row reduced Matrix
P1 P2 P3 P4
C1
C2
C3
10 5 0 15
0 10 15 5
10 15 0 5
![Page 10: 6 Assignment Problem](https://reader035.fdocuments.net/reader035/viewer/2022073101/547f26e25906b5a6718b47e4/html5/thumbnails/10.jpg)
Operations Research Unit 6
Sikkim Manipal University 107
C4 30 25 20 0
Column Reduced Matrix
P1 P2 P3 P4
C1
C2
C3
C4
10 12 4
5 15 5
10 10 5
30 20 20
∴ Optimum Solution
C1 – P2 75
C2 – P1 80
C3 – P3 85
C4 – P4 90
330 Max Efficiency
Self Assessment Questions 3 Fill in the blanks
1. In unbalanced T.P number of rows__________ to number of column. 2. Hungarian method cannot be applied directly to _________ problem. 3. If some jobs cannot be assigned to some M/cs then it is called _________ assignment
problem.
6.5 Traveling Salesman Problem Suppose the salesman has to visit n 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 in which the cities are visited in such a way that his total traveling time is minimized. .Clearly starting from a given city, the salesman will have total of (n1)! different sequences .Further, since the salesman has to visit all the n 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
0
0
0
0
![Page 11: 6 Assignment Problem](https://reader035.fdocuments.net/reader035/viewer/2022073101/547f26e25906b5a6718b47e4/html5/thumbnails/11.jpg)
Operations Research Unit 6
Sikkim Manipal University 108
salesman is given by the following arcs.
(3,1) ,(1,2) ,(2,4) ,(4,5) ,(5,3)
These arcs taken 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. i.e. 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 traveling time ,let the variables xijk be defined as
= otherwise 0,
j city to i city from is are directed k if 1, x th
ijk
Where i, j and k are integers that vary between 1 and n.
Following are the constraints of the problem. (a) Only one directed arc may be assigned to a specific k ,
Thus
∑ ∑ j k
xijk = 1 k =1, 2, 3…n
j i ≠
(b) Only one other city may be reached from a specific city i, thus
∑ ∑ j k
xijk =1, i = 1, 2…, n
(c) Only one other city can initiate a direct arc to a specified city j,thus
∑ ∑ i k
xijk =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
xijk = ∑ r
xjr ( 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 minimize
z = ∑i
∑ ∑ j k
dij xijk j i ≠
![Page 12: 6 Assignment Problem](https://reader035.fdocuments.net/reader035/viewer/2022073101/547f26e25906b5a6718b47e4/html5/thumbnails/12.jpg)
Operations Research Unit 6
Sikkim Manipal University 109
Where dij is the distance from city i to city j.
Self Assessment Questions 4 Fill in the blanks
1. In traveling salesmen problem the objective is to visit each cities ________ __________. 2. Salesman has ________ different sequences if n is the number of cities to be visited.
6.6 Summary In this unit, we focused on a special type of transportation problem. where the objective was to
allocate n different facilities to n different tasks .Although an assignment problem can be
formulated as a linear programming problem, it is solved by 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. Lastly a brief introduction was given about the traveling salesman problem.
Terminal Questions 1. Four jobs are to be done on four different machines. The cost in(rupees) of producing i th on
the j th machine is given below:
Machines M1 M2 M3 M4
J1 15 11 13 15
J2 17 12 12 13
J3 14 15 10 14
J4 16 13 11 17
Assign the jobs to different machines so as to minimize 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 sales per month
(in hundred rupees) for each salesman in each district would be as follows.
Jobs
![Page 13: 6 Assignment Problem](https://reader035.fdocuments.net/reader035/viewer/2022073101/547f26e25906b5a6718b47e4/html5/thumbnails/13.jpg)
Operations Research Unit 6
Sikkim Manipal University 110
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.
3. In a plant layout there are five vacant places. The plant orders four Machines to be installed
in these places. The cost of installing is as follows find the optimum assignment.
M/G A B C D E M1 9 11 15 10 11 M2 12 9 10 9 M3 11 14 11 7 M4 14 8 12 7 8
4. Find the assignment that maximizes the total sale.
Zone
Sales men 1 2 3 4
M1 42 35 28 21
M2 30 25 20 15
M3 30 25 20 15
M4 24 20 16 12
Answers For Self Assessment Questions Self Assessment Questions 1
1. True 2. True 3. False
Salesman
![Page 14: 6 Assignment Problem](https://reader035.fdocuments.net/reader035/viewer/2022073101/547f26e25906b5a6718b47e4/html5/thumbnails/14.jpg)
Operations Research Unit 6
Sikkim Manipal University 111
Self Assessment Questions 2
1. True 2. True 3. False
Self Assessment Questions 3
1. ≠
2. Maximisation problem
3. Infeasible
Self Assessment Questions 4
1. Only once 2. (n 1)!
Answer to Terminal Questions (1) The optimum assignment policy is
Job1 to machine 2, Job 2 to machine 4
Job 3 to machine1, Job 4 to machine3.
and the minimum assignment Cost = Rs. (11+13+14+11) = Rs. 49.
(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)×100 =
Rs. 19,100.
(3) M1 – A2; M2 – B; M3 – E; M4 – D Total 38
(4) M1 – 1; M2 – 2; M3 – 3; M4 – 4 Total 99