Assignment Problem – Hungarian method

(adsbygoogle = window.adsbygoogle || []).push({});

Assignment Problem Hungarian method Solved Problem with this method GATE 2018

The Hungarian algorithm

The Hungarian algorithm consists of the four steps below. The first two steps are executed once, while Steps 3 and 4 are repeated until an optimal assignment is found. The input of the algorithm is an n by square matrix with only non-negative elements.

Step 1: Subtract row minima

For each row, find the lowest element and subtract it from each element in that row.

Step 2: Subtract column minima

Similarly, for each column, find the lowest element and subtract it from each element in that column.

Step 3: Cover all zeros with a minimum number of lines

Cover all zeros in the resulting matrix using a minimum number of horizontal and vertical lines. If n lines are required, an optimal assignment exists among the zeros. The algorithm stops.

If less than n lines are required, continue with Step 4.

Step 4: Create additional zeros

Find the smallest element (call it k) that is not covered by a line in Step 3. Subtract k from all uncovered elements, and add k to all elements that are covered twice.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button

Adblocker Detected

We are detected that you are using an adblocking plugin in your browser. The revenue we earn by the advertisements is used to manage the website, we request you to whitelist our website in your adblocking plugin.