307. Assignment Problem

The special case of the transportation problem where 𝑛 agents are assigned to 𝑛 tasks one-to-one.

307.1. Formulation

Cost 𝑐𝑖𝑗 to assign agent 𝑖 to task 𝑗. Decision variable 𝑥𝑖𝑗{0,1}.

min𝑖=1𝑛𝑗=1𝑛𝑐𝑖𝑗𝑥𝑖𝑗

s.t.:

𝑗𝑥𝑖𝑗=1,𝑖=1,,𝑛(each agent gets one task)𝑖𝑥𝑖𝑗=1,𝑗=1,,𝑛(each task gets one agent)𝑥𝑖𝑗{0,1}

307.2. Unbalanced (dummy)

When agents and tasks differ in number (𝑛 agents, 𝑚 tasks, 𝑛>𝑚), not everyone can be assigned. Relax the agent constraint to :

min𝑖𝑗𝑐𝑖𝑗𝑥𝑖𝑗s.t.𝑗𝑥𝑖𝑗1𝑖(agent does at most one task)𝑖𝑥𝑖𝑗=1𝑗(every task is covered)𝑥𝑖𝑗0

Equivalently, restore balance with a dummy task (column 𝑚+1, zero cost) that absorbs the 𝑛𝑚 unassigned agents:

min𝑖=1𝑛𝑗=1𝑚+1𝑐𝑖𝑗𝑥𝑖𝑗s.t.𝑗=1𝑚+1𝑥𝑖𝑗=1𝑖{1,,𝑛}𝑖=1𝑛𝑥𝑖𝑗=1𝑗{1,,𝑚}𝑖=1𝑛𝑥𝑖,𝑚+1=𝑛𝑚𝑥𝑖𝑗0

307.3. LP relaxation gives integer solution

Constraint matrix is totally unimodular → LP relaxation has integer optimum. Can drop the binary constraint and solve as an LP; equivalently use the Hungarian algorithm in 𝑂(𝑛3).

307.4. Applications

307.5. Generalizations

307.6. See also