Solution
This is the cost matrix.
| 54 | 12 | 8 | 11 |
| 67 | 50 | 50 | 6 |
| 49 | 30 | 35 | 29 |
| 21 | 67 | 34 | 95 |
Subtract row minima
For each row, the minimum element is subtracted from all elements in that row.
| 46 | 4 | 0 | 3 | (-8) |
| 61 | 44 | 44 | 0 | (-6) |
| 20 | 1 | 6 | 0 | (-29) |
| 0 | 46 | 13 | 74 | (-21) |
Subtract column minima
For each column, the minimum element is subtracted from all elements in that column.
| 46 | 3 | 0 | 3 |
| 61 | 43 | 44 | 0 |
| 20 | 0 | 6 | 0 |
| 0 | 45 | 13 | 74 |
| (-1) | | |
Cover all zeros with a minimum number of lines
A total of 4 lines are required to cover all zeros.
| 46 | 3 | 0 | 3 | x |
| 61 | 43 | 44 | 0 | x |
| 20 | 0 | 6 | 0 | x |
| 0 | 45 | 13 | 74 | 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.
| 54 | 12 | 8 | 11 |
| 67 | 50 | 50 | 6 |
| 49 | 30 | 35 | 29 |
| 21 | 67 | 34 | 95 |
The total minimum cost is 65.