Solution
This is the cost matrix.
Subtract row minima
For each row, the minimum element is subtracted from all elements in that row.
| 21 | 0 | 77 | (-1) |
| 36 | 42 | 0 | (-6) |
| 4 | 50 | 0 | (-34) |
Subtract column minima
For each column, the minimum element is subtracted from all elements in that column.
Cover all zeros with a minimum number of lines
A total of 3 lines are required to cover all zeros.
The optimal assignment
Because there are 3 lines required, an optimal assignment exists among the zeros.
This corresponds to the following optimal assignment in the original cost matrix.
The total minimum cost is 45.