The assignment problem is a fundamental combinatorial optimization problem that involves assigning a number of agents to perform a number of tasks in the most efficient way possible. In its most general form, the problem instance has a number of agents and a number of tasks, and the objective is to minimize the cost or time of completing a number of jobs by a number of persons. The problem can be stated as follows: given two sets, A and T, together with a weight function C: A × T → R, find a bijection f: A → T such that the cost function is minimized. The assignment problem is a special case of the transportation problem, which is a special case of the minimum cost flow problem, which in turn is a special case of a linear program.
The formal definition of the assignment problem is to find, in a weighted bipartite graph, a matching of a given size, in which the sum of weights of the edges is minimum. The problem can be adjusted to allow for more tasks than agents, tasks to which multiple agents must be assigned, or maximizing profit rather than minimizing cost.
The assignment problem arises in many fields, including management, economics, and computer science. It can be used to assign workers to machines, salesmen to different sales areas, and more. Although an assignment problem can be formulated as a linear programming problem, it is solved by a special method known as the Hungarian Method because of its special structure.