Algorithm Search⌘K

Theoremcore

Lattice of stable matchings

Also called Conway's lattice theorem.

The stable matchings form a distributive lattice under the common preference of one side, with the two proposer-optimal matchings at the ends.

The stable matchings of a marriage market are not just a set: they form a distributive lattice. Order them by the men's preferences; then for any two stable matchings, giving each man the better of his two partners is again a stable matching, and it gives each woman the worse of her two partners. The top of the lattice is the man-optimal matching found by men-proposing deferred acceptance, and the bottom is the woman-optimal one. The rotations of Irving and Leather describe this lattice compactly, the rural hospitals theorem says which agents are matched in all its elements, and the egalitarian stable matching is an optimization over it.

Statement

A marriage market has a set MM of men and a set WW of women, each with a strict order over the other side and the option to stay single. Let S\mathcal{S} be the set of stable matchings. For μ,μ′∈S\mu, \mu' \in \mathcal{S}, write μ⪰Mμ′\mu \succeq_M \mu' when every man weakly prefers μ(m)\mu(m) to μ′(m)\mu'(m), and μ⪰Wμ′\mu \succeq_W \mu' in the same way for women. Define μ∨μ′\mu \vee \mu' as the assignment that gives each man the better of μ(m)\mu(m) and μ′(m)\mu'(m) in his own order, and μ∧μ′\mu \wedge \mu' as the one that gives each man the worse.

Theorem (Conway; Knuth 1976). For all μ,μ′∈S\mu, \mu' \in \mathcal{S}:

  1. μ∨μ′\mu \vee \mu' and μ∧μ′\mu \wedge \mu' are matchings, and they are stable.
  2. In μ∨μ′\mu \vee \mu' each woman gets the worse of μ(w)\mu(w) and μ′(w)\mu'(w) in her order, and in μ∧μ′\mu \wedge \mu' she gets the better.
  3. (S,⪰M)(\mathcal{S}, \succeq_M) is a distributive lattice with join ∨\vee and meet ∧\wedge. Its top is the man-optimal stable matching μM\mu_M and its bottom is the woman-optimal stable matching μW\mu_W.
  4. (Polarity.) μ⪰Mμ′\mu \succeq_M \mu' if and only if μ′⪰Wμ\mu' \succeq_W \mu.

Converse (Blair 1984). Every finite distributive lattice is isomorphic to the lattice of stable matchings of some marriage market. Gusfield, Irving, Leather and Saks (1987) showed that a small market suffices.

In plain words

Take two stable matchings. Let every man pick the partner he likes more from the two. This gives a valid matching, since no two men pick the same woman, and it is stable again. Each woman ends up with the partner she likes less from the two. The same works if every man picks the one he likes less. So the stable matchings can be ordered from best for the men to best for the women. What is good for all men is bad for all women. At the top sits the matching that deferred acceptance gives when men propose, and at the bottom the one it gives when women propose.

Proof

