Solution
This is the cost matrix.
| 2 | 10 | 33 | 2 |
| 58 | 9 | 36 | 66 |
| 67 | 54 | 19 | 33 |
| 67 | 69 | 91 | 24 |
Subtract row minima
For each row, the minimum element is subtracted from all elements in that row.
| 0 | 8 | 31 | 0 | (-2) |
| 49 | 0 | 27 | 57 | (-9) |
| 48 | 35 | 0 | 14 | (-19) |
| 43 | 45 | 67 | 0 | (-24) |
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.
| 0 | 8 | 31 | 0 | x |
| 49 | 0 | 27 | 57 | x |
| 48 | 35 | 0 | 14 | x |
| 43 | 45 | 67 | 0 | x |
The optimal assignment
Because there are 4 lines required, an optimal assignment exists among the zeros.
| 0 | 8 | 31 | 0 |
| 49 | 0 | 27 | 57 |
| 48 | 35 | 0 | 14 |
| 43 | 45 | 67 | 0 |
This corresponds to the following optimal assignment in the original cost matrix.
| 2 | 10 | 33 | 2 |
| 58 | 9 | 36 | 66 |
| 67 | 54 | 19 | 33 |
| 67 | 69 | 91 | 24 |
The total minimum cost is 54.