AnyLearn
All lessons
Mathadvanced

Mechanism Design: Engineering the Rules of the Game

Mechanism design runs game theory backwards: pick the outcome you want, then build rules under which self-interested players produce it. This lesson covers the revelation principle, VCG and its blind spots, Myerson's optimal auction, the impossibility theorems that bound the field, and stable matching as used in residency and school-choice markets.

Updated · AI-authored, review-gated · how lessons are made

Progress1 / 10

Game theory in reverse

Game theory takes the rules as given and predicts behaviour. Mechanism design takes a goal as given and chooses the rules. The designer, a seller, a regulator, a school district, wants an outcome that depends on information only the participants hold: their valuations, costs, or preferences. Asking them directly invites lying whenever lying pays.

Definition: A social choice function maps every profile of private types to a desired outcome (who gets the item, which project is built, who is matched with whom). A mechanism specifies what messages each participant can send and an outcome rule mapping messages to outcomes and payments. A mechanism implements the social choice function if, in equilibrium, the outcome it produces equals the desired one for every type profile.

Leonid Hurwicz framed the problem in the 1960s and 1970s, and Eric Maskin and Roger Myerson developed its core results. The three shared the 2007 Nobel memorial prize in economics "for having laid the foundations of mechanism design theory". The previous lessons in this path supply the tools: Bayesian games for private information, and Vickrey's second-price auction as the first mechanism where honesty was made optimal.

Sign in free to save your progress and earn certificates.

Full lesson text

All 10 steps on one page, for reading, reference, and search.

Show

1. Game theory in reverse

Game theory takes the rules as given and predicts behaviour. Mechanism design takes a goal as given and chooses the rules. The designer, a seller, a regulator, a school district, wants an outcome that depends on information only the participants hold: their valuations, costs, or preferences. Asking them directly invites lying whenever lying pays.

Definition: A social choice function maps every profile of private types to a desired outcome (who gets the item, which project is built, who is matched with whom). A mechanism specifies what messages each participant can send and an outcome rule mapping messages to outcomes and payments. A mechanism implements the social choice function if, in equilibrium, the outcome it produces equals the desired one for every type profile.

Leonid Hurwicz framed the problem in the 1960s and 1970s, and Eric Maskin and Roger Myerson developed its core results. The three shared the 2007 Nobel memorial prize in economics "for having laid the foundations of mechanism design theory". The previous lessons in this path supply the tools: Bayesian games for private information, and Vickrey's second-price auction as the first mechanism where honesty was made optimal.

2. The revelation principle

The space of possible mechanisms is enormous: any messages, any rules, any number of rounds. The revelation principle collapses it.

Key idea: If some mechanism implements a social choice function in equilibrium, then a direct mechanism, where each participant simply reports their type, implements the same function with truth-telling as an equilibrium. Allan Gibbard proved the dominant-strategy version in 1973 (Econometrica); the Bayesian version is due to Partha Dasgupta, Peter Hammond and Eric Maskin (1979) and to Roger Myerson (1979).

The proof is a simulation argument. Take the original mechanism and its equilibrium strategies σi(ti)\sigma_i(t_i). Build a new mechanism that asks for types, then plays σi\sigma_i on each agent's behalf and applies the original outcome rule. If an agent could gain by misreporting to the new mechanism, they could have gained by deviating in the original, contradicting equilibrium.

The payoff for designers is a tractable search problem. Instead of all mechanisms, optimise over direct ones subject to incentive-compatibility constraints: for every type tit_i and every false report ti′t_i',

