Overview
The Hungarian algorithm finds an optimal one-to-one assignment in a cost matrix by using row/column potentials and augmenting paths in the equality graph.
Solves the assignment problem by maintaining dual labels and improving a minimum-cost matching.
Compact metadata for implementation and discovery.
The Hungarian algorithm finds an optimal one-to-one assignment in a cost matrix by using row/column potentials and augmenting paths in the equality graph.
Quick facts
Runtime and memory behavior at a glance.
Best
O(n^2)
Average
O(n^3)
Worst
O(n^3)
Space
O(n^2)
reduced_cost(i,j) = cost(i,j) - u[i] - v[j]Row and column potentials expose zero-cost assignments.
Show maintaining row and column potentials to find a minimum-cost perfect matching on a small assignment problem example.
The algorithm solves a structured bipartite assignment problem, not arbitrary matching with side constraints.
What each reference supports for this entry.
Textbook support for Hungarian Algorithm's algorithm family, complexity framing, and standard implementation concepts.
Open sourceReference for Hungarian Algorithm's graph matching model and augmenting-path or blossom-style concepts.
Original reference for the Hungarian method for the assignment problem.
Open sourceGood next jumps from the relationship graph, ranked for useful discovery.
Graph Traversal · Core
Both address assignment problem, but they make different modeling or performance tradeoffs.
Compare with thisGraph Traversal · Core
Both address general graph matching, but they make different modeling or performance tradeoffs.
Compare with thisGraph Traversal · Core
Both address assignment problem, but they make different modeling or performance tradeoffs.
Compare with thisBoth address assignment problem, but they make different modeling or performance tradeoffs.
Both address assignment problem, but they make different modeling or performance tradeoffs.
Both address assignment problem, but they make different modeling or performance tradeoffs.