Solution
This is the cost matrix.
| 49 | 71 | 78 | 78 |
| 88 | 96 | 76 | 33 |
| 85 | 52 | 83 | 66 |
| 41 | 99 | 18 | 43 |
Subtract row minima
For each row, the minimum element is subtracted from all elements in that row.
| 0 | 22 | 29 | 29 | (-49) |
| 55 | 63 | 43 | 0 | (-33) |
| 33 | 0 | 31 | 14 | (-52) |
| 23 | 81 | 0 | 25 | (-18) |
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 | 22 | 29 | 29 | x |
| 55 | 63 | 43 | 0 | x |
| 33 | 0 | 31 | 14 | x |
| 23 | 81 | 0 | 25 | x |
The optimal assignment
Because there are 4 lines required, an optimal assignment exists among the zeros.
| 0 | 22 | 29 | 29 |
| 55 | 63 | 43 | 0 |
| 33 | 0 | 31 | 14 |
| 23 | 81 | 0 | 25 |
This corresponds to the following optimal assignment in the original cost matrix.
| 49 | 71 | 78 | 78 |
| 88 | 96 | 76 | 33 |
| 85 | 52 | 83 | 66 |
| 41 | 99 | 18 | 43 |
The total minimum cost is 152.