Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Optimal Assignment using the Hungarian Algorithm: An Example, Lecture notes of Operational Research

How to find the optimal assignment in a given matrix using the hungarian algorithm. An example with step-by-step instructions and illustrations. The algorithm is used to minimize the number of lines required to cover all zeros in the matrix.

Typology: Lecture notes

2011/2012

Uploaded on 08/06/2012

anagha
anagha 🇮🇳

4.4

(43)

134 documents

1 / 5

Toggle sidebar

Related documents


Partial preview of the text

Download Optimal Assignment using the Hungarian Algorithm: An Example and more Lecture notes Operational Research in PDF only on Docsity! MULTIPLE SOLUTIONS Example 1 Given the following matrix, find the optimal assignment. 1 2 3 4 5 1 2 3 4 5 5 0 3 2 6 0 0 5 4 7 0 3 0 4 0 0 1 0 3 0 6 5 0 0 0 Solution: Note that all the rows and columns have at least one zero. Row 1 has a single zero in column 2. So make an assignment, delete (mark X) the second zero in column 2. This is shown in table 7. 0 denotes assignment Table 7 1 2 3 4 5 1 2 3 4 5 5 0 3 2 6 0 0 5 4 7 0x 3 0 4 0 0x 1 0 3 0 6 5 0x 0 0x Row 2 has a single zero in the first column. So make an assignment and delete the remaining zeros in column 1 as shown in table 8. Table 8 1 2 3 4 5 docsity.com 1 2 3 4 5 5 0 3 2 6 0 0x 5 4 7 0x 3 0 4 0 0x 1 0 3 0 6 5 0 0 0 Row 3, 4 and 5 have more than a single zero. So we skip these rows and examine the columns. Columns 3 has three zeros and so omit it. Column 4 has a single zero in row 5. So we make an assignment, deleting the remaining zeros in row 5. The result is as shown in table 9. Table 9 1 2 3 4 5 1 2 3 4 5 5 0 3 2 6 0 0x 5 4 7 0x 3 0 4 0 0x 1 0 3 0 6 5 0x 0 0x Now we have two zeros in rows 3 and 4 in columns 3 and they occupy the corners of a square. An arbitrary assignment has to be made. If we make an assignment in (3, 3) and delete the remaining zero in row 3 and in column 3, this leaves one zero in the position (4, 5) and an assignment is made there. Thus we have a solution to the problem as in table 10. Table 10 1 2 3 4 5 1 2 3 5 0 3 2 6 0 0x 5 4 7 0x 3 0 4 0x 0 1 0x 3 0 docsity.com
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved