Hungarian algorithm is used for the optimal assignment of jobs to workers in one-to-one manner and to reduce the cost of the assignment. In this calculator, you can solve the work assignment problem with the hungarian algorithm.
Hungarian algorithm is used for the optimal assignment of jobs to workers in one-to-one manner and to reduce the cost of the assignment. In this calculator, you can solve the work assignment problem with the hungarian algorithm.
Consider there are 3 jobs, should be assigned to 3 workers (one job to each). The cost of assigning the jobs are :
Jobs/Man | J1 | J2 | J3 |
---|---|---|---|
M1 | 52 | 19 | 20 |
M2 | 8 | 83 | 24 |
M3 | 42 | 35 | 89 |
Subtract row minima,
Subtract the minimum value of the row from other values.
Jobs/Man | J1 | J2 | J3 | Row Minima |
---|---|---|---|---|
M1 | 33 | 0 | 1 | -19 |
M2 | 0 | 75 | 16 | -8 |
M3 | 7 | 0 | 54 | -35 |
Subtract column minima,
Subtract the minimum value of the column from other values.
Jobs/Man | J1 | J2 | J3 |
---|---|---|---|
M1 | 33 | 0 | 0 |
M2 | 0 | 75 | 15 |
M3 | 7 | 0 | 53 |
Col. Minima | -1 |
Cover all zeros with a minimum number of lines,
Jobs/Man | J1 | J2 | J3 |
---|---|---|---|
M1 | 33 | 0 | 0 |
M2 | 0 | 75 | 15 |
M3 | 7 | 0 | 53 |
Choose zero's
Jobs/Man | J1 | J2 | J3 |
---|---|---|---|
M1 | 33 | 0 | 0 |
M2 | 0 | 75 | 15 |
M3 | 7 | 0 | 53 |
Apply the selection to the original matrix, that will be the jobs assigned to them and adding cost of all assigned jobs will be the minimum cost.
Jobs/Man | J1 | J2 | J3 |
---|---|---|---|
M1 | 52 | 19 | 20 |
M2 | 8 | 83 | 24 |
M3 | 42 | 35 | 89 |
Job Assignment Problem with concept of Hungarian algorithm is made easier here.