You are on page 1of 2

Example Hungarian Method Step 1: Create zero elements in the cost matrix by subtracting the smallest element in each

row from the corresponding row. Step 2: Repeating the same with columns, the final matrix can be obtained. Rows and ! ha"e only one zero element. #oth of these are in column 1, which means that both $obs and ! should be assigned to machine 1. %s one machine can be assigned with only one $ob, a feasible assignment to the zero elements is not possible. &herefore we ha"e to mo"e to the next step of crossing out all zeros. '()&*: +f the number of lines crossing out zeros e,uals the number of rows, then we don-t ha"e to mo"e to the next step.. Step : /raw a minimum number of lines through some of the rows and columns so that all the zeros are crossed out.
0%C1+(* # 4 1 !

2)#S 1 2 !

% 3 4 4 4

C 4 5 ! 6

/ 4 2 1 2

The crossed out lines are two rows wise and one column wise. So it is not the optimal solution. We need number of crossing out lines equal to the number of rows i.e. 4
0%C1+(* # 4 1 !

2)#S 1 2 !

% 3 4 4 4

C 4 5 ! 6

/ 4 2 1 2

1ere the remaining unco"ered or uncrossed is highlighted. So we would subtract the smallest number from each uncrossed number and add to the numbers at points of intersection &hus it becomes:
2)#S 1 2 ! % 37186 47181 4 4 0%C1+(* # 4 19184 !918 C 4 5 !918 69183 / 4 2 19184 29181

#y adding and subtracting we get:


2)#S 1 2 ! % 6 1 4 4 0%C1+(* # 4 4 C 4 5 3 / 4 2 4 1

(ow the number of lines co"ering zeros is !, e,ual to the number of rows. So the optimal assignment is possible. %!, 2#, 1C and / means, a $ob! can be assigned to machine %, $ob2 can be assigned to machine #, $ob1 can be assigned to machine C and $ob can be assigned to machine /.

You might also like