The Hungarian Algorithm Solving The Assignment Problem of A Least Cost Assignment of Workers To Jobs
The Hungarian Algorithm Solving The Assignment Problem of A Least Cost Assignment of Workers To Jobs
Assumptions:
1. There is a cost assignment matrix for the m
people to be assigned to m tasks.
(If necessary dummy rows or columns consisting
of all 0s are added so that the numbers of people
and tasks are the same.)
2. All costs are nonnegative.
3. The problem is a minimization problem.
Iterative Steps
1. Make as many 0 cost assignments as possible. If
all workers are assigned, STOP; this is the minimum
cost assignment. Otherwise draw the minimum
number of horizontal and vertical lines necessary to
cover all 0s in the matrix. (A method for making the
maximum number of 0 cost assignments and
drawing the minimum number of lines to cover all
0s follows.)
2. Find the smallest value not covered by the lines;
this number is the reduction value.
3. Subtract the reduction value from all numbers not
covered by any lines. Add the reduction value to any
number covered by both a horizontal and vertical
line.
GO TO STEP 1.
Example:
Minimum uncovered
1
number
2
2. Find the smallest value not covered by the lines; this
number is the reduction value.
3. Subtract the reduction value from all numbers not covered
by any lines. Add the reduction value to any number covered
by both a horizontal and vertical line
Minimum uncovered
number
Now no of assignments
are 4