Hungarian algorithm: Difference between revisions

Content deleted Content added
External links: Changed link to point to a Research Gate copy of the course notes.
Step 4: Replace "crossed" with "covered" for clarity ("crossed" was not used before and one can wonder if it means something new).
Line 279:
'''From the elements that are left, find the lowest value. Subtract this from every unmarked element and add it to every element covered by two lines.'''
 
This is equivalent to subtracting a number from all rows which are not crossedcovered and adding the same number to all columns which are crossedcovered. These operations do not change optimal assignments.
 
Repeat steps 3–4 until an assignment is possible; this is when the minimum number of lines used to cover all the 0s is equal to min(number of people, number of assignments), assuming dummy variables (usually the max cost) are used to fill in when the number of people is greater than the number of assignments.