Assignment Problem 24
Assignment Problem 24
and ∑ x ij =1 , j=1,2,…n, ensures that that only one machine is assigned and
i=1
Minimize Z=∑ ∑ c ij x ij
i=1 i
Hungarian Method:
Step 1: In a given problem, if the number of rows is not equal to the
number of columns and vice versa, then add a dummy row or a dummy
column. The assignment costs for dummy cells are always assigned as
zero.
Step 2: Reduce the matrix by selecting the smallest element in each row
and subtract with other elements in that row.
Step 3: Reduce the new matrix column-wise using the same method as
given in step 2.
Step 8: Write down the assignment results and find the minimum cost/time.
Note: While assigning, if there is no single zero exists in the row or column,
choose any one zero and assign it. Strike off the remaining zeros in that
column or row, and repeat the same for other assignments also. If there is
no single zero allocation, it means multiple numbers of solutions exist. But
the cost will remain the same for different sets of allocations.
Example: A car hire company has one car at each of five depots a, b, c,
d and e. a customer requires a car in each town namely A, B, C, D and E.
Distance (kms) between depots (origins) and towns (destinations) are
given in the following distance matrix
a b c d e
A 160 130 175 190 200
B 135 120 130 160 175
C 140 110 155 170 185
D 50 50 80 80 110
E 55 35 70 80 105
Solution
Matrix
N = 5, n = 5
Since N = n, we move on to
zero assignment Zero
assignment
Example : Assign the four tasks to four operators. The assigning costs are
given in the Table given below.
Operators
1 2 3 4
( )
1 20 28 19 13
2 15 30 31 28
Tasks 3 40 21 20 17
4 21 28 26 12
Solution:
Step 1: The given matrix is a square matrix and it is not necessary to add a
dummy row/column
Step 2: Reduce the matrix by selecting the smallest value in each row and
subtracting from other values in that corresponding row. In row A, the
smallest value is 13, row B is 15, row C is 17 and row D is 12. The row
wise reduced matrix is shown in table below.
Row-wise Reduction
Operators
1 2 3 4
( )
1 7 15 6 0
2 0 15 16 13
Tasks 3 23 4 3 0
4 9 16 14 0
Step 3: Reduce the new matrix given in the following table by selecting the
smallest value in each column and subtract from other values in that
corresponding column. In column 1, the smallest value is 0, column 2 is 4,
column 3 is 3 and column 4 is 0. The column-wise reduction matrix is
shown in the following table.
Column-wise Reduction Matrix
Operators
1 2 3 4
( )
A 7 11 3 0
B 0 11 13 13
Tasks C 23 0 0 0
D 9 12 11 0
Step 4: Draw minimum number of lines possible to cover all the zeros in
the matrix given in Table
Matrix with all Zeros Covered
Operators
1 2 3 4
( )
A 7 11 3 0
B 0 11 13 13
Tasks C 23 0 0 0
D 9 12 11 0
The first line is drawn crossing row C covering three zeros, second line is
drawn crossing column 4 covering two zeros and third line is drawn
crossing column 1 (or row B) covering a single zero.
Step 5: Check whether number of lines drawn is equal to the order of the
matrix, i.e., 3 ≠ 4. Therefore optimality is not reached. Go to step 6.
Step 6: Take the smallest element of the matrix that is not covered by
single line, which is 3. Subtract 3 from all other values that are not covered
and add 3 at the intersection of lines. Leave the values which are covered
by single line. The following table shows the details.
Operators
1 2 3 4
( )
A 7 8 0 0
B 0 8 10 13
Tasks C 26 0 0 3
D 9 9 8 0
Step 7: Now, draw minimum number of lines to cover all the zeros and
check for optimality. Here in table minimum number of lines drawn is 4
which are equal to the order of matrix. Hence optimality is reached.
Operators
1 2 3 4
( )
A 7 8 0 0
B 0 8 10 13
Tasks C 26 0 0 3
D 9 9 8 0
Optimality Matrix
Step 8: Assign the tasks to the operators. Select a row that has a single
zero and assign by squaring it. Strike off remaining zeros if any in that row
or column. Repeat the assignment for other tasks. The final assignment is
shown in table below.
Final Assignment