1:1 minimum-cost assignment
Find a complete assignment without duplicate choices using a square worker-task cost matrix.
The example value has been entered. Check it immediately or change the value.
Input is processed in the browser. Refreshing returns a sample value.
Instructions and example
DP(mask∪{j})=min(DP(mask)+cost[popcount(mask),j])
The default optimum assigns 1→2, 2→1, 3→3 with total 2+6+1=9.
Use a square matrix with 1–10 rows and integer costs 0–1,000,000. Every row and column is assigned exactly; forbidden matches, capacities and precedence are unsupported. Floating-point results display at most 12 significant digits.
Frequently asked questions
Does assignment cost 0 mean forbidden?
No. A cost of 0 is an allowed free assignment. Forbidden combinations fall outside this model.
What if worker and task counts differ?
Rectangular input is rejected. Explicit dummy rows or columns can be added after deciding their meaning and cost.
Calculation criteria and reference materials
- Google OR-Tools: assignment
Complete 1:1 assignment from a cost matrix.
Verification of calculation criteria: · Calculation·verification principles · Report errors