Wikipedia says:
If the goal is to find the destination that gives the maximum value, the problem can be changed to fit the setting, replacing each value with a maximum value deducted from the value.
So, if I understand correctly: among all the costs that you have as input, you will find the maximum value. Then you replace each value x with max - x . That way, you still have positive costs, and you can run the Hungarian algorithm.
They say otherwise: Hungarian is trying to minimize the cost of the appointment. So, if you are looking for the maximum, you can change the cost: x → -x. However, some implementations (I don’t know if they are all or all) require positive numbers. Therefore, the idea is to add a constant value to each value in order to have positive numbers. This constant value does not change the resulting affectation.
source share