Solution
This is the cost matrix.
| 7 | 8 | 70 | 49 |
| 16 | 75 | 95 | 34 |
| 42 | 66 | 74 | 4 |
| 24 | 1 | 75 | 11 |
Subtract row minima
For each row, the minimum element is subtracted from all elements in that row.
| 0 | 1 | 63 | 42 | (-7) |
| 0 | 59 | 79 | 18 | (-16) |
| 38 | 62 | 70 | 0 | (-4) |
| 23 | 0 | 74 | 10 | (-1) |
Subtract column minima
For each column, the minimum element is subtracted from all elements in that column.
| 0 | 1 | 0 | 42 |
| 0 | 59 | 16 | 18 |
| 38 | 62 | 7 | 0 |
| 23 | 0 | 11 | 10 |
| | (-63) | |
Cover all zeros with a minimum number of lines
A total of 4 lines are required to cover all zeros.
| 0 | 1 | 0 | 42 | x |
| 0 | 59 | 16 | 18 | x |
| 38 | 62 | 7 | 0 | x |
| 23 | 0 | 11 | 10 | x |
The optimal assignment
Because there are 4 lines required, an optimal assignment exists among the zeros.
| 0 | 1 | 0 | 42 |
| 0 | 59 | 16 | 18 |
| 38 | 62 | 7 | 0 |
| 23 | 0 | 11 | 10 |
This corresponds to the following optimal assignment in the original cost matrix.
| 7 | 8 | 70 | 49 |
| 16 | 75 | 95 | 34 |
| 42 | 66 | 74 | 4 |
| 24 | 1 | 75 | 11 |
The total minimum cost is 91.