Stable Matching and Kidney Exchange
Gale and Shapley asked in 1962 whether applicants and colleges can always be matched so that no pair would rather leave their partners for each other. The unit defines stability through blocking pairs, runs the deferred acceptance algorithm step by step with either side proposing, and proves that a stable matching always exists and that truthful reporting is dominant for the proposing side. It follows the algorithm into the American residency match and school choice in New York and Boston, solves a housing market by top trading cycles, and explains how kidney exchanges match donors with patients through cycles and chains.
Every market of Units 13 and 14 cleared through a price. The markets of this unit have none. A hospital does not bid for a young doctor and a school does not sell its places, yet both must be paired with applicants who have preferences of their own, and the pairing must be one that both sides are willing to live with. In 1962 two mathematicians asked whether such a pairing always exists and found an algorithm that produces one in a few rounds of proposals and rejections. Their algorithm today assigns about 40,000 medical graduates a year to hospital residencies in the United States, decides which secondary school a pupil in New York City attends, and, in a form without a second side, matches patients who need a kidney with donors who are willing to give one but cannot give it to the person they love.
1 Stability and blocking pairs
A two-sided matching market has two kinds of participants, and every participant has preferences over the participants on the other side. The program’s running example has applicants \(a_1, a_2, a_3\) on one side and hospitals \(h_1, h_2, h_3\) on the other, each hospital with one position to fill. Preferences are written as preference lists, and a list is read from left to right, so that \[ a_1 : h_1 \succ h_2 \succ h_3 \] says that applicant \(a_1\) likes \(h_1\) best, then \(h_2\), then \(h_3\). The symbol \(\succ\) means “is preferred to”. Throughout the unit the lists are strict, which means nobody is indifferent between two partners, and a participant who would rather stay unmatched than accept a particular partner leaves that partner off the list. Table 1 gives the lists of the running example, in which every participant finds every partner acceptable.
| Participant | Preference List |
|---|---|
| \(a_1\) | \(h_1 \succ h_2 \succ h_3\) |
| \(a_2\) | \(h_2 \succ h_3 \succ h_1\) |
| \(a_3\) | \(h_1 \succ h_2 \succ h_3\) |
| \(h_1\) | \(a_2 \succ a_1 \succ a_3\) |
| \(h_2\) | \(a_1 \succ a_3 \succ a_2\) |
| \(h_3\) | \(a_1 \succ a_3 \succ a_2\) |
A matching \(\mu\) pairs some applicants with some hospitals so that every applicant has at most one hospital and every hospital has at most one applicant, and we write \(\mu(a_1) = h_2\) when \(a_1\) is paired with \(h_2\). A participant whom \(\mu\) leaves without a partner is called unmatched. There are six possible matchings of the three applicants with the three hospitals if everybody is matched (\(3 \times 2 \times 1\) ways of giving each applicant a different hospital), and more if some are left out; the question is which of them a clearing house can recommend without the participants undoing it.
Consider the matching that pairs \(a_1\) with \(h_3\), \(a_2\) with \(h_2\), and \(a_3\) with \(h_1\). Applicant \(a_1\) has been given its last choice and would prefer \(h_1\). Hospital \(h_1\), paired with \(a_3\), ranks \(a_1\) above \(a_3\). So if the two of them met in a corridor, they would agree to leave their assigned partners for each other, and the recommendation would fall apart. Such a pair is said to block the matching.
Stability is the matching market’s version of the core of Unit 12. There a coalition blocked an allocation when its members could do better on their own; here the only coalitions that matter are pairs, one from each side, because a hospital and an applicant can sign a contract without asking anyone else, and for the one-to-one markets of this unit the stable matchings are exactly the core allocations.