Markets by Design
Can a market be engineered, when prices cannot do the work?
The part opens with the American market for medical interns, which unravelled until hospitals hired students two years before graduation, then congested into exploding offers, until in 1952 the hospitals and students built a clearinghouse that Alvin Roth later showed was Gale and Shapley's algorithm. The viewer ranks three workshops under the Boston rule and finds the truth punished, then meets mechanisms and the revelation principle, Clarke's pivot rule for a footbridge, Myerson and Satterthwaite's impossible bargain, stable matching run on a board, and who should propose. After an intermission of a century and a half of American marriages, Britain's clearinghouses with Called it? on Roth's stability claim, couples and the 1998 redesign, school choice in Boston, New York and China, huts and kidney exchange with chains, why markets fail to form and repugnance, the assignment game, what a school lottery reveals, a new dial on what a sought-after school adds, clearinghouses and platforms, and a frontier on refugee placement and very large markets.
What you need. Part 9: efficiency; Part 11: dominant strategies and Nash equilibrium; Part 16: Vickrey and the envelope argument. Chapter 4 uses double integrals over the unit square; chapter 11 a small linear programme; chapter 12 two-stage least squares (Part 4).
- Hook
- the scramble for medical interns, 1945–51
- Ideas, models and mathematics
- the revelation principle, VCG, the Myerson–Satterthwaite impossibility, deferred acceptance and its proof, the residents' match, school choice, top trading cycles and kidney exchange, unravelling and congestion
- Agora gains
- a clearinghouse
- Play it
- rank your schools: should you tell the truth?
What you will be able to do
Principles and the major
- Explain unravelling, congestion and safety as reasons markets fail to form, with the interns' market and school choice as examples.
- Run deferred acceptance and the Boston rule by hand, find blocking pairs, and explain why the Boston rule rewards strategic lists.
- Explain kidney exchange, cycles and chains, and the role of repugnance.
Graduate
- Prove that deferred acceptance yields a stable matching that is optimal for the asking side, and that truth is dominant for that side.
- State the revelation principle; derive Clarke's pivot rule and explain why its budget cannot balance; compute gains from trade under Myerson and Satterthwaite.
- Run top trading cycles and find the core of an assignment game.
Research
- Use the lotteries inside a centralized match to estimate school effects, controlling for each applicant's chance of an offer, and read the evidence on sought-after schools.
Practice
- Design a clearinghouse for a real market, from its rules and details to its simulation and its evaluation.
Contents
Each chapter has a home level. Choose a track to see what to read and watch: Principles and the major 35 min · Graduate 36 min · Research 39 min · Practice 36 min.
- 0Can a market be engineered, when prices cannot do the work?Principles and the major4 min
- 1Play it: rank three workshopsPrinciples and the major2 min
- 2Mechanisms, and the revelation principlePrinciples and the major3 min
- 3Vickrey, Clarke and Groves: pay for the harm you doPrinciples and the major3 min
- 4Myerson and Satterthwaite: no perfect bargainPrinciples and the major2 min
- 5Stable matching: Gale and ShapleyPrinciples and the major1 min
- 6Who should propose?Principles and the major2 min
- Intermission: the oldest matching marketPrinciples and the major
- 7The residents' matchPrinciples and the major3 min
- 8School choicePrinciples and the major2 min
- 9Huts and kidneysPrinciples and the major3 min
- 10Why markets fail to formPrinciples and the major2 min
- 11Matching with money: the assignment gamePrinciples and the major2 min
- 12What a lottery revealsPrinciples and the major3 min
- 13The Dials: what a sought-after school addsResearch1 min
- 14In practice: clearinghouses and platformsPractice1 min
- 15Frontier: refugees, learning and large marketsResearch2 min
- Recap, problems, and the road aheadAll tracks3 min
Also on this page: Lecture · Key results · Try it · Lab · Problems · Notes and sources · Build the film.
Lecture
The text of each chapter is the film's narration, as it is spoken, so you can read along or revise without the film. The pictures are in the film.
Can a market be engineered, when prices cannot do the work?Principles and the major4 min
By 1940, American hospitals were hiring their interns two years before the students graduated from medical school. Each hospital wanted the best students, so it made its offers a little earlier than the others. So the others went earlier still. Economists call it unravelling. A hospital hiring in a student's second year could not tell who would be good, and the student could not tell what they wanted. As Alvin Roth tells it, a student with an A in anatomy signs up to be a surgeon, and discovers a year later that they faint at the sight of blood. In 1945 the medical schools acted: they would send no grades and no letters before a fixed date.
It worked, and offers moved back to the final year. Then a new problem appeared. In 1945 the rule was that an offer stayed open for ten days. A student holding an offer from a third choice, and told by a second choice that an offer might come, would wait. With everyone waiting, no waiting list moved, and the tenth day was chaos. In 1946 the rule became eight days. By 1950 the hospitals thought twelve hours too long: offers came by telephone, to be answered on the spot. Exploding offers, in a market too congested to clear.
Then the doctors and hospitals did something remarkable. In 1952 they set up a clearinghouse. Students ranked the hospitals where they had interviewed, hospitals ranked the students, and a procedure did the rest. Joining was voluntary, yet within a few years nearly everyone went through it. In the 1950s it ran on card-sorting machines. In 1962 two mathematicians, David Gale and Lloyd Shapley, published a puzzle about marriage: how to pair off men and women so that no two would rather be with each other. In 1984 Alvin Roth showed that the hospitals' procedure was Gale and Shapley's algorithm, found by trial and error ten years before the mathematicians. In 2012 Roth and Shapley shared the Nobel prize.
Clearinghouses like it now run many markets. Tens of thousands of young doctors a year. Places at public schools, in New York, Boston, Denver and many other cities. Kidneys, swapped between patients and the donors who love them but cannot give to them. University places, across China. Homes for refugees. In every one, prices are banned, or simply cannot do the work: a school place, a kidney or a hospital job is not sold to the highest bidder.
Part sixteen designed markets with prices. This part asks whether a market can be engineered when prices cannot do the work. Can a rule make it safe for people to say what they really want? Can it find an outcome nobody wants to break, with no pair who would rather go off together? And when the rules are wrong, what happens to a market?
Economics, Built. Part seventeen: markets by design. This part continues Act Four. You'll rank three workshops under the rule Boston's schools once used, then meet mechanisms and the revelation principle. Vickrey, Clarke and Groves's way to make truth pay, and Myerson and Satterthwaite's proof that no bargain is perfect. Stable matching, run on a board; who should propose; and the redesign of the doctors' match. School choice; huts and kidneys; why markets fail to form; and matching with money. Then what a school lottery reveals, a dial for schools, and a frontier of refugees and very large markets.
What it does: Interns hired two years early by 1940; grades withheld from 1945; offers open 10 days (1945), 8 (1946), less than twelve hours (by 1950); the 1952 clearinghouse on card-sorting machines; Gale and Shapley (1962) and Roth (1984); markets without prices today; the question; objectives
1Play it: rank three workshopsPrinciples and the major2 min
You are one of four island children, and three workshops are taking apprentices: one place at the boatyard, one at the kiln, and two at the net loft. Each child lists the workshops in order, and a single lottery decides every tie. The places are given out by what was called the Boston rule. In round one, everyone applies to the first workshop on their list, and places go by lottery, for good. In round two, those still without a place apply to their second choice, if it has room left, and so on. Here is what everyone wants, and the lottery: Ana drew first, Bo second, you third, and Dara fourth. You love the boatyard most, then the kiln. Do you put the boatyard first on your list, or the kiln? Pause, and decide.
Now suppose you had put the kiln first. In round one, you and Dara both apply to the kiln, and your lottery number is better than Dara's. You get the kiln, your real second choice, and Dara ends up at the net loft. Under the Boston rule, listing your true favourite first can cost you your second choice as well. And when you told the truth, the outcome was unfair: Dara got the kiln, though you wanted it more than the loft and drew the better number. A family that plays the system beats one that tells the truth, and in Boston, Atila Abdulkadiroğlu and Tayfun Sönmez pointed out in 2003, the rule rewarded families who knew that.
There is another way to run the same lists. In deferred acceptance, a workshop only holds on to its best applicants so far, and nothing is final until nobody is turned away. You apply to the boatyard, which holds Ana instead. Then you apply to the kiln, where your lottery number beats Dara's, and the kiln lets her go. You get the kiln by telling the truth, and no list you could write would do better. Boston switched to this rule in 2005, and chapter five shows why it works.
What it does: Four children (you, Ana, Bo, Dara), one place at the boatyard, one at the kiln, two at the net loft; lottery Ana, Bo, you, Dara; under the Boston rule the truth gets you the net loft and listing the kiln first gets you the kiln; Dara's kiln is a blocking pair; under deferred acceptance the truth gets you the kiln and nothing does better
2Mechanisms, and the revelation principlePrinciples and the major3 min
The Boston rule is a mechanism. A mechanism is any rule that turns what people say into what happens. An auction is one, and so is a vote, a school assignment, or a tax. The trouble is that people know things the designer does not: what things are worth to them, what they prefer, what they cost. And they will say whatever gets them the most, given how everyone else plays, as you were tempted to in Play it. From 1960 Leonid Hurwicz built a theory of rules designed in the knowledge that they will be played as games. He shared the 2007 Nobel prize for it, with Eric Maskin and Roger Myerson.
Which rules are worth considering, when every rule will be gamed? A simple picture cuts the search down. Under any rule, each person goes from what they know to their best play, and the rule turns the plays into what happens. Now build a new rule: tell me what you know, and I will make your best play for you. Under the new rule, telling the truth is a best reply, since lying would only make the rule play for someone you are not. So whatever any rule can achieve in equilibrium, a rule where the truth is safe can achieve too. That is the revelation principle, and it lets a designer look only at rules where people tell the truth.
Here is what a designer usually wants. The outcome should be efficient. Telling the truth should be safe. Taking part should be voluntary, with nobody worse off than if they had stayed away. The rule should pay for itself, without outside money. And, when people are being matched, it should be stable: no pair should want to break away together. Vickrey, Clarke and Groves's rule is efficient, truthful and voluntary, but does not pay for itself, as chapter three shows. The double auction pays for itself but is not efficient: chapter four. The Boston rule fails on truth and on stability. Deferred acceptance is stable, and truthful for the side that proposes. And top trading cycles, in chapter nine, is efficient and truthful but not stable. No rule ticks every box, and there are theorems saying none can.
What it does: Mechanisms as rules played as games (Hurwicz); the revelation principle in one picture; a checklist of efficiency, safe truth, voluntary participation, budget balance and stability against VCG, the double auction, the Boston rule, DA and TTC
3Vickrey, Clarke and Groves: pay for the harm you doPrinciples and the major3 min
Back to the island. A footbridge across the creek would cost a hundred shells, twenty-five from each of four islanders. It is worth sixty to Ana, ten each to Bo and Chidi, and forty to Dara. Take away each one's share, and this is what the bridge is worth to them, net. The net values add up to plus twenty, so the bridge is worth building. But ask them, and each has a reason to lie. Ana, who wants it, should exaggerate; Bo and Chidi, who would rather keep their shells, should play their values down. Part fifteen's free riders are back.
Edward Clarke in 1971 and Theodore Groves in 1973 found a way to make the truth pay, extending Vickrey's idea. Ask each person what the bridge is worth, and build it if the reported net values add up to zero or more. Then charge anyone whose report changes the decision the net loss that change causes everyone else. Without Ana, the others' net values add up to minus fifteen, and no bridge would be built. So Ana is pivotal, and pays fifteen shells on top of her share: the harm her wish does to the others. Nobody else changes the decision, so nobody else pays anything extra. With this charge, each person's payoff moves one for one with everyone's total net value, so the best report is the truth, whatever the others say. It is Vickrey's second-price auction again: pay for the harm you do.
The rule is beautiful, and rarely used. Lawrence Ausubel and Paul Milgrom called it lovely but lonely. The fifteen shells Ana pays cannot be handed back to the islanders, because if they expected a refund, their reports would change it, and the truth would no longer be best. The money must be thrown away, or given to someone outside. Jerry Green and Jean-Jacques Laffont proved in 1977 that no rule of this kind can always balance its books. Two islanders who lie together can beat it, and in some auctions it raises next to nothing. And it asks everyone to report every value, which in a market with many goods is a great deal to ask.
What it does: A footbridge costing 100, values 60, 10, 10, 40; net values +35, -15, -15, +15 sum to +20; Ana is pivotal and pays 15; truth dominant; the 15 cannot be returned (Green and Laffont 1977); collusion, low revenue, complexity
4Myerson and Satterthwaite: no perfect bargainPrinciples and the major2 min
Now the simplest market of all: one buyer, one seller, one good. The seller's cost and the buyer's value are each somewhere between nothing and one, equally likely, and each knows only their own. Trade is worth doing whenever the value is above the cost: the green triangle. Done every time, the expected gains are one sixth. A posted price of one half trades only in the red square, where the cost is below a half and the value above it, and gets three quarters of the gains. In the double auction, where both name a price and trade happens at the midpoint if the buyer's is higher, each shades, and in equilibrium they trade only when the value beats the cost by a quarter: the yellow triangle, eighty-four percent of the gains. Roger Myerson and Mark Satterthwaite proved in 1983 that no voluntary rule that pays for itself does better, and none gets every good trade done.
There is a short way to see why. Run Vickrey's rule on both sides at once. The buyer pays the seller's cost, and the seller receives the buyer's value. Each now gains the whole surplus of the trade, so the truth is safe for both, and every good trade happens. But each trade leaves a gap, the value less the cost, that someone outside must pay. On average that is one sixth: the entire surplus. By the envelope argument of part sixteen, any rule that gets every trade done with truthful reports costs the same. So when values are private, bargaining always wastes some good trades. It is a friction in the market itself, and no designer can remove it.
What it does: Values and costs uniform on [0, 1]: every good trade gives 1/6; a posted price of 1/2 gives 1/8 (75%); the double auction's linear equilibrium, trading when v >= c + 1/4, gives 9/64 (84%), the best possible; Vickrey's rule on both sides needs an outside subsidy of the whole surplus
5Stable matching: Gale and ShapleyPrinciples and the major1 min
Four apprentices, Ana, Bo, Chidi and Dara, are to be placed in four workshops. Each apprentice ranks the workshops, on the left, and each workshop ranks the apprentices, on the right. Here is one way to pair them. It has a problem. Dara would rather be at the boatyard than where she is, and the boatyard would rather have Dara than the apprentice it got. The two of them can simply walk off together, and the arrangement falls apart. Gale and Shapley called such a pair a blocking pair. A matching with no blocking pair is stable. Can one always be found?
Why does it always work? It must end, because no apprentice asks the same workshop twice. With enough places and everyone acceptable, everyone ends up placed. And it is stable. Suppose Ana prefers some workshop to the one she ends with. Then she asked it earlier, and it turned her away for someone it liked better. A workshop only ever trades up, so it ends with someone it likes even more. So that workshop does not want Ana back, and no blocking pair can exist. That is Gale and Shapley's theorem of 1962: a stable matching always exists, and the algorithm finds one.
What it does: Four apprentices, four workshops; a blocking pair (Dara and the boatyard); deferred acceptance in six rounds, with five rejections; Ana at the net loft, Bo at the grove, Chidi at the kiln, Dara at the boatyard; the proof
6Who should propose?Principles and the major2 min
Agora checked every one of the twenty-four ways to pair the board, and three are stable. The algorithm we ran, with apprentices asking, found the top one. Run it the other way round, with workshops asking, and it finds the bottom one, in two rounds. And there is one in between. They line up: every apprentice likes the top matching at least as well as the other two, and every workshop likes it least. It is a general fact. The asking side gets its best stable matching, as Gale and Shapley proved, and, as later work showed, the other side gets its worst. Interests are opposed along the line, and the stable matchings form what mathematicians call a lattice.
Who asks matters for honesty too. For the side that asks, telling the truth is a dominant strategy: no list you could write gets you a better partner. Lester Dubins and David Freedman proved it in 1981, and Roth independently in 1982. For the side that is asked, a carefully judged lie, turning down someone you would accept, can sometimes push the outcome down the lattice in your favour. And Roth showed that no stable rule makes the truth safe for everyone. But in a large market, with many people on each side, the room for such lies nearly vanishes: almost nobody can gain. So a designer chooses who asks, and in a large market the choice hardly changes anything. The doctors' match switched to applicants asking in 1998, as chapter seven tells.
What it does: The board's three stable matchings, ordered: the apprentices' best (DA with apprentices asking), the workshops' best (two rounds with workshops asking) and one between; truth dominant for the asking side; no stable rule safe for both; large markets
Intermission: the oldest matching marketPrinciples and the major
This chapter has no narration to read.
7The residents' matchPrinciples and the major3 min
In 1984 Roth showed that the doctors' clearinghouse produced stable matches, and argued that this was why it had survived: a match that a doctor and a hospital could both profitably walk away from would not last. Britain offered a test. In the 1960s its market for new doctors unravelled as the American one had, and a Royal Commission said, in effect, do what the Americans do. But nobody had published how the American clearinghouse worked, so each region of the health service built its own. Edinburgh's of 1969 and Cardiff's produced stable matches, and both were still in use. Birmingham's, Edinburgh's of 1967, Newcastle's and Sheffield's did not, and all four were abandoned. Two unstable ones survived, at Cambridge and at the London Hospital, but each matched the students of one medical school to the jobs of one hospital, where it was hard to act on an instability.
Called it? In 1984 Roth said that a clearinghouse survives if its matches are stable, and that one whose matches can be blocked will be abandoned. In Britain, both stable clearinghouses were still in use, four of the six unstable ones had been abandoned, and the two survivors were the special cases of one school and one hospital. Right. And when John Kagel and Roth ran the same comparison in the laboratory in 2000, the stable clearinghouse stopped the market unravelling, and the unstable one did not.
The American match met its own crisis. In the 1950s there were almost no women in American medical schools; by the 1970s about a tenth of students were women, and today about half. Married couples, treated by the clearinghouse as two strangers, were given jobs far apart, and began to arrange jobs outside the match. A couple wants a pair of jobs, and with couples in the market a stable matching may not even exist. In 1995 Roth was asked, with Elliott Peranson, to redesign the match. From 1998 applicants did the asking, couples ranked pairs of jobs, and the algorithm searched for a stable outcome. By 2012 the match placed about twenty-five thousand doctors a year, and the same design runs dozens of other medical markets.
What it does: Britain's clearinghouses: stable Edinburgh (1969) and Cardiff still in use; unstable Birmingham, Edinburgh (1967), Newcastle and Sheffield abandoned; Cambridge and the London Hospital the exceptions; Called it?: Roth's stability claim: right; the laboratory (Kagel and Roth 2000); couples, women from about 10% of students in the 1970s to about half; Roth and Peranson's redesign of 1998; about 25,000 positions a year by 2012
8School choicePrinciples and the major2 min
School places are the largest matching market most people ever meet. In 2003 Atila Abdulkadiroğlu and Tayfun Sönmez looked at how American cities were giving them out. Many used the Boston rule from Play it, which tries to give as many families as possible their first choice. That sounds good. But as you found, listing a popular school first and missing it can cost you your second choice as well. So families who understood the game listed safer schools first, and families who did not paid for their honesty. They proposed deferred acceptance with students asking: the truth is safe, and no student loses a place to someone with a weaker claim to it. Boston adopted it, and other cities followed.
New York's problem was different. Almost ninety thousand students start high school there each year. Under the old system, schools sent offers by post, and a student holding two offers had to send one back before anyone on a waiting list could be admitted. It was the congestion of the 1940s hospitals again: the waiting lists could not move fast enough, and just before school began about thirty thousand students had no place at all, and were assigned by the administration to schools they had never listed. From 2003, with Abdulkadiroğlu, Parag Pathak and Roth, the city ran one stable clearinghouse with students asking. Almost at once, the thirty thousand fell to about three thousand.
The largest school match of all is for China's universities. Millions of students sit the national examination each year and are placed province by province. Under the old sequential rule, much like Boston's, a strong student who aimed too high with a first choice could end up with nothing good. Many provinces have moved to a parallel rule, which treats a student's first several choices together, deferring acceptance among them, before moving on to the next group. Yan Chen and Onur Kesten showed that it lies between Boston's rule and deferred acceptance: safer to be honest under, and more stable, than the rule it replaced.
What it does: Boston's rule and Abdulkadiroğlu and Sönmez (2003); New York: about 90,000 entering students, about 30,000 placed administratively before, about 3,000 after the 2003-04 clearinghouse; China's parallel mechanism between Boston and DA (Chen and Kesten 2017)
9Huts and kidneysPrinciples and the major3 min
First, a market where everyone already owns something. Four islanders each own a hut, and each ranks all four huts. David Gale's procedure, which Lloyd Shapley and Herbert Scarf published in 1974, asks everyone to point at the owner of the hut they like best. There is always at least one cycle of pointing. Here Ana and Bo point at each other: Ana gets Bo's hut, Bo gets Ana's, and both leave. Dara's favourite was Ana's hut, which has gone, so Dara now points at Chidi's, and Chidi points at Dara's: a second cycle, and they swap too. The result is efficient, no group could do better trading among themselves, and pointing at your true favourite is always safe.
Kidneys are the life-and-death version. A healthy person can give a kidney to a relative or friend with kidney failure, if their blood and tissues are compatible. Often they are not: the donor is willing, but cannot give to their own patient. And buying and selling kidneys is illegal almost everywhere, so no price can do the work. But two such pairs can swap: my donor gives to your patient, and yours to mine. The operations are done at the same time, so that nobody can back out: four operating rooms and four surgical teams for a swap between two pairs, and six for three. In 2004 Roth, Tayfun Sönmez and Utku Ünver designed a clearinghouse for such swaps, and helped New England's surgeons start one.
Here is a small pool in Agora: eight pairs, each a patient with a willing but incompatible donor. An arrow from one pair to another means that pair's donor could give to the other's patient. If only swaps between two pairs are allowed, the best Agora can find is one swap: two transplants. Allow cycles of three, and two cycles fit: six transplants. Longer cycles would find more, but need more operating rooms at once.
There is one more source. Some people give a kidney to a stranger, asking nothing in return. Such a gift can start a chain: the giver's kidney goes to one patient, that patient's donor gives to the next, and so on. In Agora's pool, one chain, with the cycles, gives a kidney to all eight patients. And a chain need not be done all at once, because each pair receives a kidney before its donor gives one: if a donor backs out, nobody is left worse off than before. In 2009 the surgeon Michael Rees reported the first long chain of this kind, with ten transplants; later chains reached thirty. Many patients have antibodies that rule out most kidneys, so few cycles exist, and chains are how they are found.
What it does: Top trading cycles on four huts (two 2-cycles); kidney exchange, simultaneous surgeries (4 operating rooms for two pairs, 6 for three); Agora's eight pairs: 2 transplants by swaps of two, 6 with cycles of three, all 8 with one altruist's chain; the first long chain (10 transplants, 2009) and one of 30
10Why markets fail to formPrinciples and the major2 min
Looking back over these markets, Roth listed what a marketplace must do. It must be thick, bringing enough buyers and sellers together at once that each has real options. It must not be congested: there must be time to make offers and to consider them. And it must be safe and simple, so that people do well without gaming it. Each failure in this part breaks one. Unravelling thins the market, as offers creep earlier: the interns of 1940. Congestion leaves offers unanswered: the exploding offers of 1950, and New York's waiting lists. And an unsafe rule punishes the honest: Boston's.
Unravelling turns up wherever a scarce match is decided early. American federal judges have hired their clerks earlier and earlier, despite repeated agreements among the judges to wait. It has happened in medical fellowships, in college football's bowl games, and in the markets for new lawyers. Each employer gains by moving first, so an agreement to wait must be enforced, or made safe to keep. A clearinghouse makes waiting safe: anyone who joins at the agreed time loses nothing by having waited.
And some markets fail to form because people do not want them. Gary Becker argued that there is no shortage of kidneys, since everyone has two: the shortage comes from a price set by law at zero. A paid market would very likely mean more transplants, and exchange and chains mean more without one. Whether to allow payment needs a judgment: how to weigh lives saved against fears that the poor would be pressed into selling, and against the sense many people have that some things should not be sold at all. Roth called that sense repugnance, and argued that it is as real a constraint on a market as any law of supply and demand. Kidney exchange is design within it.
What it does: Thick, uncongested, safe (Roth 2008); unravelling in judicial clerkships, fellowships, bowl games; repugnance and the kidney market, with an is/ought card (Roth 2007)
11Matching with money: the assignment gamePrinciples and the major2 min
Everything so far has had no money changing hands. When partners can pay each other, matching meets prices again. Crusoe and Friday each have a boat to sell, and Ana and Bo each want one. The table shows what each pair would create together: the buyer's value for that boat, less what its owner could get elsewhere. The best pairing puts Ana with Friday's boat and Bo with Crusoe's, for fifteen in all. Lloyd Shapley and Martin Shubik called this the assignment game, in 1971. The question is how the fifteen is split, by the prices the boats sell for.
Agora finds every split that no pair could beat by dealing on its own: the core. It is an interval. Here is Friday's share: at the buyers' end, Friday gets two shells above what the boat would fetch elsewhere; at the sellers' end, eight. It is a lattice again, with the buyers' best at one end and the sellers' best at the other, as in Gale and Shapley's marriages. Shapley and Shubik showed these splits are exactly the competitive equilibrium prices, at which each boat has one buyer who wants it. And an English auction for many items, run as in part sixteen, ends at the buyers' end of the interval. Put wages in place of prices, and the same model matches workers to firms, which parts thirty-nine and forty-nine take up.
What it does: Two boats and two buyers, joint surplus (5, 8; 7, 9): the best pairing gives 15; the core runs from Friday's share of 2 (buyers' end) to 8 (sellers' end); core = competitive prices (Shapley and Shubik 1971); the English auction's buyer-optimal end (Demange, Gale and Sotomayor 1986)
12What a lottery revealsPrinciples and the major3 min
The match has one more gift, for researchers. Do pupils at a sought-after school do better because of the school, or because of who chooses to apply to it? Comparing its pupils with everyone else mixes the two up. But when a school has more applicants than places, the match gives out its places partly by lottery. Among applicants of the same type, who wins is pure chance: a randomized experiment, built into the market. The catch is that the chance of an offer differs by type. Siblings of current pupils may come first, for example. So the comparison must be made within types.
Agora can show the catch. It builds a district with one oversubscribed school, which raises every pupil's score by four tenths of a standard deviation. Stronger pupils are more likely to apply, and siblings of current pupils, who are weaker on average, get places first; the rest are drawn by lottery. Agora runs two hundred such lotteries. Comparing the school's pupils with everyone else gives about eight tenths: twice the truth, because of who applies. Comparing applicants who were offered a place with those who were not, ignoring type, gives almost nothing, because the offered are mostly the weaker siblings. Comparing within type, and scaling up for the pupils who enrol anyway, gives four tenths, the truth.
Here are all two hundred estimates. Ignoring type, they pile up near zero, far from the truth. Within type, they centre on four tenths. Any one lottery can miss by a few hundredths, but the method is right on average, which is what a randomized experiment promises.
Real cities do this. Denver assigns its school places, charter schools included, through one deferred-acceptance match with lottery tie-breaks. Atila Abdulkadiroğlu, Joshua Angrist, Yusuke Narita and Parag Pathak worked out each applicant's chance of a charter offer from the match's own rules, and compared applicants with the same chance. Attending a charter school raised math scores by about four tenths of a standard deviation, a very large effect, and reading and writing by less. Ignoring the chance of an offer, as in Agora's middle bar, gave an estimate too small by about half. The match that assigns the places is also the experiment that evaluates them.
What it does: Agora's district (20,000 pupils, a true effect of 0.4, siblings first): over 200 lotteries, pupils against everyone 0.80, offered against not ignoring type 0.03, within type 0.40 (spread 0.05); Denver's charters: first stage 0.42, math 0.415 (s.e. 0.052), reading 0.166, writing 0.274, and 0.231 without score controls
13The Dials: what a sought-after school addsResearch1 min
Parents pay a great deal for schools. Across a single street outside Boston, a three-bedroom house in Newton sold, on average, for about four hundred and twelve thousand dollars, and a similar one in Waltham for about three hundred and sixteen thousand. Ninety-two percent of Newton's high-school pupils are proficient in math, and seventy-eight percent of Waltham's. But is a school whose pupils score higher a better school, or just a school with stronger pupils? This part opens a dial for that.
Here is the dial. Boston's three exam schools admit by a test score, with a sharp cutoff. Abdulkadiroğlu, Angrist and Pathak compared applicants just above and just below it. Pupils who just got in move to schools whose pupils score far higher, yet their own math scores changed by about nothing, and their English scores by about nothing too. They called it the elite illusion. Denver's charter schools, evaluated through the match, raised math scores by about four tenths of a standard deviation, and reading by about one sixth. So the status is: depends on the setting. Which schools are sought after tells you little about which ones teach more. The dial returns in part forty-nine.
What it does: Newton and Waltham houses ($412,000 and $316,000); the new dial: Boston exam-school offers, math -0.035 (0.027) and English 0.022 (0.028); Denver charter attendance, math 0.415 (0.052) and reading 0.166 (0.053); depends on the setting
14In practice: clearinghouses and platformsPractice1 min
Matching markets are designed in many places now. Clearinghouses place doctors, and also clinical psychologists, dentists and pharmacists, among others. School districts run a match each year. Kidney exchanges run national and regional programmes. Platforms match riders with drivers, guests with rooms, people with people, and clients with freelancers, usually with prices as well. Resettlement agencies place refugee families. And governments allocate university places and public housing.
Roth called this work the economist as engineer. It starts by learning the market: who wants what, who has the right to decide, and what is forbidden. Then choosing the algorithm, weighing stability, efficiency and the safety of telling the truth, and deciding who asks. Then the details theory leaves out: couples, siblings, ties, quotas, places that come in pairs. Then simulating the design on last year's lists before anyone depends on it. Then explaining it to parents, doctors and surgeons, and persuading them to trust it, which is often the hardest part. And finally evaluating, using the lotteries the match itself runs.
What it does: Where matching markets are designed; the economist as engineer (Roth 2002): rules, algorithms, details, simulation, persuasion, evaluation
15Frontier: refugees, learning and large marketsResearch2 min
The newest matching markets learn from data. Refugee families are placed in towns by rules of thumb and the space available. Yet where a family lands can decide whether its adults find work. In 2018 Kirk Bansak and colleagues used past arrivals to learn which kinds of families found work in which places, and then matched each new family to where it was predicted to do best, within each place's capacity. Their predicted employment rates were roughly forty to seventy percent higher, using data from the United States and Switzerland. These are predictions from past data, not yet the results of an experiment, and a design must also count what the families themselves want.
The other frontier is size. Fuhito Kojima and Parag Pathak showed in 2009 that in a very large match, almost nobody on either side can gain by lying. And Eduardo Azevedo and Jacob Leshno showed in 2016 that a large stable matching can be described by one number per school: its cutoff. Each student goes to the best school whose cutoff they clear. Cutoffs rise when a school is popular, just like prices, and they settle where the places demanded equal the places available. The market without prices had prices after all, paid in priority rather than money.
And the open questions. How should a match learn about people while it places them, without treating them as experiments? How should fairness, diversity and priority be written into an algorithm? When should a platform show prices, and when should it simply match? And how can a design earn the trust of the people it places?
What it does: Refugee placement by prediction and matching, predicted employment roughly 40-70% higher (Bansak et al. 2018); large markets: little to gain by lying (Kojima and Pathak 2009), cutoffs as prices (Azevedo and Leshno 2016); open questions
Recap, problems, and the road aheadAll tracks3 min
So: can a market be engineered, when prices cannot do the work? Yes, within limits. A clearinghouse can make a market thick, uncongested and safe. Deferred acceptance finds a match that no pair wants to break, and makes the truth safe for the side that asks; swaps and chains find kidneys that no price could. But no rule does everything, some good trades are always lost when values are private, and a design works only if the people in it trust it, and it fits them.
Part seventeen in twelve lines. The interns' market unravelled and then congested, until a clearinghouse in 1952 fixed it. In Play it, the Boston rule punished you for telling the truth, and deferred acceptance did not. The revelation principle says a designer may look only at rules where the truth is safe. Clarke's rule makes the truth pay by charging for the harm you do, but its budget cannot balance. No bargain between a buyer and a seller with private values gets every good trade done: eighty-four percent of the gains is the best. Gale and Shapley proved a stable matching always exists, and the asking side gets its best. In Britain, the stable clearinghouses survived, and couples forced the doctors' redesign of 1998. Boston changed its rule, and in New York the thirty thousand unplaced pupils fell to three thousand. Trading cycles share out huts, and cycles and a chain found a kidney for every patient in Agora's pool. A marketplace must be thick, uncongested and safe, and it can unravel or meet repugnance. With money, matching becomes the assignment game, with a lattice of prices. And a match's lotteries are experiments, the elite schools are an illusion, refugees can be placed better, and in large markets cutoffs work like prices.
The problems. The Boston rule and its blocking pair; the board with workshops asking; the proof of stability; Clarke's rule for the footbridge; the gains from trade under three rules; top trading cycles; the core of the assignment game; and a starred problem on what a lottery reveals. Full solutions are in the part's notes.
The reading: Alvin Roth's Who Gets What, and Why, for everyone; Roth and Marilda Sotomayor's Two-Sided Matching, the graduate text; Tilman Börgers on mechanism design; and the chapters on mechanism design in Algorithmic Game Theory. Then the papers, from Gale and Shapley to the refugees.
This part matched people one by one. The next chooses for everyone at once. In 1785 the Marquis de Condorcet found that a majority can prefer A to B, B to C, and C to A. Part eighteen: social choice and welfare.
Where it goes next. Part 18 adds up preferences by voting; Parts 24 and 39 match workers to jobs; Part 49 returns to schools; Part 53 to information design; Parts 44 and 61 to platforms; Part 64 to algorithms and fairness.
Key results
The part's results in one place, for revision.
Try it
Lab 17 · Markets by design: matching, mechanisms and clearinghouses
Run the Boston rule and deferred acceptance on the same lists and find who gains by lying; list every stable matching of a small market and see each side's best; make the truth pay with Clarke's rule; bound the gains from trade; trade huts by top trading cycles; find the most transplants in a kidney pool; split an assignment game's surplus; and estimate a school's effect from its lottery.
python -m videos.economics.labs 17
needs numpy, scipy, matplotlib · download lab17.py ·
source on GitHubworkshops: your place under Boston (truth / kiln first) and under DA (truth) loft / kiln; kiln
blocking pairs under Boston; under DA [('you', 'kiln')]; []
the board: stable matchings; DA rounds with apprentices / workshops asking 3; 6 / 2
footbridge: build?; Clarke taxes True; [15.0, 0.0, 0.0, 0.0]
bilateral trade: efficient, posted price, double auction (exact; simulated) 0.1667 (0.1668), 0.1250 (0.1248), 0.1406 (0.1402)
huts: allocation by top trading cycles {'ana': 'bo', 'bo': 'ana', 'chidi': 'dara', 'dara': 'chidi'}
kidneys: transplants with swaps of two, cycles of three, and a chain 2, 6, 8
assignment game: total; sellers' payoffs at the buyers' and sellers' ends 15; [0.0, 2.0] / [6.0, 8.0]
lottery study (60 lotteries): OLS, IV ignoring type, IV within type (truth 0.4) 0.80, 0.03, 0.40
Denver charters (2SLS): first stage; math; math without score controls 0.420; 0.415; 0.231
The Boston rule hands you the loft for the truth and the kiln for a lie; deferred acceptance gives the kiln for the truth and is stable. The board has three stable matchings, each side's best found by letting it ask. Clarke's rule makes Ana pay 15 she cannot be refunded; the best bilateral mechanism gets 84 percent of the gains; cycles of three and a chain place every patient; and a lottery is an experiment only within each applicant type.
The code (100 lines; it asserts its own result)
"""Lab 17: markets by design: the Boston rule and deferred acceptance, stable matchings and who proposes, Clarke's
pivot rule, the bilateral-trade bound, top trading cycles, kidney exchange, the assignment game, and what a school
lottery reveals."""
import numpy as np
from videos.coursekit import labs
from explainer.economics.agora import matching as mt
from explainer.economics.data import tables
from explainer.economics.island import truths
TITLE = "Markets by design: matching, mechanisms and clearinghouses"
GOAL = ("Run the Boston rule and deferred acceptance on the same lists and find who gains by lying; list every stable "
"matching of a small market and see each side's best; make the truth pay with Clarke's rule; bound the gains "
"from trade; trade huts by top trading cycles; find the most transplants in a kidney pool; split an "
"assignment game's surplus; and estimate a school's effect from its lottery.")
TASKS = [
"The workshops: give the kiln a second place. Does the Boston rule still punish your truthful list? Does any "
"other child now gain by lying?",
"The kidney pool: allow cycles of up to four pairs. How many transplants are possible without the altruist's chain?",
"The lottery: set the sibling share to zero. Do the comparison that ignores type and the one within type now agree, "
"and why?",
]
def run(seed=0):
lab = labs.Lab()
T = truths(17)
p = T["playit"]
students = {k: list(v) for k, v in p["students"].items()}
schools = {s: list(p["lottery"]) for s in p["capacity"]}
cap = dict(p["capacity"])
b = mt.boston(students, schools, cap)["match"]
d = mt.deferred_acceptance(students, schools, cap)["match"]
assert not mt.blocking_pairs(d, students, schools, cap) # deferred acceptance is stable
lab.row("workshops: your place under Boston (truth / kiln first) and under DA (truth)",
f"{b['you']} / " + next(r["gets"] for r in mt.outcomes_by_report("you", students, schools, cap)
if r["report"][0] == "kiln") + f"; {d['you']}")
lab.row("blocking pairs under Boston; under DA", f"{mt.blocking_pairs(b, students, schools, cap)}; "
f"{mt.blocking_pairs(d, students, schools, cap)}")
bd = T["board"]
pa = {k: list(v) for k, v in bd["apprentices"].items()}
pw = {k: list(v) for k, v in bd["workshops"].items()}
st = mt.all_stable(pa, pw)
assert mt.deferred_acceptance(pa, pw)["match"] == st[0]["match"] # the asking side gets its best
lab.row("the board: stable matchings; DA rounds with apprentices / workshops asking",
f"{len(st)}; {mt.deferred_acceptance(pa, pw)['rounds']} / {mt.deferred_acceptance(pw, pa)['rounds']}")
pv = mt.pivotal(**T["bridge"])
lab.row("footbridge: build?; Clarke taxes", f"{pv['build']}; {pv['tax']}")
tr = mt.bilateral_trade(seed=1983 + seed)
lab.row("bilateral trade: efficient, posted price, double auction (exact; simulated)",
", ".join(f"{tr['exact'][k]:.4f} ({tr['sim'][k]:.4f})" for k in ("efficient", "posted", "double")))
h = mt.top_trading_cycles({k: list(v) for k, v in T["huts"].items()})
lab.row("huts: allocation by top trading cycles", str(h["alloc"]))
k = T["kidneys"]
kr = mt.kidney_exchange({q: set(v) for q, v in k["compat"].items()}, k["max_cycle"],
{a: set(v) for a, v in k["altruists"].items()}, k["max_chain"])
lab.row("kidneys: transplants with swaps of two, cycles of three, and a chain",
f"{kr['pairs_only']}, {kr['cycles']}, {kr['with_chains']}")
g = mt.assignment_game(T["assignment"]["values"])
lab.row("assignment game: total; sellers' payoffs at the buyers' and sellers' ends",
f"{g['total']:.0f}; {g['buyer_optimal']['sellers']} / {g['seller_optimal']['sellers']}")
lt = dict(T["lottery"])
reps = lt.pop("reps")
rows = np.array([[r["ols_everyone"], r["iv_no_controls"], r["iv_type_controls"]]
for r in (mt.lottery_study(**{**lt, "seed": lt["seed"] + 1 + j + 1000 * seed})
for j in range(min(reps, 60)))])
lab.row("lottery study (60 lotteries): OLS, IV ignoring type, IV within type (truth 0.4)",
", ".join(f"{m:.2f}" for m in rows.mean(axis=0)))
den = tables.SCHOOL_EFFECTS.data["denver"]
lab.row("Denver charters (2SLS): first stage; math; math without score controls",
f"{den['first_stage'][0]:.3f}; {den['math'][0]:.3f}; {den['math_no_score_controls'][0]:.3f}")
lab.note = ("The Boston rule hands you the loft for the truth and the kiln for a lie; deferred acceptance gives the "
"kiln for the truth and is stable. The board has three stable matchings, each side's best found by "
"letting it ask. Clarke's rule makes Ana pay 15 she cannot be refunded; the best bilateral mechanism "
"gets 84 percent of the gains; cycles of three and a chain place every patient; and a lottery is an "
"experiment only within each applicant type.")
fig, ax = labs.figure(2, size=(11, 4.4))
ax[0].hist(rows[:, 1], bins=15, color=labs.ORANGE, alpha=0.7, label="ignoring type")
ax[0].hist(rows[:, 2], bins=15, color=labs.BLUE, alpha=0.7, label="within type")
ax[0].axvline(lt["effect"], color="black", ls="--")
ax[0].set(title="What a lottery reveals", xlabel="estimated effect", ylabel="lotteries")
ax[0].legend()
c = np.linspace(0, 1, 101)
ax[1].fill_between(c, c, 1, color=labs.BLUE, alpha=0.2, label="every good trade")
ax[1].fill_between(c[c <= 0.75], c[c <= 0.75] + 0.25, 1, color=labs.ORANGE, alpha=0.4, label="the double auction")
ax[1].set(xlim=(0, 1), ylim=(0, 1), title="Myerson and Satterthwaite", xlabel="seller's cost", ylabel="buyer's value")
ax[1].legend()
lab.fig = fig
return lab
Now change it
- The workshops: give the kiln a second place. Does the Boston rule still punish your truthful list? Does any other child now gain by lying?
- The kidney pool: allow cycles of up to four pairs. How many transplants are possible without the altruist's chain?
- The lottery: set the sibling share to zero. Do the comparison that ignores type and the one within type now agree, and why?
Problems, with solutions
Try each problem before opening its solution.
1. The Boston rule: with the four children's lists and the lottery, show that you get the net loft by telling the truth and the kiln by listing it first; find the blocking pair.
Solution
Truthfully, round one has you and Ana at the boatyard (Ana wins the lottery), Dara at the kiln and Bo at the loft, all admitted for good. In round two the kiln is full; in round three the loft has a place, so you get the loft. Listing the kiln first, round one has you and Dara at the kiln, and your lottery number beats Dara's: you get the kiln, and Dara, rejected at the full boatyard, ends at the loft. In the truthful outcome you prefer the kiln to the loft and have a better lottery number than Dara, who holds it: (you, kiln) is a blocking pair.
2. Deferred acceptance: run the apprentices' board with workshops asking, and check that every workshop prefers the result to the apprentices' version.
Solution
Round one: the boatyard and the loft both ask Bo, the grove asks Ana and the kiln asks Chidi. Bo prefers the boatyard to the loft, so the loft is turned away; the others are held. Round two: the loft asks Dara, its second choice, who holds it. The result is Bo at the boatyard, Ana at the grove, Chidi at the kiln and Dara at the loft. Each workshop now has its first choice except the loft, which has its second; with apprentices asking, the boatyard had its second (Dara), the grove its fourth (Bo), the kiln its first (Chidi) and the loft its third (Ana). No workshop is worse off.
3. Stability: prove that deferred acceptance ends with a stable matching, and that it is the asking side's best.
Solution
Each proposer asks each receiver at most once, so it ends. Suppose a and b block the final matching: a prefers b to its partner, so a asked b earlier and was rejected, in favour of someone b preferred; a receiver's holdings only improve, so b ends with someone it prefers to a, a contradiction. For optimality, call a receiver possible for a proposer if some stable matching pairs them. Suppose, for a first time in the run, b rejects a, a possible partner, for a' whom b prefers. Since a' has not yet been rejected by any possible partner and is asking b, a' ranks b above every possible partner it has not yet asked, and so above its partner in the stable matching where a has b. Then a' and b block that matching, a contradiction. So no proposer is ever rejected by a possible partner, and each ends with its best one.
4. Clarke's rule: for the footbridge, find who is pivotal and the taxes; show Bo cannot gain by reporting 60 instead of 10.
Solution
Net values are 60 - 25 = +35, -15, -15 and +15, summing to +20: build. Without Ana the others sum to -15, so Ana is pivotal and pays 15; without Bo or Chidi the others sum to +35, without Dara +5, so no one else is pivotal. If Bo reports 60, the bridge is still built, and Bo is still not pivotal (the others still sum to +35), so Bo pays only the share, and gains nothing; reporting falsely could only change the outcome when it flips the decision, and then the tax equals the net loss imposed, which is at least the gain.
5. Myerson and Satterthwaite: with values and costs uniform on \([0, 1]\), compute the gains from trade under full efficiency, a posted price of \(\tfrac12\) and the rule \(v \ge c + \tfrac14\).
Solution
Full efficiency: \(\int_0^1\int_c^1 (v - c)\,dv\,dc = \int_0^1 \tfrac12(1 - c)^2\,dc = \tfrac16\). Posted price: trade when \(c \le \tfrac12 \le v\), gains \(\tfrac14(\tfrac34 - \tfrac14) = \tfrac18\). The double auction: \(\int_0^{3/4}\int_{c + 1/4}^1 (v - c)\,dv\,dc = \int_0^{3/4} \tfrac12\big[(1 - c)^2 - \tfrac1{16}\big]dc = \tfrac{9}{64}\), which is \(\tfrac{27}{32} \approx 84\%\) of \(\tfrac16\).
6. Top trading cycles: run it on the four huts, and show that no coalition can do better by trading among itself.
Solution
In the first round Ana points at Bo's hut, Bo at Ana's, Chidi at Dara's and Dara at Ana's. The only cycle is Ana and Bo, who swap and leave. In the second round Dara's favourite remaining hut is Chidi's and Chidi's is Dara's: a second cycle, and they swap. Ana and Bo each get their favourite hut, so no coalition containing them can make them better off; Chidi and Dara each get their favourite among the huts left, and a coalition without Ana and Bo can only trade those huts. By induction, no coalition can make all its members better off: the outcome is in the core.
7. The assignment game: find the core of the two boats and two buyers, and the competitive prices at each end.
Solution
The best pairing is Ana with Friday's boat (8) and Bo with Crusoe's (7). Core payoffs \(u_A, u_B, w_C, w_F \ge 0\) satisfy \(u_A + w_F = 8\), \(u_B + w_C = 7\), \(u_A + w_C \ge 5\) and \(u_B + w_F \ge 9\). Writing \(w_F = f\): \(u_A = 8 - f\), \(u_B + w_C = 7\) and \(u_B \ge 9 - f\), \(w_C \ge f - 3\). The sellers' end maximizes \(w_C + w_F\): \(f = 8\), \(w_C = 6\), \(u_B = 1\), \(u_A = 0\); the buyers' end minimizes it: \(w_C = 0\), \(u_B = 7\), \(f = 2\), \(u_A = 6\). So Friday's surplus runs from 2 to 8, and each end corresponds to competitive prices (the sellers' reservation values plus their \(w\)).
8. \(\bigstar\) What a lottery reveals: with offers random within types, show that 2SLS with type controls recovers a constant effect, and why the comparison that ignores types does not.
Solution
With \(y = a + \tau d + e\) and an offer \(z\) independent of \(a\) within each type \(t\), the type-controlled reduced form and first stage are \(E[y \mid z = 1, t] - E[y \mid z = 0, t] = \tau\,(E[d \mid z = 1, t] - E[d \mid z = 0, t])\), so their ratio is \(\tau\) in every type and in any weighted average. Ignoring \(t\), the offered group mixes in the type that is offered more often (siblings, weaker on average), so \(E[a \mid z = 1] \ne E[a \mid z = 0]\) and the difference in \(y\) includes that gap in \(a\): in Agora, enough to cancel the effect almost entirely.
Notes and sources
Where it comes back
| Idea | Parts |
|---|---|
| Voting and adding up preferences | 18 Social Choice and Welfare |
| Matching workers to firms, wages | 24 Looking for Work, 39 The Wage Structure |
| Schools, lotteries and school effects | 49 The Economic Approach |
| Information design and mechanisms | 53 Information and Persuasion |
| Platforms and their matching teams | 44 Dynamics, Platforms and Antitrust, 61 Economics at the Platforms |
| Algorithms and fairness | 64 Machines that Learn |
Sources
- D. Gale and L. S. Shapley, "College Admissions and the Stability of Marriage", American Mathematical Monthly 69(1) (1962): 9-15; L. S. Shapley and M. Shubik, "The Assignment Game I: The Core", International Journal of Game Theory 1(1) (1971): 111-130; L. Shapley and H. Scarf, "On Cores and Indivisibility", Journal of Mathematical Economics 1(1) (1974): 23-37.
- W. Vickrey (1961); E. H. Clarke, "Multipart Pricing of Public Goods", Public Choice 11 (1971): 17-33; T. Groves, "Incentives in Teams", Econometrica 41(4) (1973): 617-631; J. Green and J.-J. Laffont, "Characterization of Satisfactory Mechanisms for the Revelation of Preferences for Public Goods", Econometrica 45(2) (1977): 427-438; L. M. Ausubel and P. Milgrom, "The Lovely but Lonely Vickrey Auction", in Combinatorial Auctions (2006).
- R. B. Myerson, "Incentive Compatibility and the Bargaining Problem", Econometrica 47(1) (1979): 61-73; R. B. Myerson and M. A. Satterthwaite, "Efficient Mechanisms for Bilateral Trading", Journal of Economic Theory 29(2) (1983): 265-281; K. Chatterjee and W. Samuelson, "Bargaining under Incomplete Information", Operations Research 31(5) (1983): 835-851.
- L. E. Dubins and D. A. Freedman, "Machiavelli and the Gale-Shapley Algorithm", American Mathematical Monthly 88(7) (1981): 485-494; A. E. Roth, "The Economics of Matching: Stability and Incentives", Mathematics of Operations Research 7(4) (1982): 617-628.
- A. E. Roth, "The Evolution of the Labor Market for Medical Interns and Residents: A Case Study in Game Theory", Journal of Political Economy 92(6) (1984): 991-1016; "A Natural Experiment in the Organization of Entry-Level Labor Markets", American Economic Review 81(3) (1991): 415-440; "The Economist as Engineer", Econometrica 70(4) (2002): 1341-1378; "Repugnance as a Constraint on Markets", Journal of Economic Perspectives 21(3) (2007): 37-58; "What Have We Learned from Market Design?", Economic Journal 118(527) (2008): 285-310; "The Theory and Practice of Market Design", Nobel lecture (2012); A. E. Roth and E. Peranson, "The Redesign of the Matching Market for American Physicians", American Economic Review 89(4) (1999): 748-780; J. H. Kagel and A. E. Roth, "The Dynamics of Reorganization in Matching Markets", Quarterly Journal of Economics 115(1) (2000): 201-235.
- A. Abdulkadiroğlu and T. Sönmez, "School Choice: A Mechanism Design Approach", American Economic Review 93(3) (2003): 729-747; A. Abdulkadiroğlu, P. A. Pathak and A. E. Roth, "The New York City High School Match", American Economic Review 95(2) (2005): 364-367; Y. Chen and O. Kesten, "Chinese College Admissions and School Choice Reforms", Journal of Political Economy 125(1) (2017): 99-139.
- A. E. Roth, T. Sönmez and M. U. Ünver, "Kidney Exchange", Quarterly Journal of Economics 119(2) (2004): 457-488; M. A. Rees et al., "A Nonsimultaneous, Extended, Altruistic-Donor Chain", New England Journal of Medicine 360 (2009): 1096-1101.
- C. Avery, C. Jolls, R. A. Posner and A. E. Roth, "The Market for Federal Judicial Law Clerks", University of Chicago Law Review 68 (2001): 793-902; M. Niederle and A. E. Roth, "Unraveling Reduces Mobility in a Labor Market", Journal of Political Economy 111(6) (2003): 1342-1352.
- G. Demange, D. Gale and M. Sotomayor, "Multi-Item Auctions", Journal of Political Economy 94(4) (1986): 863-872; A. S. Kelso and V. P. Crawford, "Job Matching, Coalition Formation, and Gross Substitutes", Econometrica 50(6) (1982): 1483-1504.
- A. Abdulkadiroğlu, J. Angrist and P. Pathak, "The Elite Illusion: Achievement Effects at Boston and New York Exam Schools", Econometrica 82(1) (2014): 137-196 (NBER Working Paper 17264, 2011); A. Abdulkadiroğlu, J. D. Angrist, Y. Narita and P. A. Pathak, "Research Design Meets Market Design: Using Centralized Assignment for Impact Evaluation", Econometrica 85(5) (2017): 1373-1432 (IZA Discussion Paper 10429).
- F. Kojima and P. A. Pathak, "Incentives and Stability in Large Two-Sided Matching Markets", American Economic Review 99(3) (2009): 608-627; E. M. Azevedo and J. D. Leshno, "A Supply and Demand Framework for Two-Sided Matching Markets", Journal of Political Economy 124(5) (2016): 1235-1268; K. Bansak et al., "Improving Refugee Integration through Data-Driven Algorithmic Assignment", Science 359(6373) (2018): 325-329.
- OECD Family Database, US Census Bureau (1949) and CDC (2020), crude marriage rate, via Our World in Data.
- Textbooks: Alvin E. Roth, Who Gets What and Why (2015); Alvin E. Roth and Marilda Sotomayor, Two-Sided Matching (1990); Tilman Börgers, An Introduction to the Theory of Mechanism Design (2015); Noam Nisan, Tim Roughgarden, Éva Tardos and Vijay Vazirani (eds), Algorithmic Game Theory (2007).
About this partfrom its README
Part 17 of a sixty-eight-part course in economics (see the series plan and the syllabus), the fifth of Act IV, Failure and Design. It asks whether a market can be engineered when prices cannot do the work, and answers: yes, within limits. A clearinghouse can make a market thick, uncongested and safe; deferred acceptance finds a match no pair wants to break and makes the truth safe for the side that asks; swaps and chains find kidneys no price could. No rule does everything, some trades are always lost to private information, and a design works only if people trust it and it fits them.
It opens with the American market for medical interns: by 1940 hospitals were hiring students two years before they graduated; the medical schools stopped releasing grades early in 1945; offers that stayed open ten days, then eight, became exploding offers by telephone by 1950; and in 1952 the hospitals and students set up a clearinghouse that Alvin Roth showed in 1984 was Gale and Shapley's algorithm of 1962, found ten years earlier. From there it covers:
- a game: four children, three workshops, and the Boston rule, which punishes the truth;
- mechanisms and the revelation principle (Hurwicz; Myerson 1979), and a designer's checklist;
- Vickrey, Clarke and Groves: Clarke's pivot rule for a footbridge, and why its budget cannot balance (Green and Laffont 1977);
- Myerson and Satterthwaite (1983): no voluntary, budget-balanced rule gets every good trade done; the double auction's 84 percent (Chatterjee and Samuelson 1983);
- stable matching: blocking pairs, deferred acceptance run on a board, and the proof (Gale and Shapley 1962);
- who should propose: the lattice of stable matchings, and truth for the asking side (Dubins and Freedman 1981; Roth 1982);
- an intermission without narration: marriages per 1,000 people in the United States, 1886-2022;
- the residents' match: Britain's regional clearinghouses as a natural experiment (Roth 1991), with Called it?; couples and the 1998 redesign (Roth and Peranson 1999);
- school choice: Boston (Abdulkadiroğlu and Sönmez 2003), New York (Abdulkadiroğlu, Pathak and Roth 2005), China's parallel mechanism (Chen and Kesten 2017);
- huts and kidneys: top trading cycles (Shapley and Scarf 1974), kidney exchange (Roth, Sönmez and Ünver 2004) and chains (Rees et al. 2009);
- why markets fail to form: thickness, congestion, safety; unravelling; repugnance (Roth 2007), with an is/ought card;
- matching with money: the assignment game (Shapley and Shubik 1971);
- what a lottery reveals: Agora's district and Denver's charter schools (Abdulkadiroğlu, Angrist, Narita and Pathak 2017);
- a new dial (what a sought-after school adds: Boston's exam schools and Denver's charters); clearinghouses and platforms; and a frontier chapter on refugees (Bansak et al. 2018) and very large markets (Kojima and Pathak 2009; Azevedo and Leshno 2016).
What is computed and built
Everything plotted is computed by compute.py from Agora's matching module (explainer.economics.agora.matching),
with the Island's Part 17 truths in explainer.economics.island, or from the Data Room or a transcribed table; the
narration states the cached numbers.
- Matching. Deferred acceptance (either side asking, one-to-one or many-to-one) with a round-by-round log; the Boston rule; blocking pairs; every stable matching of the board by enumeration of its 24 pairings; the outcome of every list the viewer could submit under each rule; top trading cycles; the best set of cycles and chains in the kidney pool by exhaustive search.
- Mechanisms. Clarke's pivot rule; the gains from trade under three rules in closed form, checked by 200,000 simulated pairs; the assignment game's efficient pairing and core by linear programming.
- Evaluation. A district with one oversubscribed school, sibling priority and always-takers: OLS, IV without type controls and IV with them, over 200 lotteries (seeds 2018-2217).
- Data. The marriage rate; the transcribed history, clearinghouse table and estimates.
Chapter notes
| # | Chapter | What it does |
|---|---|---|
| 0 | Can a market be engineered, when prices cannot do the work? | Interns hired two years early by 1940; grades withheld from 1945; offers open 10 days (1945), 8 (1946), less than twelve hours (by 1950); the 1952 clearinghouse on card-sorting machines; Gale and Shapley (1962) and Roth (1984); markets without prices today; the question; objectives |
| 1 | Play it: rank three workshops | Four children (you, Ana, Bo, Dara), one place at the boatyard, one at the kiln, two at the net loft; lottery Ana, Bo, you, Dara; under the Boston rule the truth gets you the net loft and listing the kiln first gets you the kiln; Dara's kiln is a blocking pair; under deferred acceptance the truth gets you the kiln and nothing does better |
| 2 | Mechanisms, and the revelation principle | Mechanisms as rules played as games (Hurwicz); the revelation principle in one picture; a checklist of efficiency, safe truth, voluntary participation, budget balance and stability against VCG, the double auction, the Boston rule, DA and TTC |
| 3 | Vickrey, Clarke and Groves: pay for the harm you do | A footbridge costing 100, values 60, 10, 10, 40; net values +35, -15, -15, +15 sum to +20; Ana is pivotal and pays 15; truth dominant; the 15 cannot be returned (Green and Laffont 1977); collusion, low revenue, complexity |
| 4 | Myerson and Satterthwaite: no perfect bargain | Values and costs uniform on [0, 1]: every good trade gives 1/6; a posted price of 1/2 gives 1/8 (75%); the double auction's linear equilibrium, trading when v >= c + 1/4, gives 9/64 (84%), the best possible; Vickrey's rule on both sides needs an outside subsidy of the whole surplus |
| 5 | Stable matching: Gale and Shapley | Four apprentices, four workshops; a blocking pair (Dara and the boatyard); deferred acceptance in six rounds, with five rejections; Ana at the net loft, Bo at the grove, Chidi at the kiln, Dara at the boatyard; the proof |
| 6 | Who should propose? | The board's three stable matchings, ordered: the apprentices' best (DA with apprentices asking), the workshops' best (two rounds with workshops asking) and one between; truth dominant for the asking side; no stable rule safe for both; large markets |
| Intermission: the oldest matching market | No narration: US marriages per 1,000 people, 1886-2022 (7.9 in 1932, 16.4 in 1946, 5.1 in 2020), with Japan, Italy and Sweden from 1960; the US rate as a tune; the story so far | |
| 7 | The residents' match | Britain's clearinghouses: stable Edinburgh (1969) and Cardiff still in use; unstable Birmingham, Edinburgh (1967), Newcastle and Sheffield abandoned; Cambridge and the London Hospital the exceptions; Called it?: Roth's stability claim: right; the laboratory (Kagel and Roth 2000); couples, women from about 10% of students in the 1970s to about half; Roth and Peranson's redesign of 1998; about 25,000 positions a year by 2012 |
| 8 | School choice | Boston's rule and Abdulkadiroğlu and Sönmez (2003); New York: about 90,000 entering students, about 30,000 placed administratively before, about 3,000 after the 2003-04 clearinghouse; China's parallel mechanism between Boston and DA (Chen and Kesten 2017) |
| 9 | Huts and kidneys | Top trading cycles on four huts (two 2-cycles); kidney exchange, simultaneous surgeries (4 operating rooms for two pairs, 6 for three); Agora's eight pairs: 2 transplants by swaps of two, 6 with cycles of three, all 8 with one altruist's chain; the first long chain (10 transplants, 2009) and one of 30 |
| 10 | Why markets fail to form | Thick, uncongested, safe (Roth 2008); unravelling in judicial clerkships, fellowships, bowl games; repugnance and the kidney market, with an is/ought card (Roth 2007) |
| 11 | Matching with money: the assignment game | Two boats and two buyers, joint surplus (5, 8; 7, 9): the best pairing gives 15; the core runs from Friday's share of 2 (buyers' end) to 8 (sellers' end); core = competitive prices (Shapley and Shubik 1971); the English auction's buyer-optimal end (Demange, Gale and Sotomayor 1986) |
| 12 | What a lottery reveals | Agora's district (20,000 pupils, a true effect of 0.4, siblings first): over 200 lotteries, pupils against everyone 0.80, offered against not ignoring type 0.03, within type 0.40 (spread 0.05); Denver's charters: first stage 0.42, math 0.415 (s.e. 0.052), reading 0.166, writing 0.274, and 0.231 without score controls |
| 13 | The Dials: what a sought-after school adds | Newton and Waltham houses ($412,000 and $316,000); the new dial: Boston exam-school offers, math -0.035 (0.027) and English 0.022 (0.028); Denver charter attendance, math 0.415 (0.052) and reading 0.166 (0.053); depends on the setting |
| 14 | In practice: clearinghouses and platforms | Where matching markets are designed; the economist as engineer (Roth 2002): rules, algorithms, details, simulation, persuasion, evaluation |
| 15 | Frontier: refugees, learning and large markets | Refugee placement by prediction and matching, predicted employment roughly 40-70% higher (Bansak et al. 2018); large markets: little to gain by lying (Kojima and Pathak 2009), cutoffs as prices (Azevedo and Leshno 2016); open questions |
| Recap, problems, and the road ahead | The answer; twelve lines; problems; reading; Condorcet's paradox, and Part 18 |
Companion material in this repository
The syllabus's plan for this partfrom SYLLABUS.md, the plan of record
- Hook: exploding offers; the question; objectives.
- Play it: rank three schools under the Boston rule. Should you list your true first choice?
- Mechanisms: the revelation principle in one picture.
- Vickrey–Clarke–Groves: charge each person the harm they do to the rest; its virtues and its flaws.
- Myerson and Satterthwaite (1983): no mechanism gets two-sided bargaining right. Proved in a diagram.
- Stable matching: blocking pairs; Gale and Shapley's deferred acceptance, run on a board; the proof.
- The lattice: the proposing side's optimum; who should propose; strategy-proofness for one side only.
- The residents' match: Roth (1984); couples and the 1998 redesign (Roth and Peranson 1999).
- School choice: the Boston mechanism against deferred acceptance (Abdulkadiroğlu and Sönmez 2003); New York and Boston redesigned; Chinese college admissions and the parallel mechanism.
- Houses and kidneys: top trading cycles (Shapley and Scarf 1974); kidney exchange and chains (Roth, Sönmez and Ünver 2004).
- Why markets fail to form: unravelling, congestion, unsafe truth-telling, repugnance (Roth 2007).
- Matching with money: assignment games (Shapley and Shubik); a pointer to Parts 39 and 49.
- What a lottery reveals: using the match to measure school effects (Abdulkadiroğlu et al. 2017).
- Dials. 14. In practice: clearinghouses, platforms' matching teams. 15. Frontier: refugee resettlement, matching with learning, large markets.
Agora: matching: deferred acceptance, top trading cycles, the Boston mechanism, VCG, a kidney-exchange
optimizer; manipulation checks.
Called it? Roth's test: which regional matches in Britain survived, by whether they were stable.
Reading: Gale & Shapley 1962; Roth 1984, 2002, 2007; Myerson & Satterthwaite 1983; Abdulkadiroğlu & Sönmez
2003; Roth, Sönmez & Ünver 2004; Roth & Sotomayor; Roth, Who Gets What and Why; Börgers.
Build the film
python -m videos.economics.econ17.compute # the part's numbers, into .cache/econ17
python tools/build.py econ17 # render and assemble the film
EXPLAINER_TTS=silent python tools/qa_scene.py econ17 Hook # one chapter, silent, with a contact sheet
Scenes: videos/economics/econ17. Setup: see the course page. Source of these notes: the README and the scenes' narration.
Build it
python -m videos.economics.econ17.compute # every number (seconds), into .cache/econ17/
python tools/qa_scene.py econ17 Stable # one chapter, silent, at 480p, with a contact sheet
EXPLAINER_TTS=silent python tools/build.py econ17 -q l # the whole part, silent preview
python tools/build.py econ17 # 1080p30 with narration and the series' computed score
python -m videos.economics.labs 17 # the lab
The data are frozen extracts in explainer/economics/data/, registered in
SOURCES.md: the crude marriage rate from the OECD, the US Census
Bureau and CDC via Our World in Data; and transcribed passages from Roth's Nobel lecture (2012) on the medical market,
the clearinghouses, New York's high-school match and kidney chains, and from Abdulkadiroğlu, Angrist and Pathak (2011
working paper of the 2014 article) and Abdulkadiroğlu, Angrist, Narita and Pathak (2016 discussion paper of the 2017
article), in explainer/economics/data/tables.py with where they were read and the date they were checked.