The 3×3 example has exactly three stable matchings
ProvedStableMatching.example3_stable_iffgale-shapleystable-matching
For the instance with men and women and preferences , , , , , , a matching is stable if and only if it is one of , , .
Preamble
import Mathlib import Definitions.Def_StableMatching_GaleShapley
Formal statement
namespace StableMatching
theorem example3_stable_iff (μ : Matching 3) :
example3.IsStable μ ↔
(⇑μ = ![1, 2, 0] ∨ ⇑μ = ![0, 1, 2] ∨ ⇑μ = ![2, 0, 1]) := by sorry
end StableMatching
Source
Wikipedia, "Stable matching problem" (https://en.wikipedia.org/wiki/Stable_matching_problem), sections "Stable matching problem" (introduction), "Different stable matchings" and "Algorithmic solution"; primary reference: D. Gale, L. S. Shapley, College Admissions and the Stability of Marriage, Amer. Math. Monthly 69 (1962) 9–14, doi:10.2307/2312726.
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.