Solution
This is the cost matrix.
| 46 | 22 | 71 | 32 |
| 51 | 98 | 18 | 62 |
| 52 | 15 | 78 | 43 |
| 62 | 72 | 75 | 10 |
Subtract row minima
For each row, the minimum element is subtracted from all elements in that row.
| 24 | 0 | 49 | 10 | (-22) |
| 33 | 80 | 0 | 44 | (-18) |
| 37 | 0 | 63 | 28 | (-15) |
| 52 | 62 | 65 | 0 | (-10) |
Subtract column minima
For each column, the minimum element is subtracted from all elements in that column.
| 0 | 0 | 49 | 10 |
| 9 | 80 | 0 | 44 |
| 13 | 0 | 63 | 28 |
| 28 | 62 | 65 | 0 |
| (-24) | | | |
Cover all zeros with a minimum number of lines
A total of 4 lines are required to cover all zeros.
| 0 | 0 | 49 | 10 | x |
| 9 | 80 | 0 | 44 | x |
| 13 | 0 | 63 | 28 | x |
| 28 | 62 | 65 | 0 | x |
The optimal assignment
Because there are 4 lines required, an optimal assignment exists among the zeros.
| 0 | 0 | 49 | 10 |
| 9 | 80 | 0 | 44 |
| 13 | 0 | 63 | 28 |
| 28 | 62 | 65 | 0 |
This corresponds to the following optimal assignment in the original cost matrix.
| 46 | 22 | 71 | 32 |
| 51 | 98 | 18 | 62 |
| 52 | 15 | 78 | 43 |
| 62 | 72 | 75 | 10 |
The total minimum cost is 89.