Solution
This is the cost matrix.
| 44 | 71 | 28 | 18 |
| 46 | 29 | 46 | 22 |
| 79 | 13 | 52 | 66 |
| 89 | 62 | 41 | 37 |
Subtract row minima
For each row, the minimum element is subtracted from all elements in that row.
| 26 | 53 | 10 | 0 | (-18) |
| 24 | 7 | 24 | 0 | (-22) |
| 66 | 0 | 39 | 53 | (-13) |
| 52 | 25 | 4 | 0 | (-37) |
Subtract column minima
For each column, the minimum element is subtracted from all elements in that column.
| 2 | 53 | 6 | 0 |
| 0 | 7 | 20 | 0 |
| 42 | 0 | 35 | 53 |
| 28 | 25 | 0 | 0 |
| (-24) | | (-4) | |
Cover all zeros with a minimum number of lines
A total of 4 lines are required to cover all zeros.
| 2 | 53 | 6 | 0 | x |
| 0 | 7 | 20 | 0 | x |
| 42 | 0 | 35 | 53 | x |
| 28 | 25 | 0 | 0 | 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.
| 44 | 71 | 28 | 18 |
| 46 | 29 | 46 | 22 |
| 79 | 13 | 52 | 66 |
| 89 | 62 | 41 | 37 |
The total minimum cost is 118.