Courses › Graduate Microeconomic Theory
Matching and market design
Two-sided matching and stability, the Gale–Shapley deferred acceptance algorithm, strategy-proofness, top trading cycles, school choice, medical residency and kidney exchange.
The course ends with markets that work without prices, or with prices playing only a small role: hiring baristas and residents, assigning school seats, swapping apartments and organizing kidney exchange. Matching theory shows how to design them so that outcomes are stable, efficient and safe to participate in honestly.
You will learn stability and the Gale–Shapley deferred acceptance algorithm, the incentive properties of matching mechanisms and the redesign of the medical residency match, top trading cycles and school choice, and kidney exchange, along with the debate over repugnant transactions.
By the end of this module you will be able to
- Define stable matchings and explain why stability matters for market design.
- Run deferred acceptance and explain why it is stable and which side benefits.
- State the incentive properties of deferred acceptance and describe the residency matches with 2026 data.
- Run top trading cycles and compare the Boston mechanism, deferred acceptance and TTC for school choice.
- Explain kidney exchange with cycles and chains and present the debate over compensating donors evenhandedly.
What this module covers
- Two-sided matching and stability
- The deferred acceptance algorithm
- Incentives, the residency match, and couples
- One-sided matching: housing, schools, and top trading cycles
- Kidney exchange and markets without prices
- Problem set with step-by-step solutions
- Module quiz
Lesson 15.1 Free lesson
Two-sided matching and stability
Some markets can’t clear with prices alone. A café can’t simply post a wage and hire whoever shows up first: it cares who the barista is, and baristas care which café they join. Medical graduates and hospitals, students and schools, and kidney donors and patients face the same problem, often with prices ruled out entirely. Matching theory studies how to organize such markets.
In a one-to-one two-sided matching market (the “marriage problem” of David Gale and Lloyd Shapley, 1962), there are two sides, say baristas and cafés, each with a ranking of the people on the other side. A matching pairs each barista with at most one café and vice versa. A matching is blocked by a barista–café pair who both prefer each other to their current partners (or to being unmatched). A matching with no blocking pair, and in which no one is matched to someone worse than being alone, is stable.
Why stability? An unstable matching invites side deals: the blocking barista and café would quietly leave their assignments for each other. Markets organized around unstable outcomes tend to unravel, with participants making exploding offers earlier and earlier to lock in partners before the official process. Alvin Roth documented this unravelling in the US medical residency market before 1950 and in many other markets since.
Stability and efficiency
A stable matching is Pareto efficient for the two sides taken together: if everyone could be made weakly better off and someone strictly, some pair would have to block. But stability is stronger than efficiency: it is about what pairs can do on their own, much like the core of Module 7. In fact, in the marriage problem, stable matchings are exactly the core of the matching game.
Worked example: Spotting a blocking pair
Four baristas (Ana, Ben, Cara, Dev) and four cafés (Bean, Cup, Drip, Elm). Suppose the matching is Ana–Bean, Ben–Cup, Cara–Drip, Dev–Elm.
Cara’s ranking is Bean > Cup > Drip > Elm, and Bean’s ranking is Cara > Dev > Ben > Ana.
Cara prefers Bean to her partner Drip, and Bean prefers Cara to its partner Ana. Cara and Bean block: the matching is unstable.
Key ideas
- A matching is stable if no pair prefers each other to their assigned partners.
- Unstable matchings invite side deals and can make markets unravel.
- In the marriage problem, the stable matchings are the core.
Practice questions: Matching and market design
Try these, then open each answer to check your work.
- 1.A matching is stable if:
- Every barista and every café gets its first choice
- No barista–café pair both prefer each other to their partners
- Each side of the market has the same number of members
- It maximizes the total utility of everyone matched
Show answer
Answer: B. Stability rules out blocking pairs (and anyone matched below being alone).
- 2.In baristas-proposing deferred acceptance, a café that receives several applications:
- Hires the first applicant immediately
- Rejects all but one permanently in round 1
- Holds its favourite so far and can replace it later
- Must accept everyone
Show answer
Answer: C. Acceptance is deferred until the algorithm ends.
- 3.The proposing side in deferred acceptance gets:
- Its best stable matching
- Its worst stable matching
- A random stable matching
- An unstable matching
Show answer
Answer: A. The proposer-optimal stable matching is weakly preferred by every proposer to any other stable matching.
Problems with step-by-step solutions
- 4.Using the preferences in the tool, check whether Ana–Bean, Ben–Cup, Cara–Drip, Dev–Elm is stable. Preferences: Ana Elm > Cup > Bean > Drip; Ben Bean > Cup > Elm > Drip; Cara Bean > Cup > Drip > Elm; Dev Drip > Elm > Cup > Bean. Bean: Cara > Dev > Ben > Ana; Cup: Cara > Dev > Ana > Ben; Drip: Cara > Ana > Ben > Dev; Elm: Ben > Ana > Dev > Cara.
Show step-by-step solution
- Cara (at Drip) prefers Bean; Bean (holding Ana) prefers Cara. Blocking pair.
- Also Ana (at Bean) prefers Elm and Cup; Elm (holding Dev) prefers Ana. Another blocking pair.
- The matching is unstable.
- 5.Run baristas-proposing deferred acceptance on the problem 1 preferences.
Show step-by-step solution
- Round 1: Ana → Elm, Ben → Bean, Cara → Bean, Dev → Drip. Bean holds Cara (prefers her to Ben) and rejects Ben. Elm holds Ana, Drip holds Dev.
- Round 2: Ben → Cup. Cup holds Ben. No rejections.
- Result: Ana–Elm, Ben–Cup, Cara–Bean, Dev–Drip.
Get the full module
The complete module adds every lesson, interactive graphs, a full problem set with step-by-step solutions, and a quiz. The academy opens in January 2027: join the waitlist for the founding price (lifetime access for $179).
Join the waitlist Try a full module free
More practice: free practice questions for this course.