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:
“High from the summit of a craggy cliff,
Hung oer the deep, such as amazing frowns
On utmost Kildas shore, whose lonely race
Resign the setting sun to Indian worlds,
The royal eagle draws his vigorous young”
—James Thomson (17001748)
“A happy marriage perhaps represents the ideal of human relationshipa setting in which each partner, while acknowledging the need of the other, feels free to be what he or she by nature is: a relationship in which instinct as well as intellect can find expression; in which giving and taking are equal; in which each accepts the other, and I confronts Thou.”
—Anthony Storr (b. 1920)
“The setting sun is reflected from the windows of the alms-house as brightly as from the rich mans abode; the snow melts before its door as early in the spring. I do not see but a quiet mind may live as contentedly there, and have as cheering thoughts, as in a palace.”
—Henry David Thoreau (18171862)