Assignment Problem Maximization Calculator
Use this page when your matrix entries are profits / outputs and your goal is to maximize the total. The solver uses the Hungarian method (optimal), supports forbidden pairs, and shows step tables and a matching graph. If you’re curious how Hungarian handles maximization, see: maximization → minimization conversion. If your model includes many forbidden pairs, feasibility is the key issue: feasible vs infeasible assignment.
Calculator type
Switching type updates the URL and preserves your current matrix via the share payload (?wt=…).
Quick intro (maximization)
A maximization assignment problem selects one worker–task pair per row and per column to maximize total profit. Internally, Hungarian solves a minimization form, so profit matrices are converted to an equivalent cost matrix (learn the exact idea here: maximization to minimization conversion). If your matrix is rectangular, the solver balances it using dummy rows/columns (dummy row / dummy column interpretation). For a full refresher on the core method, see: Hungarian algorithm explained.
Key terms on this page
Short lessons that support the “maximize profit/output” version.
- Maximization → minimization conversion (Hungarian)
- Hungarian algorithm explained
- Cover zeros with minimum lines (Hungarian step)
- Theta (θ) adjustment step (Hungarian)
- Assignment feasibility / infeasibility (perfect matching)
- Bipartite matching & assignment
- Assignment problem examples
- Unbalanced assignment problem
- Dummy row / dummy column
- Big‑M method (soft restrictions)
- Linear programming
Inputs
This page targets maximization. (The script may lock objective/method to match page intent.)
Hungarian is optimal and supports step tables. Brute force verifies small n. Greedy is a baseline and may be suboptimal. Learn: Hungarian algorithm explained.
Profit matrix
Results
Enter your matrix and click Solve.
Solution walkthrough (maximization-focused)
Format: ?wt=…&autocalc=1
Embed this calculator
Graph (bipartite matching)
The assignment is a weighted bipartite matching. Learn more: bipartite matching & assignment.
Hungarian method step tables (optional)
For maximization, Hungarian converts profit to an equivalent minimization matrix internally. Learn the exact conversion: maximization → minimization conversion. Key Hungarian steps: cover zeros with minimum lines and θ adjustment.
Steps will appear after you solve using Hungarian method.
On this page
Try this next
Continue inside the assignment-problem calculator cluster:
Related reading: unbalanced assignment · dummy row / dummy column · Big‑M method · linear programming · assignment vs transportation
Worked examples (beginner → intermediate → hard → extreme)
These examples are designed for maximization (profit/output). Each has a “Load this example” button.
Beginner (profit maximization basics)
MB1 — Maximize profit (3×3): simple starter
Rep A: 12 8 15 Rep B: 7 14 9 Rep C: 10 11 13
MB2 — Maximize output (4×4): slightly larger
Team 1: 9 6 8 7 Team 2: 6 10 5 8 Team 3: 7 8 11 6 Team 4: 10 7 6 9
Intermediate (practical business style)
MI1 — Unbalanced but still “maximize” (4×3): extra agent available
Interpretation: 4 agents, 3 territories. A dummy territory means one agent is not assigned (dummy row / dummy column).
MI2 — Marketing placements (5×5): maximize expected conversions
Hard (constraints + tricky cases)
MH1 — Forbidden pairings in maximization (4×4)
Some worker→task pairs are prohibited (license/skills/policy), which can reduce the maximum achievable profit. If constraints are too strict, feasibility can fail: feasible vs infeasible assignment.
MH2 — Many ties: multiple maximum-profit solutions
Ties can create more than one optimal assignment. (Related idea in LP: multiple optimal solutions.)
Extreme (larger matrix)
MX1 — 8×8 maximization: Hungarian recommended
Brute force becomes expensive near this size; Hungarian remains efficient.
Questions people ask about maximization assignment problems
Maximization fundamentals
What is a maximization assignment problem?
It’s a one-to-one assignment where each worker (row) must be matched to exactly one task (column) to maximize the total profit/output.
When should I use “maximize” instead of “minimize”?
Use maximize when entries represent benefits (profit, score, expected conversions, output units). Use minimize when entries represent costs (time, distance, expenses).
How does the Hungarian method solve a maximization problem?
Hungarian is usually run in minimization form. The solver converts profits to costs internally (equivalent transformation). Learn the exact formula: maximization → minimization.
Will the “Total optimal profit” be computed from my original profit matrix?
Yes. Even if Hungarian converts internally, the final total shown is computed on your original profit values.
Do I need all profits to be positive?
No. You can use zero or negative profits. Negative values may represent penalties or losses; the solver still finds the maximum feasible total.
Constraints + feasibility
What happens if some worker–task pairs are forbidden?
Mark them as Forbidden. The solver excludes those pairs from matching. If forbidden pairs block every perfect matching, the problem becomes infeasible. Learn: assignment feasibility/infeasibility.
Can maximizing profit make the assignment infeasible?
Maximization itself doesn’t cause infeasibility, but forbidden constraints can. Feasibility depends on whether a one-to-one matching exists.
How do I interpret a dummy assignment in an unbalanced maximization problem?
A dummy match means an extra worker or task is left unused (depending on which side is larger). Profit contribution for dummy cells is 0 in this solver. Learn interpretation: dummy row / dummy column.
Verification + performance
How can I verify the maximum-profit result?
For small n (≤ 8 after balancing), switch to Brute force to verify the profit total and assignment.
Why can greedy be wrong in maximization?
Greedy makes local high-profit picks early, which can block better global combinations. Hungarian guarantees optimality for linear assignment.
What is the time complexity of the Hungarian algorithm?
It runs in O(n³), which is efficient compared with brute force (n!).
Methodology (how this maximization calculator works)
This page solves the maximization version of the linear assignment problem: choose one entry per row/column (a perfect matching) to maximize total profit. For the matching viewpoint, see: bipartite matching & assignment.
1) Balance the matrix (if needed)
If rows ≠ cols, the solver adds dummy rows/columns with profit 0 so the assignment remains one-to-one in a square n×n matrix. Interpretation: dummy row / dummy column.
2) Enforce forbidden (prohibited) pairs
Forbidden cells are excluded from the feasible bipartite graph. The solver checks if a perfect matching exists without using forbidden pairs. If not, it returns Infeasible. Learn: assignment feasibility / infeasibility.
3) Convert maximization to minimization for Hungarian
Hungarian is executed as a minimization algorithm internally. For profit Pij, the solver constructs an equivalent cost matrix:
Cij = max(P) − Pij
This preserves which assignment is optimal. After the assignment is found, the final total shown is the sum of the original profits.
Learn more:
maximization → minimization conversion.
4) Solve + optionally show step tables
Steps include row/column reductions, zero covers (minimum lines), θ adjustments, and finally extracting the matching among zeros. (Deep dives: cover zeros and θ adjustment.)
5) Share links
The share link stores your profit matrix, forbidden cells, objective, method, and labels in a ?wt=… payload so results are reproducible.
(If you need a general LP framing, see linear programming.)
Sources
- Kuhn (1955). The Hungarian method for the assignment problem
- Munkres (1957). Algorithms for the Assignment and Transportation Problems