0% found this document useful (0 votes)
63 views

Hungarian Method

The Hungarian method is an algorithm for solving the assignment problem in polynomial time. It takes an initial matrix as input and performs reductions to obtain a second matrix with zeros. It then tries to cover all the zeros with the fewest lines possible, adding additional steps if needed, to find the optimal value. When applied to the given matrix, it outputs an optimal value of 17.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views

Hungarian Method

The Hungarian method is an algorithm for solving the assignment problem in polynomial time. It takes an initial matrix as input and performs reductions to obtain a second matrix with zeros. It then tries to cover all the zeros with the fewest lines possible, adding additional steps if needed, to find the optimal value. When applied to the given matrix, it outputs an optimal value of 17.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Hungarian Method

The first thing we have is the matrix that is given at the beginning of the problem.

A B C D E
1 5 6 4 8 3
2 6 4 9 8 5
3 4 3 2 5 4
4 7 2 4 5 3
5 3 6 4 5 9

After the reductions we obtain this second one

A B C D E
1 2 3 1 5 0
2 2 0 5 4 1
3 2 1 0 3 2
4 5 0 2 3 1
5 0 3 1 2 6

Following the rule we try to cover all the zeros with the least lines

A B C D E
1 2 3 1 3 0
2 2 0 5 2 1
3 2 1 0 1 2
4 5 0 2 1 1
5 0 3 1 0 6

Since we have not enough lines we do the steps necessary to have one more

A B C D E
1 2 4 1 3 0
2 1 0 4 1 0
3 2 2 0 3 2
4 4 0 1 0 0
5 0 4 1 2 6

At the end we obtain the optimum value that is 17


A B C D E
1 5 6 4 8 3
2 6 4 9 8 5
3 4 3 2 5 4
4 7 2 4 5 3
5 3 6 4 5 9

We verify that is optimum by choosing random numbers and obtaining 19

A B C D E
1 5 6 4 8 3
2 6 4 9 8 5
3 4 3 2 5 4
4 7 2 4 5 3
5 3 6 4 5 9

You might also like