Assignment Problem
Find optimal assignment to minimize total cost using Hungarian Algorithm
Enter Your Problem
× 4 matrix
| Task 1 | Task 2 | Task 3 | Task 4 | |
|---|---|---|---|---|
| Worker 1 | ||||
| Worker 2 | ||||
| Worker 3 | ||||
| Worker 4 |
Matrix CSV with Worker/Task labels; optional maximize=true/false key-value rows above the matrix. After Solve, also Export results CSV.
Theory of the Assignment Problem
Example Problem:
Problem: Assign 4 workers to 4 tasks to minimize total cost.
| Task 1 | Task 2 | Task 3 | Task 4 | |
|---|---|---|---|---|
| Worker 1 | 9 | 2 | 7 | 8 |
| Worker 2 | 6 | 4 | 3 | 7 |
| Worker 3 | 5 | 8 | 1 | 8 |
| Worker 4 | 7 | 6 | 9 | 4 |
Step-by-Step Solution Preview:
1. Row reduction: Subtract row minimums (2, 3, 1, 4) from each row
2. Column reduction: Subtract column minimums from each column
3. Cover zeros: Find minimum line cover
4. Optimal assignment: Worker 1 → Task 2, Worker 2 → Task 3, Worker 3 → Task 1, Worker 4 → Task 4
5. Minimum cost: 2 + 3 + 5 + 4 = 14
1. What is the main purpose of the Hungarian Algorithm?
2. What is the first step in the Hungarian Algorithm?
3. When is the optimal solution found in the Hungarian Algorithm?
4. What does it mean if we need more lines than the matrix size to cover all zeros?