Solution
This is the cost matrix.
| 45 | 77 | 39 | 16 |
| 57 | 23 | 80 | 69 |
| 75 | 39 | 30 | 61 |
| 14 | 92 | 83 | 21 |
Subtract row minima
For each row, the minimum element is subtracted from all elements in that row.
| 29 | 61 | 23 | 0 | (-16) |
| 34 | 0 | 57 | 46 | (-23) |
| 45 | 9 | 0 | 31 | (-30) |
| 0 | 78 | 69 | 7 | (-14) |
Subtract column minima
Because each column already contains a zero, subtracting the column minima has no effect.
Cover all zeros with a minimum number of lines
A total of 4 lines are required to cover all zeros.
| 29 | 61 | 23 | 0 | x |
| 34 | 0 | 57 | 46 | x |
| 45 | 9 | 0 | 31 | x |
| 0 | 78 | 69 | 7 | x |
The optimal assignment
Because there are 4 lines required, an optimal assignment exists among the zeros.
| 29 | 61 | 23 | 0 |
| 34 | 0 | 57 | 46 |
| 45 | 9 | 0 | 31 |
| 0 | 78 | 69 | 7 |
This corresponds to the following optimal assignment in the original cost matrix.
| 45 | 77 | 39 | 16 |
| 57 | 23 | 80 | 69 |
| 75 | 39 | 30 | 61 |
| 14 | 92 | 83 | 21 |
The total minimum cost is 83.