Solution
This is the cost matrix.
| 70 | 46 | 13 | 65 |
| 2 | 51 | 40 | 10 |
| 98 | 75 | 96 | 49 |
| 63 | 31 | 10 | 39 |
Subtract row minima
For each row, the minimum element is subtracted from all elements in that row.
| 57 | 33 | 0 | 52 | (-13) |
| 0 | 49 | 38 | 8 | (-2) |
| 49 | 26 | 47 | 0 | (-49) |
| 53 | 21 | 0 | 29 | (-10) |
Subtract column minima
For each column, the minimum element is subtracted from all elements in that column.
| 57 | 12 | 0 | 52 |
| 0 | 28 | 38 | 8 |
| 49 | 5 | 47 | 0 |
| 53 | 0 | 0 | 29 |
| (-21) | | |
Cover all zeros with a minimum number of lines
A total of 4 lines are required to cover all zeros.
| 57 | 12 | 0 | 52 | x |
| 0 | 28 | 38 | 8 | x |
| 49 | 5 | 47 | 0 | x |
| 53 | 0 | 0 | 29 | x |
The optimal assignment
Because there are 4 lines required, an optimal assignment exists among the zeros.
| 57 | 12 | 0 | 52 |
| 0 | 28 | 38 | 8 |
| 49 | 5 | 47 | 0 |
| 53 | 0 | 0 | 29 |
This corresponds to the following optimal assignment in the original cost matrix.
| 70 | 46 | 13 | 65 |
| 2 | 51 | 40 | 10 |
| 98 | 75 | 96 | 49 |
| 63 | 31 | 10 | 39 |
The total minimum cost is 95.