Professional Documents
Culture Documents
Matching Markets
Matching Markets
Jonathan Levin
Economics 136
Winter 2010
National Residency Match
Doctors in U.S. and other countries work as hospital
“residents” after graduating from medical school.
In the US, about 15,000 US med students and many foreign-
trained doctors seek residencies each year.
About 4000 hospitals try to fill 20,000+ positions.
Market operates as a central clearinghouse
Students apply and interview at hospitals in the fall.
In February, students and hospitals state their preferences
Each student submits rank-order list of hospitals
Each hospital submits rank-order list of students
Computer algorithm generates an assignment.
Why run a market this way? Does it make sense?
History of NRMP
It wasn’t always this way.
Historically, medical students found residencies through a
completely decentralized process.
But there were problems: students and hospitals made contracts
earlier and earlier, eventually in second year of med school!
Hospitals decided to change the system by adopting a
centralized clearinghouse.
National Residency Matching Program (NRMP) adopted, after
various adjustments in 1952.
System has persisted, though with some modification in late
1990s to handle couples and some recent debate about salaries.
In the early 1980s, it was realized that the NRMP was using an
algorithm proposed by David Gale and Lloyd Shapley in 1962.
Properties they discovered may help explain NRMP success.
School Choice
Most US cities have historically assigned children to
neighborhood schools.
Recently, many cities have adopted school choice programs, that
try to account for the preferences of children and their parents.
School authorities hope choice will lead to more efficient
placements without sacrificing fairness or creating confusion.
Problem seems similar to residency assignment
The most commonly used mechanism, however, is quite
different, and arguably has less desirable properties.
Maybe cities should redesign their programs? In fact, NYC
recently adopted Gale-Shapley algorithm.
As it turns out, school choice is not exactly the same as the
residency problem, and maybe improvements are still possible…
Kidney Exchanges
More than 75,000 people in the United States are waiting to
receive a kidney transplant.
There is a shortage of donors
Deceased donors (maybe 10,000 a year)
So sometimes patient has a living donor, but can’t use the kidney
because of incompatibility.
Maybe two patients could trade donor kidneys, or several
patients could engage in a kidney exchange.
It turns out that matching theory can also help us understand this
problem, and make optimal use of a limited pool of donors.
Matching applications galore!
What are the common features of these problems?
Two sides of the market to be matched.
Participants on at least one side, and sometimes on both sides
care about to whom they are matched.
For whatever reason, money cannot be used to determine the
assignment. (Why not?)
Other examples
Housing assignment College admissions
Fraternity/sorority rush Judicial clerkships
MBA course allocation Military postings
Dating websites NCAA football bowls
Matching Theory
Marriage Model
Participants
Set of men M, with typical man mM
Set of women W, with typical woman w W.
One-to-one matching: each man can be matched to one
woman, and vice-versa.
Preferences
Each man has strict preferences over women, and vice
versa.
A woman w is acceptable to m if m prefers w to being
unmatched.
Matching
A matching is a set of pairs (m,w) such that each
individual has one partner.
If the match includes (m,m) then m is unmatched.
A matching is stable if
Every individual is matched with an acceptable partner.
There is no man-woman pair, each of whom would prefer
to match with each other rather than their assigned partner.
If such a pair exists, they are a blocking pair and
the match is unstable.
Examples
Two men m,m’ and two women w,w’
Example 1
m prefers w to w’ and m’ prefers w’ to w
w prefers m to m’ and w’ prefers m’ to m
Unique stable match: (m,w) and (m’,w’)
Example 2
m prefers w to w’ and m’ prefers w’ to w
w prefers m’ to m and w’ prefers m to m’
Two stable matches {(m,w),(m’,w’)} and {(m,w’),(m’,w)}
First match is better for the men, second for the women.
Is there always a stable match?
Deferred Acceptance Algorithm
Men and women rank all potential partners
Algorithm
Each man proposes to highest woman on his list
Women make a “tentative match” based on their preferred
offer, and reject other offers, or all if none are acceptable.
Each rejected man removes woman from his list, and
makes a new offer.
Continue until no more rejections or offers, at which point
implement tentative matches.
This is the “man-proposing” version of the algorithm;
there is also a “woman proposing” version.
DA in pictures
Stable matchings exist
Theorem. The outcome of the DA algorithm is a stable
one-to-one matching (so a stable match exists).
Proof.
Algorithm must end in a finite number of rounds.
Suppose m, w are matched, but m prefers w’.
At some point, m proposed to w’ and was rejected.
At that point, w’ preferred her tentative match to m.
As algorithm goes forward, w’ can only do better.
So w’ prefers her final match to m.
Therefore, there are NO BLOCKING PAIRS.
Aside: the roommate problem
Suppose a group of students are to be matched to
roommates, two in each room.
Example with four students
A prefers B>C>D
B prefers C>A>D
C prefers A>B>D
No stable match exists: whoever is paired with D wants to
change and can find a willing partner.
So stability in matching markets is not a given, even
if each match involves just two people.
Why stability?
Stability seems to explain at least in part why some
mechanisms have stayed in use.
If a market results in stable outcomes, there is no incentive
for re-contracting.
Roth (1984) argues that stability of NRMP (which uses
Gale-Shapley) helps explain why it has “stuck” as an
institution.
When we look at related markets, many though not all
unstable matching mechanisms have failed.
What would be an alternative?
Decentralized market
What if there is no clearinghouse?
Men make offers to women
Women consider their offers, perhaps some accept and
some reject.
Men make further offers, etc..
What kind of problems can arise?
Maybe w holds m’s offer for a long time, and then rejects it,
but only after market has cleared.
Maybe m makes exploding offer to w and she has to
decide before knowing her other options.
In general, no guarantee the market will be orderly…
Priority matching
Under priority matching, men and women submit preferences,
Each man-woman pair is given a priority based on their mutual
rankings.
The algorithm matches all priority 1 couples and takes them out
of the market.
New priorities are assigned and process iterates.
Example:
Assign priority based on product of the two rankings, so that
priority order is 1-1, 2-1, 1-2, 1-3, 3-1, 4-1, 2-2, 1-4, 5-1, etc…
Algorithm implements all “top-top” matches, then conditional top-
tops, etc. When none remain, look for 2-1 matches, etc.
Will this lead to a stable matching?
Failure of priority matching
Roth (1991, AER) studied residency matches in
Britain, which are local and have used different
types of algorithms --- a “natural experiment”.
Newcastle introduced priority matching in 1967.
By 1981, 80% of the preferences submitted contained only
a single first choice.
The participants had pre-contracted in advance!
This is the type of “market unraveling” that plagued
the US residency market prior to the NRMP.
We’ll have more to say about unraveling later.
Success of stable mechanisms
Market Stable? Still Used?
NRMP yes yes
US Medical Specialties (about 30) yes yes*
UK Residency matches (Roth, 1991)
Edinburgh yes yes
Cardiff yes yes
Birmingham no no
Newcastle no no
Sheffield no no
Cambridge no yes
London hospital no yes
Canadian lawyers yes yes*
Pharmacists yes yes
Reform rabbis yes yes
Clinical psychologists yes yes
Optimal stable matchings
A stable matching is man-optimal if every man prefers
his partner to any partner he could possibly have in a
stable matching.
Proof.
Fix the reports if all the women and all but one man.
Proof.
Consider the student-proposing algorithm.
If a hospital rejects a student at round n, then if an any
subsequent round the that same student made a new offer to the
hospital, the hospital would still reject them
This holds after algorithm ends, so result is stable.
Applicants
Programs
Programs with ROL 3170 3622 3662 3745 3758
Ugh again…
NYC Schools
Each student (90,000 plus applying to high schools)
can submit up to five applications.
Each school receives applications and makes offers, plus it
makes a waiting list.
Students accept and reject offers.
Schools make offers from wait lists (three rounds)
Roughly 30,000 students would be unassigned at
the end; they would be administratively assigned.