Weighted Bipartite Matching: Potentials and Linear-Programming Duality #
Costs, perfect matchings and vertex potentials on the edge-indicator representation
G : L × R → Bool of CslibFrontier.Algorithms.Lean.MaxFlow.BipartiteMatching, with weak duality
and
complementary slackness for the minimum-cost (perfect) matching problem ([Sch03], Ch. 17;
[Kuh55]). The executable Hungarian method and Egerváry's strong duality theorem for the
assignment problem are in CslibFrontier.Algorithms.Lean.MaxFlow.Hungarian.
Conventions #
Costs take values in an ordered additive commutative monoid or group α and are minimized.
Potentials y : L → α and z : R → α are feasible when every reduced cost
c (u, v) - y u - z v of an edge is nonnegative, i.e. y u + z v ≤ c (u, v); an edge is tight
when equality holds. This is the reduced-cost convention of primal-dual algorithms for
minimum-cost flow, so the lemmas below are stated for arbitrary matchings and graphs, not only for
the complete bipartite graph of the assignment problem. Maximum-weight problems are obtained by
negating costs.
Main definitions #
IsPerfectMatching G M:Mis a matching ofGcovering every left and every right vertex.matchingCost c M: the total cost∑ e ∈ M, c e.IsFeasiblePotential G c y z:y u + z v ≤ c (u, v)for every edge ofG.IsMinCostPerfectMatching G c M:Mis a perfect matching of minimum cost.permMatching σ: the perfect matching{(u, σ u)}of a permutationσofV.
Main results #
IsMatching.sum_potential_eq:∑ e ∈ M, (y e.1 + z e.2)splits into the potentials of the matched left and right vertices.IsMatching.sum_matched_potential_le_cost(weak duality, any matching): the potentials of the matched vertices sum to at most the cost;IsMatching.sum_matched_potential_eq_cost_iff(complementary slackness): equality holds iff every edge ofMis tight.IsPerfectMatching.potential_le_cost,IsPerfectMatching.potential_eq_cost_iff: the same for perfect matchings, with all potentials summed.IsPerfectMatching.isMinCostPerfectMatching_of_tight: a perfect matching that is tight for feasible potentials has minimum cost.isPerfectMatching_permMatching,exists_eq_permMatching,matchingCost_permMatching: perfect matchings ofV × Vare exactly the permutation matchings, with cost∑ u, c (u, σ u).
References #
M is a perfect matching of G: a matching covering every left and every right vertex.
Total cost of the edges of M.
M is a minimum-cost perfect matching of G for the cost c.
The potential of a matching splits over its matched left and right vertices.
Weak duality for an arbitrary matching: the potentials of the matched vertices sum to at most the cost.
Complementary slackness for an arbitrary matching: weak duality is an equality iff every edge of the matching is tight.
Weak duality for perfect matchings: ∑ y + ∑ z ≤ cost M.
Complementary slackness for perfect matchings.
A perfect matching all of whose edges are tight for feasible potentials has minimum cost, and its cost equals the total potential.
The perfect matching {(u, σ u)} of a permutation σ.
Every perfect matching of V × V is the matching of a permutation.