How a matchmaking algorithm saved lives
By: University Of California
Tags: Valentines Day, Innovation, Economics

The goal is to find stable matches between two sets of people who have different preferences and opinions on who is their best match.

The central concept is that the matches should be stable: There should be no two people who prefer each other to the partners they actually got.

Gale and Shapley developed the deferred acceptance algorithm (also known as the Gale-Shapley algorithm).

It establishes a system by which everyone is able to find the person they most prefer from among those who prefer them.

The men and women each rank their preferences.

And then they are sorted using the algorithm:

For any number of partners, no matter how they rank each other, it is possible to use the Gale-Shapley algorithm to find at least one stable partnership for each person.

But life isn’t a Jane Austen novel

You may have noticed that out in the real world, this isn’t exactly how dating or marriage works. For example, the model doesn’t take into account gay couples, bisexuality or people who prefer to be single.

So what’s the value of this kind of research? A lot, as it turns out.

Gale and Shapley weren’t really trying to crack the code on romance. What they were seeking was an approach to so-called matching markets — where there is supply and demand, but no money changes hands. Marriage was simply a way to illustrate the problem.

When they began, their work was purely theoretical. But as is often the case with basic research, it ended up having applications in practical and important ways.

Assigning new doctors to hospitals

In the 1980s, a Harvard economist named Alvin Roth (now at Stanford) was interested in approaching economics like an engineering discipline — using theoretical ideas to improve real-world systems.

He wanted to diagnose matching markets that weren’t working and adapt the Gale-Shapley algorithm to help them work more efficiently.

Roth, with backing from the National Science Foundation, began looking at the National Residency Match Program (NRMP), a system that assigns new doctors to hospitals around the country.

In the 1990s, the NRMP was struggling because new doctors and hospitals were often both unsatisfied with its assignments.

Roth used Gale and Shapley’s work to reshape the NRMP matching algorithm so that it produced matches that were more stable.

Pairing students to public schools

The Gale-Shapley algorithm also proved useful in helping large urban school districts assign students to schools.

New York City, like many cities, enables students to select a high school by ranking their preferred choices from among all its schools.

Before Roth and his colleagues redesigned it, the public high school assignment process was a mess. About 30,000 students a year were left unmatched and ended up at schools they hadn’t even listed.

The process of matching doctors or students is a little more complex than matching romantic partners since hospitals and schools — unlike most couples — accept many proposals.

But the underlying principle of deferred acceptance that Gale and Shapley defined is the same.

Helping transplant patients find a match

The real breakthrough came in 2004. That is when Roth developed the matchmaking principle to help transplant patients find donors.

At the time, less than 20 people each year received kidneys from living donors, even though transplants from living donors produce much better patient outcomes.

The frequency of these life-saving procedures was limited by a simple, heartbreaking problem: Many people are willing to donate a kidney to a loved one but they cannot because blood type and other factors make them incompatible.