ALGORITHM ARTICLE
Hungarian assignment
Problem. Minimum- or maximum-cost one-to-one row/column assignment.
Core idea. Dual potentials expose zero reduced-cost augmenting assignments.
Procedure
- Normalize the cost matrix.
- Update potentials while finding augmenting paths.
- Recover the primal matching and objective.
Certificate. Primal assignment and dual reduced-cost conditions.
Data structures and API
from optfin_orlab import HungarianAssignmentSolver
solver = HungarianAssignmentSolver()
result = solver.solve(...)Complexity. O(n³) after padding
Limits. Additional side constraints need another model.
OPTFIN AUDIT CHECKS
What has to reconcile before this method is trusted.
- DefinitionProblem, objective, inputs and output are explicit.
- Data structureThe public API and canonical source path are identified.
- CorrectnessPrimal assignment and dual reduced-cost conditions.
- ComplexityO(n³) after padding
- Operational limitAdditional side constraints need another model.
- ReproductionSource, executable test and evidence route remain linked.
LUNA ACADEMIC
Continue this algorithm in one research conversation.
Ask for the paper trail, executable test, source explanation, or a reproducibility plan for Hungarian assignment.
Open Luna for this algorithm