E[ui(outcome(ti,t−i);ti)] ≥ E[ui(outcome(ti′,t−i);ti)].\mathbb{E}\big[u_i(\text{outcome}(t_i, t_{-i}); t_i)\big] \ \ge\ \mathbb{E}\big[u_i(\text{outcome}(t_i', t_{-i}); t_i)\big].

3. Inside a direct mechanism

The direct mechanism simulates the equilibrium strategies agents would have played in the original game, so lying to it can never beat telling the truth.

sequenceDiagram
  participant Agent1
  participant Agent2
  participant Mechanism
  Agent1->>Mechanism: Report own type
  Agent2->>Mechanism: Report own type
  Mechanism->>Mechanism: Play each agent's equilibrium strategy for the reported type
  Mechanism->>Mechanism: Apply the original outcome rule
  Mechanism->>Agent1: Outcome and payment
  Mechanism->>Agent2: Outcome and payment

4. The properties a designer trades off

A mechanism is judged on a short list of properties, and the central results of the field are about which combinations can coexist.

PropertyMeaning
Dominant-strategy incentive compatible (DSIC)Truth-telling is optimal whatever others report; also called strategy-proof
Bayesian incentive compatible (BIC)Truth-telling is optimal in expectation, given the prior and that others tell the truth
Individually rational (IR)Every participant expects at least what they would get by not taking part
EfficientThe outcome maximises total value across participants
Budget balancedPayments sum to zero, so the designer neither injects nor extracts money
Revenue-maximisingAmong feasible mechanisms, the designer collects the most

Gotcha: DSIC is much stronger than BIC. A DSIC mechanism works even if participants hold wrong beliefs about each other, which is why practitioners prize it. A BIC mechanism can rely on the prior being exactly right, and a designer who has the distribution wrong may find that truth-telling is no longer an equilibrium.

5. VCG: pay for the harm you do to others

The Vickrey-Clarke-Groves mechanism generalises the second-price auction to any setting with money. It is built from Vickrey (1961), Edward Clarke's 1971 paper in Public Choice, and Theodore Groves's 1973 paper in Econometrica.

  1. Everyone reports a valuation vi(x)v_i(x) for every possible outcome xx.
  2. Choose the outcome x∗x^* that maximises the sum of reported values.
  3. Charge each agent the externality they impose: how much better off the others would be if agent ii did not exist, minus how well off the others are at x∗x^*.

pi=max⁡x∑j≠ivj(x)  −  ∑j≠ivj(x∗)p_i = \max_{x}\sum_{j \ne i} v_j(x) \;-\; \sum_{j \ne i} v_j(x^*)

With one item, the winner's externality is the value of the bidder who would otherwise have won, so VCG reduces exactly to the second-price auction. In general, each agent's utility equals total welfare minus a term they cannot influence, so maximising their own utility means helping the mechanism maximise welfare: VCG is DSIC and efficient.

Key idea: Your payment is set entirely by others' reports. This is Vickrey's insight from the previous lesson, extended from one item to bundles, public projects, and any outcome space.

6. Code: VCG for two items and three bidders

A brute-force VCG for a tiny combinatorial auction. Bidder 1 wants both items as a package; bidders 2 and 3 each want one.

from itertools import product

ITEMS = ("A", "B")
bids = {                        # bidder -> {bundle: value}
    1: {frozenset("AB"): 2},
    2: {frozenset("A"): 2},
    3: {frozenset("B"): 2},
}

def best_allocation(bidders):
    # brute force: give each item to one bidder, or nobody
    best, best_w = {}, 0
    for owners in product([None, *bidders], repeat=len(ITEMS)):
        got = {b: frozenset(i for i, o in zip(ITEMS, owners) if o == b)
               for b in bidders}
        w = sum(bids[b].get(got[b], 0) for b in bidders)
        if w > best_w:
            best, best_w = got, w
    return best, best_w

alloc, _ = best_allocation(list(bids))
for i in bids:
    others = [b for b in bids if b != i]
    _, w_without_i = best_allocation(others)
    w_others_with_i = sum(bids[b].get(alloc[b], 0) for b in others)
    print(f"bidder {i}: gets {''.join(sorted(alloc[i])) or '-'}  pays {w_without_i - w_others_with_i}")
bidder 1: gets -  pays 0
bidder 2: gets A  pays 0
bidder 3: gets B  pays 0

Gotcha: Revenue is zero, although bidder 1 offered 2 for the pair. Remove bidder 2 and the best the others can achieve is still 2, which bidder 3 already gets, so bidder 2 harms no one and pays nothing; the same holds for bidder 3. Lawrence Ausubel and Paul Milgrom's 2006 chapter The Lovely but Lonely Vickrey Auction lists this and related failures: revenue can fall when bidders are added, and losing bidders can collude, or one bidder can enter under several names, to cut prices. Exact winner determination is also computationally hard for many items (Michael Rothkopf, Aleksandar Pekeč and Ronald Harstad, Management Science, 1998).

7. Myerson's optimal auction

VCG maximises welfare. A seller usually wants revenue. Roger Myerson's 1981 paper Optimal Auction Design (Mathematics of Operations Research) solved that problem for one item and independent private values, using the revelation principle to search over all mechanisms at once. The key object is each bidder's virtual value:

φ(v)=v−1−F(v)f(v)\varphi(v) = v - \frac{1 - F(v)}{f(v)}

where FF is the distribution of the bidder's value and ff its density. Myerson showed that expected revenue equals the expected virtual value of whoever receives the item. So the optimal mechanism gives the item to the bidder with the highest virtual value, if it is non-negative, and otherwise keeps it.

For values uniform on 0 to 1, F(v)=vF(v) = v and f(v)=1f(v) = 1, so φ(v)=2v−1\varphi(v) = 2v - 1. That is non-negative exactly when v≥0.5v \ge 0.5: the optimal auction is a second-price auction with a reserve price of 0.5, the result quoted in the previous lesson.

Key idea: The subtracted term is the information rent: what the seller must leave on the table to keep higher types from pretending to be lower ones. Revenue maximisation means trading some efficiency, sometimes not selling to a willing buyer, for a smaller rent.

8. What no mechanism can do

The field is bounded by impossibility theorems, and knowing them saves designers from chasing mechanisms that cannot exist.

TheoremSettingWhat cannot coexist
Gibbard-Satterthwaite (Gibbard 1973; Mark Satterthwaite 1975, Journal of Economic Theory)Voting over 3 or more alternatives, no moneyStrategy-proofness, every alternative able to win, and no dictator
Green-Laffont (Jerry Green and Jean-Jacques Laffont, 1977, Econometrica)General quasi-linear settingsDSIC, efficiency, and budget balance
Myerson-Satterthwaite (1983, Journal of Economic Theory)One seller, one buyer, overlapping private valuesBIC, IR, efficiency, and budget balance
Predict first

A seller's cost and a buyer's value are both private, drawn from overlapping ranges. Can any voluntary trading mechanism that does not need outside subsidy guarantee that trade happens whenever the buyer values the good more than it costs the seller?

9. Design without money: stable matching

Some markets cannot use prices: residency positions, school seats, donated organs. David Gale and Lloyd Shapley's 1962 paper in the American Mathematical Monthly gave the core tool. A matching is stable if no applicant and program would both rather be matched to each other than to their current assignment. Deferred acceptance always finds one:

  1. Each unmatched applicant proposes to their most-preferred program that has not yet rejected them.
  2. Each program tentatively holds its best proposals up to capacity and rejects the rest.
  3. Repeat until no applicant has a remaining program to propose to. Holds become final.

Acceptance is deferred because a held proposal can still be displaced by a better one later. The outcome is the stable matching that every proposing-side participant likes best, and proposers cannot gain by misreporting their preferences (Lester Dubins and David Freedman, 1981; Alvin Roth, 1982). Roth also showed no stable mechanism is strategy-proof for both sides at once.

In practice: Roth and Elliott Peranson's redesign of the US National Resident Matching Program, described in the American Economic Review in 1999, rebuilt a clearinghouse that the authors say fills roughly 20,000 physician positions a year around an applicant-proposing deferred acceptance algorithm. In 2005 Boston Public Schools replaced its assignment rule with student-proposing deferred acceptance, after work by Atila Abdulkadiroğlu, Parag Pathak, Roth and Tayfun Sönmez showed the old rule rewarded families who ranked strategically.

10. From theorems to market design

Roth and Shapley shared the 2012 Nobel memorial prize "for the theory of stable allocations and the practice of market design". The phrase market design marks a shift in the field: from proving which mechanisms exist to engineering ones that work with real participants, real computers, and real constraints.

ProblemMechanism familyMain design concern
Selling many related licencesSimultaneous ascending or clock auctionsLetting bidders assemble packages without exposure to losses
Selling one item for revenueSecond-price or first-price with reserveEntry and collusion, more than format
Residency and school placesDeferred acceptanceStability and strategy-proofness for applicants
Kidney exchangeCycles and chains of incompatible donor pairs (Roth, Sönmez and M. Utku Ünver, Quarterly Journal of Economics, 2004)Short cycles that can be performed simultaneously
Funding a shared projectVCG-style pivotal mechanismsBudget deficits and collusion
Advertising slotsGeneralized second-price auctionsCovered in The ad auction lesson

Key idea: The theory supplies the constraints, incentive compatibility, participation, impossibility, and the practice decides which to relax. Real mechanisms favour simplicity, robustness to wrong beliefs, and resistance to collusion over the optimum of a model with a perfectly known prior.

Check your understanding

The lesson ends with a 5-question quiz. Take it in the player above to see your score.

  1. What does the revelation principle allow a mechanism designer to do?
    • Ignore incentive constraints entirely
    • Restrict attention to direct mechanisms in which truth-telling is an equilibrium
    • Guarantee budget balance in every setting
    • Force participants to reveal their types by law
  2. In VCG, what is agent i's payment?
    • Agent i's own reported value for the chosen outcome
    • The average of all other agents' reports
    • Zero, if agent i reports truthfully
    • The others' best total value without agent i, minus their total value at the chosen outcome
  3. Values are uniform on 0 to 1. What is the virtual value of a bidder with value 0.7, and is the bidder eligible to win in Myerson's optimal auction?
    • 0.4, eligible
    • 0.7, eligible
    • -0.3, not eligible
    • 0.35, eligible
  4. The Myerson-Satterthwaite theorem says that in bilateral trade with overlapping private values, no mechanism can be simultaneously:
    • Strategy-proof and dictatorial
    • Incentive compatible, individually rational, efficient, and budget balanced
    • Efficient and revenue-maximising for a monopolist seller
    • Stable and strategy-proof for both sides
  5. In applicant-proposing deferred acceptance, which statement is true?
    • Programs can always gain by misreporting their rankings
    • The result can be unstable if applicants lie
    • Applicants cannot gain by misreporting their preferences
    • Acceptances are final as soon as they are made

Related lessons

Math
intermediate

Auction Theory: Formats, Bid Shading, and Revenue Equivalence

Four very different auction formats raise the same expected revenue under a few clean assumptions. This lesson derives equilibrium bidding in first- and second-price auctions, shows why Vickrey's rule makes honesty optimal, proves revenue equivalence, and covers when it breaks: risk aversion, the winner's curse, collusion and reserve prices.

10 steps·~15 min
Math
intermediate

Matching: Augmenting Paths, Hall, König, and the Assignment Problem

Pair workers with tasks, the most pairs or the cheapest total. Learn why augmenting paths prove a matching is maximum, how Hall's and König's theorems give certificates, how the Hungarian method prices an assignment, and why odd cycles and preferences each change the problem.

10 steps·~15 min
Math
intermediate

Sequential Moves, Credible Threats, and Hidden Information

Strategic interaction unfolds over time and under uncertainty. This lesson covers game trees and backward induction, why subgame perfection discards empty threats, how repetition sustains cooperation, and how Harsanyi turned private information into Bayesian games, the foundation for auctions and mechanism design.

10 steps·~15 min
Math
intermediate

Strategic Games and Nash Equilibrium

Game theory starts where optimisation stops: your best choice depends on what others choose, and theirs on yours. This lesson builds the payoff matrix, dominance, Nash equilibrium in pure and mixed strategies, and the indifference trick for computing a mix, with code that finds every pure equilibrium.

10 steps·~15 min