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:
“Love is at the root of all healthy discipline. The desire to be loved is a powerful motivation for children to behave in ways that give their parents pleasure rather than displeasure. it may even be our own long-ago fear of losing our parents love that now sometimes makes us uneasy about setting and maintaining limits. Were afraid well lose the love of our children when we dont let them have their way.”
—Fred Rogers (20th century)
“The mind cannot support moral chaos for long. Men are under as strong a compulsion to invent an ethical setting for their behavior as spiders are to weave themselves webs.”
—John Dos Passos (18961970)
“In my dealing with my child, my Latin and Greek, my accomplishments and my money stead me nothing; but as much soul as I have avails. If I am wilful, he sets his will against mine, one for one, and leaves me, if I please, the degradation of beating him by my superiority of strength. But if I renounce my will, and act for the soul, setting that up as umpire between us two, out of his young eyes looks the same soul; he reveres and loves with me.”
—Ralph Waldo Emerson (18031882)