Fix stable μ\mu and μ′\mu'. Let MμM_\mu be the men who strictly prefer μ\mu to μ′\mu', Mμ′M_{\mu'} those who strictly prefer μ′\mu', and define WμW_\mu, Wμ′W_{\mu'} for the women in the same way.

Lemma (opposite interests). μ\mu maps MμM_\mu one to one onto Wμ′W_{\mu'}, and μ′\mu' maps Mμ′M_{\mu'} one to one onto WμW_\mu.

Proof. Let m∈Mμm \in M_\mu. Then μ(m)\mu(m) is better than μ′(m)\mu'(m), which is acceptable or single, so μ(m)=w\mu(m) = w is a woman, and μ′(m)≠w\mu'(m) \ne w. If ww weakly preferred mm to μ′(w)\mu'(w), she would strictly prefer him, since μ′(w)≠m\mu'(w) \ne m, and (m,w)(m, w) would block μ′\mu'. So w∈Wμ′w \in W_{\mu'}, and μ\mu maps MμM_\mu into Wμ′W_{\mu'}. Now let w∈Wμ′w \in W_{\mu'}. Then m′=μ′(w)m' = \mu'(w) is a man, and ww strictly prefers m′m' to μ(w)\mu(w). As μ\mu is stable, (m′,w)(m', w) does not block it, so m′m' prefers μ(m′)\mu(m') to w=μ′(m′)w = \mu'(m'), strictly because μ(m′)≠w\mu(m') \ne w. So μ′\mu' maps Wμ′W_{\mu'} into MμM_\mu. Both maps are injective, so ∣Mμ∣=∣Wμ′∣|M_\mu| = |W_{\mu'}| and both are bijections. The second statement follows by swapping μ\mu and μ′\mu'. □\square

Parts 1 and 2. Let λ=μ∨μ′\lambda = \mu \vee \mu'. A man in MμM_\mu gets μ(m)\mu(m), a woman of Wμ′W_{\mu'}; a man in Mμ′M_{\mu'} gets μ′(m)\mu'(m), a woman of WμW_\mu; every other man gets the common partner μ(m)=μ′(m)\mu(m) = \mu'(m), and that woman also has μ(w)=μ′(w)\mu(w) = \mu'(w). By the lemma these three groups of women are disjoint and each is hit once, so λ\lambda is a matching. Each woman of Wμ′W_{\mu'} gets μ(w)\mu(w), her worse partner, and each woman of WμW_\mu gets μ′(w)\mu'(w), also her worse partner. All partners in λ\lambda are partners in μ\mu or μ′\mu', so they are acceptable. Suppose (m,w)(m, w) blocks λ\lambda. Then mm prefers ww to both μ(m)\mu(m) and μ′(m)\mu'(m). Say λ(w)=μ(w)\lambda(w) = \mu(w); then ww prefers mm to μ(w)\mu(w), and (m,w)(m, w) blocks μ\mu. If λ(w)=μ′(w)\lambda(w) = \mu'(w), the pair blocks μ′\mu'. Both are impossible, so λ\lambda is stable. The meet μ∧μ′\mu \wedge \mu' is the join for the women, so the same proof applies with the roles of the sides swapped.

Part 3. Each man's partner in μ∨μ′\mu \vee \mu' is the maximum of his two partners in a chain (his order), so any stable ν\nu with ν⪰Mμ\nu \succeq_M \mu and ν⪰Mμ′\nu \succeq_M \mu' has ν⪰Mμ∨μ′\nu \succeq_M \mu \vee \mu'. Hence ∨\vee is the least upper bound, and ∧\wedge is the greatest lower bound in the same way. The identity μ∨(μ′∧μ′′)=(μ∨μ′)∧(μ∨μ′′)\mu \vee (\mu' \wedge \mu'') = (\mu \vee \mu') \wedge (\mu \vee \mu'') holds man by man, because maximum and minimum on a chain distribute over each other. A finite lattice has a top and a bottom; by the theorem of Gale and Shapley, the top is μM\mu_M, which every man weakly prefers to every stable matching, and the bottom is μW\mu_W.

Part 4. If μ⪰Mμ′\mu \succeq_M \mu', then Mμ′M_{\mu'} is empty, so WμW_\mu is empty by the lemma, which says μ′⪰Wμ\mu' \succeq_W \mu. The converse is symmetric. ■\blacksquare

Consequences

  • Optimal matchings. The lattice gives a second proof that a man-optimal and a woman-optimal stable matching exist, and polarity says that the man-optimal one is the woman-pessimal one.
  • Rotations. Irving and Leather (1986) showed that the lattice is the lattice of closed sets (down-sets) of a partial order on rotations, a set of at most n(n−1)/2n(n-1)/2 elements for nn men and nn women. Moving down the lattice one step eliminates one rotation. See stable matching rotations.
  • Algorithms. Gusfield (1987) used rotations to list all stable matchings in O(n2+n∣S∣)O(n^2 + n|\mathcal{S}|) time. The number of stable matchings can be exponential in nn, and counting them is #P-complete (Irving and Leather 1986).
  • Optimization over the lattice. A weighted objective that is a sum over agents becomes a weight on rotations, and optimizing it becomes a maximum-weight closure problem: see egalitarian stable matching.
  • Same matched agents. All elements of the lattice match the same set of agents; see the rural hospitals theorem.
  • Fixed points. Stable matchings are the fixed points of a monotone map on a complete lattice of proposals, so the lattice structure is also an instance of the Knaster-Tarski theorem (Adachi 2000).

Tightness

  • Example with four elements. Take two copies of the two-by-two market in which men and women rank each other in opposite ways: m1m_1: w1,w2,…w_1, w_2, \ldots; m2m_2: w2,w1,…w_2, w_1, \ldots; w1w_1: m2,m1,…m_2, m_1, \ldots; w2w_2: m1,m2,…m_1, m_2, \ldots, and the same for m3,m4,w3,w4m_3, m_4, w_3, w_4, with partners of the other copy at the ends of all lists. Each copy can be matched in two stable ways, independently, so there are four stable matchings that form a diamond: {m1w1,m2w2,m3w3,m4w4}\{m_1 w_1, m_2 w_2, m_3 w_3, m_4 w_4\} at the top, {m1w2,m2w1,m3w4,m4w3}\{m_1 w_2, m_2 w_1, m_3 w_4, m_4 w_3\} at the bottom, and the two mixed ones in between. The join of the two mixed ones is the top.
  • Roommates. In the stable roommates problem a stable matching may not exist, and the set of stable matchings has no lattice structure in general.
  • Ties. With ties in the orders, the weakly stable matchings do not form a lattice and can differ in size; see stable matching with ties.
  • Many-to-one. In the hospitals-residents problem with ordinary orders over residents, the lattice theorem still holds, through the reduction that splits a hospital into one copy per seat. With couples it fails, since stable matchings may not exist at all.

History

Knuth (1976) published the lattice theorem in his lectures on stable marriage and credited the join and meet construction to John Conway. Gale and Shapley (1962) had already shown that the proposing side gets its optimal stable matching. Irving and Leather (1986) introduced rotations and the rotation poset. Blair (1984) proved that every finite distributive lattice arises, and Gusfield, Irving, Leather and Saks (1987) gave small instances.

References

  1. David Gale and Lloyd S. Shapley, College admissions and the stability of marriage, American Mathematical Monthly 69(1), 9 to 15 (1962), the whole paper (existence of a stable matching that is optimal for the proposing side)
  2. Robert W. Irving and Paul Leather, The complexity of counting stable marriages, SIAM Journal on Computing 15(3), 655 to 667 (1986), the whole paper (rotations, the rotation poset, and the counting problem)
  3. Charles Blair, Every finite distributive lattice is a set of stable matchings, Journal of Combinatorial Theory, Series A 37(3), 353 to 356 (1984), the whole paper
  4. Dan Gusfield, Robert W. Irving, Paul Leather and Michael Saks, Every finite distributive lattice is a set of stable matchings for a small stable marriage instance, Journal of Combinatorial Theory, Series A 44(2), 304 to 309 (1987), the whole paper
  5. Dan Gusfield, Three fast algorithms for four problems in stable marriage, SIAM Journal on Computing 16(1), 111 to 128 (1987), the whole paper (enumeration of all stable matchings with rotations)
  6. Dan Gusfield and Robert W. Irving, The Stable Marriage Problem, Structure and Algorithms, MIT Press (1989), the chapter on the structure of the set of stable matchings

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/5RCMG6/text.yaml