Hungarian Algorithm Calculator English Español 中国 Português Pусский Türk

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.

Job / Work Assignment Problem Calculation

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.

Code to add this calci to your website  Example:

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

Step 1 :

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

Step 2 :

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

Step 3 :

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

Step 4 :

Choose zero's

Jobs/Man J1 J2 J3
M1 33 0 0
M2 0 75 15
M3 7 0 53

Step 5 :

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.