Assignment Problem Using Hungarian Method
Assignment Problem Using Hungarian Method
Using Hungarian
Method
OPERATIONAL RESEARCH
MCS - FINAL
Hungarian Method Steps
Phase I
Step 1:
If number of rows is not equal to number of
columns, then add dummy rows or columns
with cost 0, to make it a square matrix.
Hungarian Method Steps
Step 2:
A. Row Reduction: Identify the minimum element in
each row and subtract it from each element of that
row.
B. Column Reduction: Identify the minimum element
in each column and subtract it from every element of
that column.
Hungarian Method Steps
Step 3:
Make assignment in the cost table
A. Row Scanning: Identify rows with exactly one
unmarked 0. Make an assignment to this single
0 by make a square ( [0] ) around it and cut
column.
Hungarian Method Steps
B. Column Scanning: Identify columns with
exactly one unmarked 0. Make an assignment to
this single 0 by make a square ( [0] ) around it
and cut rows.
Hungarian Method Steps
C. If a row and/or column has two or more
unmarked 0 and one cannot be chosen by
inspection, then choose the cell arbitarily.
Hungarian Method Steps
d. Continue this process until all number of
assigned 0 are equal to number of
rows/Column.
Hungarian Method Steps
Step 3:
A. if number of assigned 0 are not equal to
number of rows/Column than goto Phase II
Hungarian Method Steps
Phase II
Step 1:
Find minimum undeleted cell value or on
marked cell value.
Hungarian Method Steps
Step 2:
Add this value on the cell where there is
intersection because of cutting rows and
column due to row and column scanning.
Hungarian Method Steps
Step 3:
Subtract the minimum value from the un
marked cells
Hungarian Method Steps
Step 4:
Repeat from Step 3 of Phase I.
Example
Solve the following assignment problem using Hungarian method. The matrix
entries represent the processing time in hours.
OPERATORS
O1 O2 O3 O4 O5
J1 9 11 14 11 7
J2 6 15 13 13 10
JOBS J3 12 13 6 8 8
J4 11 9 10 12 9
J5 7 12 14 10 14
Example
Highlighting Row Minimum
OPERATORS
O1 O2 O3 O4 O5
J1 9 11 14 11 7
J2 6 15 13 13 10
JOBS J3 12 13 6 8 8
J4 11 9 10 12 9
J5 7 12 14 10 14
Example
Row Reduction
OPERATORS
O1 O2 O3 O4 O5
J1 9-7 11-7 14-7 11-7 7-7
J2 6-6 15-6 13-6 13-6 10-6
JOBS J3 12-6 13-6 6-6 8-6 8-6
J4 11-9 9-9 10-9 12-9 9-9
J5 7-7 12-7 14-7 10-7 14-7
Example
Row Reduction - Answer
OPERATORS
O1 O2 O3 O4 O5
J1 2 4 7 4 0
J2 0 9 7 7 4
JOBS J3 6 7 0 2 2
J4 2 0 1 3 0
J5 0 5 7 3 7
Example
Highlight Column Minimum
OPERATORS
O1 O2 O3 O4 O5
J1 2 4 7 4 0
J2 0 9 7 7 4
JOBS J3 6 7 0 2 2
J4 2 0 1 3 0
J5 0 5 7 3 7
Example
Column Reduction:
OPERATORS
O1 O2 O3 O4 O5
J1 2-0 4-0 7-0 4-2 0-0
J2 0-0 9-0 7-0 7-2 4-0
JOBS J3 6-0 7-0 0-0 2-2 2-0
J4 2-0 0-0 1-0 3-2 0-0
J5 0-0 5-0 7-0 3-2 7-0
Example
Column Reduction - Answer:
OPERATORS
O1 O2 O3 O4 O5
J1 2 4 7 2 0
J2 0 9 7 5 4
JOBS J3 6 7 0 0 2
J4 2 0 1 1 0
J5 0 5 7 1 7
Example
Row Scanning
Column Scanning OPERATORS
O1 O2 O3 O4 O5
J1 2 4 7 2 0
J2 0 9 7 5 4
JOBS J3 6 7 0 0 2
J4 2 0 1 1 0
J5 0 5 7 1 7
Example
Row Scanning
Column Scanning
Example
Min value = 1
OPERATORS
O1 O2 O3 O4 O5
J1 2 4 7-1 2-1 0
J2 0 9 7-1 5-1 4
JOBS J3 6+1 7+1 0 0 2+1
J4 2 0 1-1 1-1 0
J5 0 5 7-1 1-1 7
Example
Min value = 1
OPERATORS
O1 O2 O3 O4 O5
J1 2 4 6 1 0
J2 0 9 6 4 4
JOBS J3 7 8 0 0 3
J4 2 0 0 0 0
J5 0 5 6 0 7
Example
Row and Column Scanning
OPERATORS
O1 O2 O3 O4 O5
J1 2 4 6 1 0
J2 0 9 6 4 4
JOBS J3 7 8 0 0 3
J4 2 0 0 0 0
J5 0 5 6 0 7
Example
Row and Column Scanning
Example
Optimized Results.
J1 05 7
J2 01 6
J3 03 6
J4 02 9
J5 04 10
38 hours