Assignment Problem
Assignment Problem
Assignment Problem
• An assignment problem seeks to minimize the total cost
of assignment of m worker to m jobs, given that the cost
of worker i performing job j is cij .
c21
2
c22 2
c23
c32
c31
3 c33 3
Workers Jobs
Assignment Problem
Linear Programming Formulation
Min cijxij
ij
s.t. xij = 1 for each worker i
j
xij = 1 for each job j
i
xij = 0 or 1 for all i and j
Assignment Problem Example
The Hungarian Method
1. Subtract row minimum from each element in the row
2. Subtract column minimum from each element in the
column
3. Cover the zeroes with as few lines as possible
4. If the number of lines = m = n, then optimal solution is
hidden in zeroes
5. Otherwise, find the minimum cost that is not covered by
any lines
1. Subtract it from all uncovered elements
2. Add it to all elements at intersections (covered by two lines)
6. Back to step 3
The Hungarian Method – Optimal Solution
How to identify the optimal solution:
Job (Hours)
A B C D
Machine 1 5 3 2 8
Machine 2 7 9 2 6
Machine 3 6 4 5 7
Machine 4 5 7 7 8
Example-4
Unbalanced Problem
Worker
I II III
Job A 9 12 11
Job B 8 13 17
Job C 20 12 13
Job D 21 15 17
Example-5
Unbalanced Problem
Job (Hours)
A B C D
M1 9 14 19 15
M2 7 17 20 19
M3 9 18 21 18
M4 10 12 18 19
M5 10 15 21 16
Example-6