The document discusses the assignment problem and various methods to solve it. The assignment problem involves assigning jobs to workers or other resources in an optimal way according to certain criteria like minimizing time or cost. The Hungarian assignment method is described as a multi-step algorithm to find the optimal assignment between jobs and workers/resources. It involves creating a cost matrix and performing row and column reductions to arrive at a matrix with zeros that indicates the optimal assignment. The document also briefly discusses handling unbalanced and constrained assignment problems.
1 of 48
Downloaded 1,107 times
More Related Content
Assignment problem
2. Assignment Problem
How to assign the given jobs to some workers on a one-
to-one basis so that the jobs are completed in the least
time or at the least cost.
How to deal with situations when the number of jobs
do not match with the number of job performers.
How should the salesmen of a company be assigned to
different sales zones so that the total expected sales are
maximised?
How to schedule the flights or the bus routes between
two cities so that the layover times for the crew can be
minimised?
3. A) complete enumeration method
B) Transportation method
C) Simplex method
D) Hungarian assignment method
4. Ex. A production supervisor is considering how he should
assign the four jobs that are to be performed, to four of the
workers. He wants to assign the jobs to the workers such
that the aggregate time to perform the jobs is the least.
Based on previous experience, he has the information on
the time taken by the four workers in performing these
jobs, as given in table.
Worker Job
A B C D
1 45 40 51 67
2 57 42 63 55
3 49 52 48 64
4 41 45 60 55
5. Initial Solution : VAM
Worker Job Supply
A B C D
1 45 [ɛ ] 40 [ɛ ] 51 67 [1] 1
2 57 42 [1] 63 55 1
3 49 [ɛ ] 52 48 [1] 64 1
4 41 [1] 45 60 55 1
Demand 1 1 1 1 4
Total Time : 1 x 67 + 1 x 42 + 1 x 48 + 1 x 41 = 198
8. Worker Job Supply ui
A B C D
1 45 [ɛ ] 40 [1 ] (-7) 51 ( -14) 67 1 0
2 (-10) 57 42 [ɛ] (-17) 63 55 [1] 1 2
3 49 [ɛ ] (-8) 52 48 [1] (-7) 64 1 4
4 41 [1] (-9) 45 (-20) 60 (-6) 55 1 -4
Demand 1 1 1 1 4
vj 45 40 44 53
Initial Solution : optimal
Total Time = 1 x 40 + 1 x 55 + 1 x 48 + 1 x 41 = 184
9. Hungarian Assignment Method (HAM)
Step 1 : Locate the smallest cost element in each row of the cost table.
Now subtract this smallest element from each element in that row.
As a result, there shall be at least one zero in each row of the new
table, called the Reduced cost table.
Step 2: In this reduced cost table obtained, consider each column and
locate the smallest element in it. Subtract the smallest value from
every other entry in the column. As a result, there would be at least
one zero in each of the rows and columns of the second reduced
cost table.
Step 3: Draw the minimum number of horizontal and vertical lines
that are required to cover all the ‘Zero’. If the number of lines drawn
is equal to n (the number of rows/columns) the solution is optimal,
and proceed to step 6. If the number of lines drawn is smaller than
n, go to step 4.
Step 4: Select the smallest uncovered (by the lines) cost element.
Subtract this element from all uncovered elements including itself
and add this element to each value located at the intersection of
any two lines.
Step 5: Repeat steps 3 and 4 until an optimal solution is obtained.
10. Step 6: Make the job assignments to ‘Zero’ elements.
a) Locate a row which contains only one ‘zero’ element. Assign the job
corresponding to this element. Cross out the zeros, if any, in the
column corresponding to the element
b) Repeat (a) for each of such rows which contain only one zero.
Similarly, perform the same operation in respect of each column
containing only one ‘zero’, crossing out the zero, if any, in the row
c) If there is no row or column with only a single ‘Zero’ left, then select a
row/column arbitrarily and choose one of the jobs and make the
assignment. Now cross the remaining zeros in the column and row in
respect of which the assignment is made.
d) Repeat steps (a) through (c) until all assignments are made.
e) Determine the total cost with reference to the original cost table
11. Ex. Worker Job
A B C D
1 45 40 51 67
2 57 42 63 55
3 49 52 48 64
4 41 45 60 55
Step 1 : Locate the smallest cost element in each row of the cost table.
Now subtract this smallest element from each element in that row. As a
result, there shall be at least one zero in each row of the new table,
called the Reduced cost table.
12. Worker Job
A B C D
1 5 0 11 27
2 15 0 21 13
3 1 4 0 16
4 0 4 19 14
Step 1
Step 1 : Locate the smallest cost element in each row of the cost table.
Now subtract this smallest element from each element in that row. As a
result, there shall be at least one zero in each row of the new table,
called the Reduced cost table.
13. Worker Job
A B C D
1 5 0 11 27
2 15 0 21 13
3 1 4 0 16
4 0 4 19 14
Step 2: In this reduced cost table obtained, consider each column
and locate the smallest element in it. Subtract the smallest value
from every other entry in the column. As a result, there would be
at least one zero in each of the rows and columns of the second
reduced cost table.
14. Step 2
Worker Job
A B C D
1 5 0 11 14
2 15 0 21 0
3 1 4 0 3
4 0 4 19 1
Step 2: In this reduced cost table obtained, consider each column
and locate the smallest element in it. Subtract the smallest value
from every other entry in the column. As a result, there would be
at least one zero in each of the rows and columns of the second
reduced cost table.
15. Step 3 & 4
Worker Job
A B C D
1 5 0 11 14
2 15 0 21 0
3 1 4 0 3
4 0 4 19 1
Step 3: Draw the minimum number of lines covering all zeros. As a
general , we should first cover those rows/columns which contain
larger number of zeros.
Step 3: Count the number of lines. Which is 4, equal to number of
rows/column, so optimal solution is obtained.
16. Step 4
Worker Job
A B C D
1 5 0 11 14
2 15 0 21 0
3 1 4 0 3
4 0 4 19 1
Step 4: Make the assignment after scanning the rows and columns
for unit zeros.
Total Time = 40 + 55 + 48 + 41 = 184 minutes
17. Ex. Using the following cost matrix, determine (a)
optimal job assignment and (b) the cost of
assignments.
Machini
st
Job
1 2 3 4 5
A 10 3 3 2 8
B 9 7 8 2 7
C 7 5 6 2 4
D 3 5 8 2 4
E 9 10 9 6 10
18. Step 1: Obtain row reduction
Machini
st
Job
1 2 3 4 5
A 8 1 1 0 6
B 7 5 6 0 5
C 5 3 4 0 2
D 1 3 6 0 2
E 3 4 3 0 4
19. Step 2: Obtain column reduction
Machini
st
Job
1 2 3 4 5
A 7 0 0 0 4
B 6 4 5 0 3
C 4 2 3 0 0
D 0 2 5 0 0
E 2 3 2 0 2
Since the number of lines covering all zeros is less than the number of
columns/rows, we have to modify the table
The lest of the uncovered cell values is 2. this would be subtracted from each of
the uncovered values and added to each value lying at the intersection of lines.
20. Step 3:Reduced cost table
Machini
st
Job
1 2 3 4 5
A 7 0 0 2 6
B 4 2 3 0 3
C 2 0 1 0 0
D 0 2 5 2 2
E 0 1 0 0 2
Number of lines is 5 and number of rows/columns are 5, so solution is
optimal
21. Step 4:Assignment of Job
Machini
st
Job
1 2 3 4 5
A 7 0 0 2 6
B 4 2 3 0 3
C 2 0 1 0 0
D 0 2 5 2 2
E 0 1 0 0 2
Total cost associated = 3 + 2 + 4 + 3 + 9 = 21
22. Solve the following assignment Problem by Hungarian assignment
method
Worker Job
1 2 3
A 4 2 7
B 8 5 3
C 4 5 6
23. Step 1 : Obtain Row reduction
Worker Job
1 2 3
A 2 0 5
B 5 2 0
C 0 1 2
Ans. A-2, B-3, C-1, Total Time = 2 + 3 + 4 = 9 Minutes.
24. ABC company is engaged in manufacturing 5 brands of packed snacks. It has
five manufacturing setups, each capable of manufacturing any of its brands one
at a time. The cost to make a brand on these setups vary according to the
following table.
Machini
st
Setup
S1 S2 S3 S4 S5
B1 4 6 7 5 11
B2 7 3 6 9 5
B3 8 5 4 6 9
B4 9 12 7 11 10
B5 7 5 9 8 11
Assuming five setups and five brands, find the optimum
assignment of products on these setups resulting in the
minimum cost
26. Step 2: Obtain column reduction
Machini
st
Setup
S1 S2 S3 S4 S5
B1 0 2 3 0 5
B2 4 0 3 5 0
B3 4 1 0 1 3
B4 2 5 0 3 1
B5 2 0 4 2 4
Since the number of lines covering all zeros is less than the number of
columns/rows, we have to modify the table
The lest of the uncovered cell values is 1. This would be subtracted from each of
the uncovered values and added to each value lying at the intersection of lines.
27. Machini
st
Setup
S1 S2 S3 S4 S5
B1 0 3 4 0 5
B2 4 1 4 5 0
B3 3 1 0 0 2
B4 1 5 0 2 0
B5 2 0 4 1 3
Step 3: Reduce cost table
Since the number of lines covering all zeros is equal to columns/rows,
so solution is optimal
29. Unbalanced assignment Problems
When number of columns and number of rows are
equal, the problem is balanced problem, and when
not, it is called an unbalanced problem.
In such situations, dummy column/row, whichever is
smaller in number, are inserted with zeros as the cost
elements.
30. Constrained Assignment problems
Sometimes a worker cannot perform a certain job or is
not to be assigned a particular job. To cope with this
situation, the cost of performing that job by such
person is taken to be extremely large (M).
33. Person Job
J1 J2 J3 J4 J5
P1 9 0 M 2 3
P2 19 12 9 0 5
P3 4 1 4 M 0
P4 6 12 4 0 11
P5
(Dummy)
0 0 0 0 0
Step 1: Reduce row/column table
Since the number of lines covering all zeros is not equal to
columns/rows, so solution is not optimal
34. Person Job
J1 J2 J3 J4 J5
P1 9 0 M 6 3
P2 15 8 5 0 1
P3 4 1 4 M 0
P4 2 8 0 0 7
P5
(Dummy)
0 0 0 4 0
Step 2: Reduce cost table
Since the number of lines covering all zeros is equal to columns/rows,
so solution is optimal
36. In the modification of a plant layout of a factory four new
machines M1, M2, M3, and M4 are to be installed in the machine
shop. There are five vacant places A, B, C, D and E available.
Because of limited space, machine M2 cannot be placed at C and
M3 cannot be placed at A. The cost of locating a machine at a
place in hundreds of rupees is as under
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
Find the optimal assignment schedule.
37. Step 1: Reduce row/column table
A B C D E
M1 0 2 6 1 2
M2 3 0 M 1 0
M3 M 4 7 4 0
M4 7 1 5 0 1
M5
(dummy)
0 0 0 0 0
Since the number of lines covering all zeros is equal to
columns/rows, so solution is optimal
38. Step 2: Assignment
A B C D E
M1 0 2 6 1 2
M2 3 0 M 1 0
M3 M 4 7 4 0
M4 7 1 5 0 1
M5
(dummy)
0 0 0 0 0
Ans: Assignment is M1-A, M2-B, M3-E, M4-D, Place C will
be unassigned. Total cost in hundreds of rupees =
9+9+7+7=32.
39. Unique vs Multiple optimal solutions
In the process of making assignments, we select a
row/column with only a single zero to make an assignment.
However, a situation may arise wherein the various rows
and columns have multiple zeros.
In such cases, we get multiple optimal solutions to the
given problem.
40. Worker Job (Cost in Rs.)
1 2 3 4 5
A 25 18 32 20 21
B 34 25 21 12 17
C 20 17 20 32 16
D 20 28 20 16 27
41. Worker Job (Cost in Rs.)
1 2 3 4 5
A 25 18 32 20 21
B 34 25 21 12 17
C 20 17 20 32 16
D 20 28 20 16 27
E
(dummy)
0 0 0 0 0
Step 1: Reduce row table
42. Worker Job (Cost in Rs.)
1 2 3 4 5
A 7 0 14 2 3
B 22 13 9 0 5
C 4 1 4 16 0
D 4 12 4 0 11
E
(dummy)
0 0 0 0 0
Since the number of lines covering all zeros is not equal to
columns/rows, so solution is not optimal
43. Worker Job (Cost in Rs.)
1 2 3 4 5
A 7 0 14 6 3
B 18 9 5 0 1
C 4 1 4 20 0
D 0 8 0 0 7
E
(dummy)
0 0 0 0 0
44. Worker Job (Cost in Rs.)
1 2 3 4 5
A 7 0 14 6 3
B 18 9 5 0 1
C 4 1 4 20 0
D 0 8 0 0 7
E
(dummy)
0 0 0 0 0
Solution 1
45. Worker Job (Cost in Rs.)
1 2 3 4 5
A 7 0 14 6 3
B 18 9 5 0 1
C 4 1 4 20 0
D 0 8 0 0 7
E
(dummy)
0 0 0 0 0
Solution 2
46. Solution 1
Worker Job Cost
A 2 18
B 4 12
C 5 16
D 1 20
Job left 3
Total
cost
66
Solution 2
Worker Job Cost
A 2 18
B 4 12
C 5 16
D 3 20
Job left 1
Total
cost
66
47. To stimulate interest and provide an atmosphere for intellectual
discussion, the finance faculty in a management school decides to
hold special seminars on four contemporary topics. Such seminars
would be held once per week in the afternoons. However,
scheduling these seminars (one for each topic, and not more than
one seminar per afternoon) has to be done carefully so that the
number of students unable to attend is kept to a minimum. A
careful study indicated that the number of students who cannot
attend a particular seminar on a specific day is as follows:
Day Leasing Portfolio
Managem
ent
Private
Mutual
Funds
Swaps
and
Options
Monday 50 40 60 20
Tuesday 40 30 40 30
Wednesday 60 20 30 20
Thursday 30 30 20 30
Friday 10 20 10 30
Find an optimal schedule of the seminars. Also find out the total number of students
who will be missing at least one seminar.