








Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Hungarian Method- Brief Description and solved examples. Also has unsolved problems
Typology: Lecture notes
1 / 14
This page cannot be seen from the preview
Don't miss anything!









Imagine, if in a printing press there is one machine and one operator is there to operate. How would you employ the worker?
Your immediate answer will be, the available operator will operate the machine.
Again suppose there are two machines in the press and two operators are engaged at different rates to operate them. Which operator should operate which machine for maximising profit?
Similarly, if there are n machines available and n persons are engaged at different rates to operate them. Which operator should be assigned to which machine to ensure maximum efficiency?
While answering the above questions we have to think about the interest of the press, so we have to find such an assignment by which the press gets maximum profit on minimum investment. Such problems are known as "assignment problems".
In this lesson we will study such problems.
After completion of this lesson you will be able to:
l formulate the assignment problem
l know Hungarian method to find proper assignment
l employ Hungarian method to find proper assignment
98::Mathematics
Let there are n jobs and n persons are available with different skills. If the cost of doing jth^ work by ith^ person is cij. Then the cost matrix is given in the table 1 below:
1 2 3 ........ j ........ n
1 c 11 c 12 c 13 ........ c 1 j ........ c 1 n
2 c 21 c 22 c 23 ........ c 2 j ........ c 2 n
i ci 1 ci 2 ci 3 ........ cij ........ cin
n cn 1 cn 2 cn 3 ........ cnj ........ cnn
Now the problem is which work is to be assigned to whom so that the cost of completion of work will be minimum.
Mathematically, we can express the problem as follows:
To minimize z (cost) = cij xij; [ i=1,2,...n; j=1,2,...n] ...(1)
1; if ith^ person is assigned jth^ work
0; if ith person is not assigned the jth^ work
with the restrictions
(i) xij=1; j=1,2,...n., i.e., ith^ person will do only one work.
(ii) xij=1; i=1,2,...n.,i.e., jth^ work will be done only by one person.
Table 1
Jobs Persons
n n
i=1 j=
where xij = {
n
i=
n
j=
100 :: Mathematics
Now there are two possibilities:
(a) Either all the zeros are assigned or crossed out, i.e., we get the maximal assignment. or (b) At least two zeros are remained by assignment or by crossing out in each row or column. In this situation we try to exclude some of the zeros by trial and error method.
This completes the second step. After this step we can get two situations.
(i) Total assigned zeroโs = n The assignment is optimal.
(ii) Total assigned zeroโs < n Use step III and onwards.
Step III: Draw of minimum lines to cover zeroโs
In order to cover all the zeroโs at least once you may adopt the following procedure. (i) Marks (โ) to all rows in which the assignment has not been done. (ii) See the position of zero in marked (โ) row and then mark (โ) to the corresponding column.
(iii) See the marked (โ) column and find the position of assigned zeroโs and then mark ( โ) t o t h e corresponding rows which are not marked till now.
(iv) Repeat the procedure (ii) and (iii) till the completion of marking.
(v) Draw the lines through unmarked rows and marked columns.
Note: If the above method does not work then make an arbitrary assignment and then follow step IV. Step IV: Select the smallest element from the uncovered elements.
(i) Subtract this smallest element from all those elements which are not covered. (ii) Add this smallest element to all those elements which are at the intersection of two lines. Step V: Thus we have increased the number of zeroโs. Now,
Assignment Problems :: 101
modify the matrix with the help of step II and find the required assignment. This procedure will be more clear by the following examples.
Example A:
Four persons A,B,C and D are to be assigned four jobs I, II, III and IV. The cost matrix is given as under, find the proper assignment.
Man A B C D Jobs I 8 10 17 9 II 3 8 5 6
III 10 12 11 9 IV 6 13 9 7
Solution :
In order to find the proper assignment we apply the Hungarian algorithm as follows:
I (A) Row reduction
Man A B C D Jobs I 0 2 9 1
II 0 5 2 3 III 1 3 2 0
IV 0 7 3 1
I (B) Column reduction
Man A B C D Jobs
I 0 0 7 1 II 0 3 0 3
III 1 1 0 0 IV 0 5 1 1
Assignment Problems :: 103
IB (Column reduction) Machines
I II III IV V A 2 9 0 8 8
B 2 1 6 0 5 Jobs C 0 4 3 0 0 D 3 7 0 11 5
E 3 0 2 1 1 II (Zero assignment)
Machines
I II III IV V A 2 9 0 8 8
B 2 1 6 0 5 Jobs C 0 4 3 0 0
D 3 7 0 11 5 E 3 0 2 1 1
From the last table we see that all the zeros are either assigned or crossed out, but the total number of assignment, i.e., 4<5 (number of jobs to be assigned to machines). Therefore, we have to follow step III and onwards as follows:
Step III
Machines
I II III IV V
A 2 9 0 8 8 โ B 2 1 6 0 5
Jobs C 0 4 3 0 0
D 3 7 0 11 5 โ E 3 0 2 1 1
Step IV: Here, the smallest element among the uncovered elements is 2.
104 :: Mathematics
(i) Subtract 2 from all those elements which are not covered. (ii) Add 2 to those entries which are at the junction of two lines. Complete the table as under:
Machines I II III IV V
A 0 7 0 6 6 B 2 1 8 0 5
Jobs C 0 4 5 0 0 D 1 5 0 9 3
E 3 0 4 1 1 Step V. using step II again
Machines I II III IV V
A 0 7 0 6 6 B 2 1 8 0 5
Jobs C 0 4 5 0 0 D 1 5 0 9 3
E 3 0 4 1 1
Thus, we have got five assignments as required by the problem. The assignment is as follows:
A โ I, B โ IV, C โ V, D โ III and E โ II.
This assignment holds for table given in step IV but from theorem 1 it also holds for the original cost matrix. Thus from the cost matrix the minimum cost = 6+1+11+12+5=Rs.35.
Note: If we are given a maximization problem then convert it into minimization problem, simply, multiplying by -1 to each entry in the effectiveness matrix and then solve it in the usual manner.
106 :: Mathematics
The tables given below show the necessary steps for reaching the optimal assignment I โ B, II โ C, III โ D, IV โ A.
Other optimal assignments are also possible in this example.
I โ A, II โ B, III โ C, IV โ D I โ C, II โ B, III โ A, IV โ D (each has cost 20) I โ C, II โ B, III โ D, IV โ A I โ B, II โ C, III โ A, IV โ D
Assignment Problems :: 107
Wrokers
I II III IV A 5 23 14 8
B 10 25 1 23 Tasks C 35 16 15 12
D 16 23 21 7
a b c d e A 140 110 155 170 180
B 115 100 110 140 155 C 120 90 135 150 165
D 30 30 60 60 90 E 35 15 50 60 85
How should taxis be assigned to customers so as to minimize the distance travelled?
Assignment Problems :: 109
(a) Workers
Jobs B 6 21 7 19
C 31 12 11 8
(b) Persons
Jobs B 10 15 12 13
(c) Persons
A B C D
Jobs II 14 29 5 27
III 40 21 20 17
110 :: Mathematics
I II III IV
1 8 9 10 11 2 10 11 12 13
3 13 14 15 13 4 9 11 14 10
min distance (km) = 180+110+90+30+60=470 km.
(b) A โ II, B โ III, C โ IV, D โ I min cost = 17+12+16+13=
(c) I โ A, II โ C, III โ B, IV โ D