Solution
This is the cost matrix.
| 35 | 13 | 11 | 42 |
| 20 | 76 | 89 | 65 |
| 29 | 22 | 41 | 50 |
| 79 | 17 | 52 | 37 |
Subtract row minima
For each row, the minimum element is subtracted from all elements in that row.
| 24 | 2 | 0 | 31 | (-11) |
| 0 | 56 | 69 | 45 | (-20) |
| 7 | 0 | 19 | 28 | (-22) |
| 62 | 0 | 35 | 20 | (-17) |
Subtract column minima
For each column, the minimum element is subtracted from all elements in that column.
| 24 | 2 | 0 | 11 |
| 0 | 56 | 69 | 25 |
| 7 | 0 | 19 | 8 |
| 62 | 0 | 35 | 0 |
| | | (-20) |
Cover all zeros with a minimum number of lines
A total of 4 lines are required to cover all zeros.
| 24 | 2 | 0 | 11 | x |
| 0 | 56 | 69 | 25 | x |
| 7 | 0 | 19 | 8 | x |
| 62 | 0 | 35 | 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.
| 35 | 13 | 11 | 42 |
| 20 | 76 | 89 | 65 |
| 29 | 22 | 41 | 50 |
| 79 | 17 | 52 | 37 |
The total minimum cost is 90.