Solution
This is the cost matrix.
| 22 | 24 | 9 | 73 |
| 10 | 55 | 13 | 72 |
| 85 | 62 | 20 | 97 |
| 34 | 45 | 15 | 33 |
Subtract row minima
For each row, the minimum element is subtracted from all elements in that row.
| 13 | 15 | 0 | 64 | (-9) |
| 0 | 45 | 3 | 62 | (-10) |
| 65 | 42 | 0 | 77 | (-20) |
| 19 | 30 | 0 | 18 | (-15) |
Subtract column minima
For each column, the minimum element is subtracted from all elements in that column.
| 13 | 0 | 0 | 46 |
| 0 | 30 | 3 | 44 |
| 65 | 27 | 0 | 59 |
| 19 | 15 | 0 | 0 |
| (-15) | | (-18) |
Cover all zeros with a minimum number of lines
A total of 4 lines are required to cover all zeros.
| 13 | 0 | 0 | 46 | x |
| 0 | 30 | 3 | 44 | x |
| 65 | 27 | 0 | 59 | x |
| 19 | 15 | 0 | 0 | x |
The optimal assignment
Because there are 4 lines required, an optimal assignment exists among the zeros.
| 13 | 0 | 0 | 46 |
| 0 | 30 | 3 | 44 |
| 65 | 27 | 0 | 59 |
| 19 | 15 | 0 | 0 |
This corresponds to the following optimal assignment in the original cost matrix.
| 22 | 24 | 9 | 73 |
| 10 | 55 | 13 | 72 |
| 85 | 62 | 20 | 97 |
| 34 | 45 | 15 | 33 |
The total minimum cost is 87.