02 SM
02 SM
𝑟′ h′
Stable Matching, More Formally
Perfect matching:
•Each rider is paired with exactly one horse.
•Each horse is paired with exactly one rider.
Stability: no ability to exchange
an unmatched pair - is blocking if they both prefer each
other to current matches.
Stable matching: perfect matching with no blocking pairs.
h 1 ,h2 ,h3 𝑟1 h 1𝑟 2 , 𝑟 3 , 𝑟 1
h 1 ,h3 ,h 2 𝑟2 h2 𝑟3 , 𝑟1 , 𝑟2
h 1 ,h2 ,h3 𝑟3 h3 𝑟3 , 𝑟1 , 𝑟2
Proposals:
Does this algorithm work?
Does it run in a reasonable amount of time?
Is the result correct (i.e. a stable matching)?
Hint: must have been rejected a lot – what does that mean?
Claim 1: If proposed to the last horse on
their list, then all the horses are matched.
Hint: must have been rejected a lot – what does that mean?
Efficient?
Halts in steps. ✔
Works?
Need a matching that’s:
• Perfect
• Has no blocking pairs
Claim 3: The algorithm identifies a perfect
matching.
Why?
𝑟2 h 2 …𝑟 1 …𝑟 2 …
Claim 4: The matching has no blocking
pairs.
…h 2 …h1 … 𝑟1 h1
𝑟2 h 2 …𝑟 1 …𝑟 2 …
How did end up matched to ?
He must have proposed to and been rejected by
(Observation A).
Why did reject ? It got a better offer from some .
If ever changed matches after that, the match was only
better for it, (Observation C) so it must prefer (its final
match) to .
A contradiction!
Result
Simple, algorithm to compute a stable matching
Corollary
A stable matching always exists.
The corollary isn’t obvious!
The “stable roommates problem” doesn’t always have
a solution:
people, rank the other
Goal is to pair them without any blocking pairs.
Multiple Stable Matchings
h 1 , h2 𝑟 1 h 1𝑟 2 , 𝑟 1
h 2 , h1 𝑟 2 h 2𝑟 1 , 𝑟 2
Proposer-Optimality
Every member of the proposing side is
matched to their favorite of their feasible
partners.
Proposer-Optimality 𝑟 h′
Proposer-Optimality
Every member of the proposing side is
matched to the favorite of their feasible
partners. 𝑟′ h
Let’s prove it – again by contradiction
Suppose some rider is not matched to their favorite feasible partner.
Then some must have been the first to be rejected by their favorite
feasible partner, . (Observation A)
And there is an that (temporarily) matched to causing that rejection.
Chooser-Pessimality
Every member of the choosing (non-
proposing) side is matched to their least
favorite of their feasible partners.
Some More Context and Takeaways
Stable Matching has another common name: “Stable
Marriage”
The metaphor used there is “men” and “women” getting
married.