Solution
This is the cost matrix.
| 2 | 77 | 48 | 59 |
| 53 | 54 | 25 | 53 |
| 81 | 33 | 25 | 60 |
| 25 | 33 | 55 | 89 |
Subtract row minima
For each row, the minimum element is subtracted from all elements in that row.
| 0 | 75 | 46 | 57 | (-2) |
| 28 | 29 | 0 | 28 | (-25) |
| 56 | 8 | 0 | 35 | (-25) |
| 0 | 8 | 30 | 64 | (-25) |
Subtract column minima
For each column, the minimum element is subtracted from all elements in that column.
| 0 | 67 | 46 | 29 |
| 28 | 21 | 0 | 0 |
| 56 | 0 | 0 | 7 |
| 0 | 0 | 30 | 36 |
| (-8) | | (-28) |
Cover all zeros with a minimum number of lines
A total of 4 lines are required to cover all zeros.
| 0 | 67 | 46 | 29 | x |
| 28 | 21 | 0 | 0 | x |
| 56 | 0 | 0 | 7 | x |
| 0 | 0 | 30 | 36 | x |
The optimal assignment
Because there are 4 lines required, an optimal assignment exists among the zeros.
This corresponds to the following optimal assignment in the original cost matrix.
| 2 | 77 | 48 | 59 |
| 53 | 54 | 25 | 53 |
| 81 | 33 | 25 | 60 |
| 25 | 33 | 55 | 89 |
The total minimum cost is 113.