Hungarian Algorithm - Setting

Setting

We are given a nonnegative n×n matrix, where the element in the i-th row and j-th column represents the cost of assigning the j-th job to the i-th worker. We have to find an assignment of the jobs to the workers that has minimum cost. If the goal is to find the assignment that yields the maximum cost, the problem can be altered to fit the setting by replacing each cost with the maximum cost subtracted by the cost.

The algorithm is easier to describe if we formulate the problem using a bipartite graph. We have a complete bipartite graph G=(S, T; E) with n worker vertices (S) and n job vertices (T), and each edge has a nonnegative cost c(i,j). We want to find a perfect matching with minimum cost.

Let us call a function a potential if for each . The value of potential y is . It can be seen that the cost of each perfect matching is at least the value of each potential. The Hungarian method finds a perfect matching and a potential with equal cost/value which proves the optimality of both. In fact it finds a perfect matching of tight edges: an edge ij is called tight for a potential y if . Let us denote the subgraph of tight edges by . The cost of a perfect matching in (if there is one) equals the value of y.

Read more about this topic:  Hungarian Algorithm

Famous quotes containing the word setting:

    Linnæus, setting out for Lapland, surveys his “comb” and “spare shirt,” “leathern breeches” and “gauze cap to keep off gnats,” with as much complacency as Bonaparte a park of artillery for the Russian campaign. The quiet bravery of the man is admirable.
    Henry David Thoreau (1817–1862)

    The supreme, the merciless, the destroyer of opposition, the exalted King, the shepherd, the protector of the quarters of the world, the King the word of whose mouth destroys mountains and seas, who by his lordly attack has forced mighty and merciless Kings from the rising of the sun to the setting of the same to acknowledge one supremacy.
    Ashurnasirpal II (r. 883–59 B.C.)

    We don’t arrive at it by standing on one leg or on the first day of our setting out—but though we may jostle one another on the way that is no reason why we should strike or trample—elbowing’s enough.
    George Gordon Noel Byron (1788–1824)