Hungarian algorithm

The Hungarian algorithm produces the best distribution, with for example: lowest price or shortest time.
Best distribution.
Example:
Lowest price: 
$48: Total
Steps.
The Hungarian Matrix plays with values until the best distribution has only zeroes.
Step 1, zero in every line left to right.
Decrease each left to right line with its lowest value.
Step 2, zero in every top down line.
Decrease each top down line with its lowest value, - 15 for last one only.
Step 3, mark zeroes to keep.
Cover all zeroes with the lowest possible number of lines.
Find the lowest unmarked value: 6.
Step 4, make more zeroes.
Increase all values in marked lines with the value from step 3.
Decrease all values with the value from step 3.
Do steps 3 and 4 again and again,
until you have enough zeroes.