23
Matching with Contracts By JOHN WILLIAM HATFIELD AND PAUL R. MILGROM* We develop a model of matching with contracts which incorporates, as special cases, the college admissions problem, the Kelso-Crawford labor market matching model, and ascending package auctions. We introduce a new “law of aggregate demand” for the case of discrete heterogeneous workers and show that, when workers are substitutes, this law is satisfied by profit-maximizing firms. When workers are substitutes and the law is satisfied, truthful reporting is a dominant strategy for workers in a worker-offering auction/matching algorithm. We also parameterize a large class of preferences satisfying the two conditions. (JEL C78, D44) Since the pioneering U.S. spectrum auctions of 1994 and 1995, related ascending multi-item auctions have been used with much fanfare on six continents for sales of radio spectrum and electricity supply contracts. 1 Package bidding, in which bidders can place bids not just for individual lots but also for bundles of lots (“packages”), has found increasing use in pro- curement applications (Milgrom, 2004; Peter Cramton et al., 2005). Recent proposals in the United States to allow package bidding for spectrum licenses and for airport landing rights incorporate ideas suggested by Lawrence Aus- ubel and Milgrom (2002) and by David Porter et al. (2003) (see Ausubel et al., 2005). Matching algorithms based on economic the- ory also have important practical applications. Alvin E. Roth and Elliott Peranson (1999) ex- plain how a certain two-sided matching proce- dure, which is similar to the college admissions algorithm introduced by David Gale and Lloyd Shapley (1962), has been adapted to match 20,000 doctors per year to medical residency programs. After Atila Abdulkadirog ˘lu and Tay- fun So ¨nmez (2003) advocated a variation of the same algorithm for use by school choice pro- grams, a similar centralized match was adopted by the New York City schools (Abdulkadirog ˘lu et al., 2005b) and another is being evaluated by the Boston schools (Abdulkadirog ˘lu et al., 2005a). This paper identifies and explores certain similarities among all of these auction and matching mechanisms. To illustrate one simi- larity, consider the labor market auction model of Alexander Kelso and Vincent Crawford (1982), in which firms bid for workers in simul- taneous ascending auctions. The Kelso-Crawford model assumes that workers have preferences over firm-wage pairs and that all wage offers are drawn from a prespecified finite set. If that set includes only one wage, then all that is left for the auction to determine is the match of workers to firms, so the auction is effectively trans- formed into a matching algorithm. The auction algorithm begins with each firm proposing em- ployment to its most preferred set of workers at the one possible wage. When some workers turn it down, the firm makes offers to other workers * Hatfield: Graduate School of Business, Stanford Uni- versity, Stanford, CA 94305 (e-mail: hatfield@stanford. edu); Milgrom: Department of Economics, Stanford University, Stanford, CA 94305 (e-mail: paul@milgrom. net). We thank Atila Abdulkadirog ˘lu, Federico Echenique, Daniel Lehmann, Jon Levin, and Alvin Roth for helpful discussions. This research is supported by National Science Foundation Grant No. SES-0239910. John Hatfield has also been supported by the Burt and Deedee McMurtry Stanford Graduate Fellowship. 1 For example, a New York Times article about a spec- trum auction in the United States was headlined “The Great- est Auction Ever” (New York Times, March 16, 1995, p. A17). The scientific community has also been enthusiastic. In its fiftieth anniversary self-review, the U.S. National Science Foundation reported that “from a financial stand- point, the big payoff for NSF’s longstanding support [of auction theory research] came in 1995 ... [when t]he Federal Communications Commission established a system for us- ing auctions.” See Milgrom (2004). 913

Matching with Contracts - Stanford Universityweb.stanford.edu/~milgrom/publishedarticles/Matching with... · 2005. 10. 22. · Gale-Shapley matching algorithm. Hence, the Gale-Shapley

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Matching with Contracts - Stanford Universityweb.stanford.edu/~milgrom/publishedarticles/Matching with... · 2005. 10. 22. · Gale-Shapley matching algorithm. Hence, the Gale-Shapley

Matching with Contracts

By JOHN WILLIAM HATFIELD AND PAUL R MILGROM

We develop a model of matching with contracts which incorporates as specialcases the college admissions problem the Kelso-Crawford labor market matchingmodel and ascending package auctions We introduce a new ldquolaw of aggregatedemandrdquo for the case of discrete heterogeneous workers and show that whenworkers are substitutes this law is satisfied by profit-maximizing firms Whenworkers are substitutes and the law is satisfied truthful reporting is a dominantstrategy for workers in a worker-offering auctionmatching algorithm We alsoparameterize a large class of preferences satisfying the two conditions (JEL C78D44)

Since the pioneering US spectrum auctionsof 1994 and 1995 related ascending multi-itemauctions have been used with much fanfare onsix continents for sales of radio spectrum andelectricity supply contracts1 Package biddingin which bidders can place bids not just forindividual lots but also for bundles of lots(ldquopackagesrdquo) has found increasing use in pro-curement applications (Milgrom 2004 PeterCramton et al 2005) Recent proposals in theUnited States to allow package bidding forspectrum licenses and for airport landing rightsincorporate ideas suggested by Lawrence Aus-ubel and Milgrom (2002) and by David Porter etal (2003) (see Ausubel et al 2005)

Matching algorithms based on economic the-ory also have important practical applicationsAlvin E Roth and Elliott Peranson (1999) ex-plain how a certain two-sided matching proce-dure which is similar to the college admissionsalgorithm introduced by David Gale and LloydShapley (1962) has been adapted to match20000 doctors per year to medical residencyprograms After Atila Abdulkadiroglu and Tay-fun Sonmez (2003) advocated a variation of thesame algorithm for use by school choice pro-grams a similar centralized match was adoptedby the New York City schools (Abdulkadirogluet al 2005b) and another is being evaluated bythe Boston schools (Abdulkadiroglu et al2005a)

This paper identifies and explores certainsimilarities among all of these auction andmatching mechanisms To illustrate one simi-larity consider the labor market auction modelof Alexander Kelso and Vincent Crawford(1982) in which firms bid for workers in simul-taneous ascending auctions The Kelso-Crawfordmodel assumes that workers have preferencesover firm-wage pairs and that all wage offers aredrawn from a prespecified finite set If that setincludes only one wage then all that is left forthe auction to determine is the match of workersto firms so the auction is effectively trans-formed into a matching algorithm The auctionalgorithm begins with each firm proposing em-ployment to its most preferred set of workers atthe one possible wage When some workers turnit down the firm makes offers to other workers

Hatfield Graduate School of Business Stanford Uni-versity Stanford CA 94305 (e-mail hatfieldstanfordedu) Milgrom Department of Economics StanfordUniversity Stanford CA 94305 (e-mail paulmilgromnet) We thank Atila Abdulkadiroglu Federico EcheniqueDaniel Lehmann Jon Levin and Alvin Roth for helpfuldiscussions This research is supported by National ScienceFoundation Grant No SES-0239910 John Hatfield has alsobeen supported by the Burt and Deedee McMurtry StanfordGraduate Fellowship

1 For example a New York Times article about a spec-trum auction in the United States was headlined ldquoThe Great-est Auction Everrdquo (New York Times March 16 1995 pA17) The scientific community has also been enthusiasticIn its fiftieth anniversary self-review the US NationalScience Foundation reported that ldquofrom a financial stand-point the big payoff for NSFrsquos longstanding support [ofauction theory research] came in 1995 [when t]he FederalCommunications Commission established a system for us-ing auctionsrdquo See Milgrom (2004)

913

to fill its remaining openings This procedure isprecisely the hospital-offering version of theGale-Shapley matching algorithm Hence theGale-Shapley matching algorithm is a specialcase of the Kelso-Crawford procedure

The possibility of extending the NationalResident Matching Program (the ldquoMatchrdquo) topermit wage competition is an important con-sideration in assessing public policy toward theMatch particularly because work by JeremyBulow and Jonathan Levin (2003) lends sometheoretical support for the position that theMatch may compress and reduce doctorsrsquowages relative to a perfectly competitive stan-dard The practical possibility of such an exten-sion depends on many details includingimportantly the form in which doctors and hos-pitals would have to report their preferences foruse in the Match In its current incarnation theMatch can accommodate hospital preferencesthat encompass affirmative action constraintsand a subtle relationship between internal med-icine and its subspecialties so it will be impor-tant for any replacement algorithm to allowsimilar preferences to be expressed In SectionIV we introduce a parameterized family of val-uations that accomplishes that

A second important similarity is between theGale-Shapley doctor-offering algorithm and theAusubel-Milgrom proxy auction Explainingthis relationship requires restating the algorithmin a different form from the one used for thepreceding comparison We show that if the hos-pitals in the Match consider doctors to be sub-stitutes then the doctor-offering algorithm isequivalent to a certain cumulative offer processin which the hospitals at each round can choosefrom all the offers they have received at anyround current or past In a different environ-ment where there is but a single ldquohospitalrdquo orauctioneer with unrestricted preferences andgeneral contract terms this cumulative offerprocess coincides exactly with the Ausubel-Milgrom proxy auction

Despite the close connections among thesemechanisms previous analyses have treatedthem separately In particular analyses of auc-tions typically assume that biddersrsquo payoffs arequasi-linear No corresponding assumption ismade in analyzing the medical match or thecollege admissions problem indeed the very

possibility of monetary transfers is excludedfrom those formulations As discussed belowthe quasi-linearity assumption combines withthe substitutes assumption in a subtle and re-strictive way

This paper presents a new model that sub-sumes unifies and extends the models citedabove The basic unit of analysis in the newmodel is the contract To reproduce the Gale-Shapley college admissions problem we spec-ify that a contract is fully identified by thestudent and college other terms of the relation-ship depend only on the partiesrsquo identities Toreproduce the Kelso-Crawford model of firmsbidding for workers we specify that a contractis fully identified by the firm the worker andthe wage Finally to reproduce the Ausubel-Milgrom model of package bidding we specifythat a contract is identified by the bidder thepackage of items that the bidder will acquireand the price to be paid for that package Sev-eral additional variations can be encompassedby the model For example Roth (1984 1985b)allows that a contract might specify the partic-ular responsibilities that a worker will havewithin the firm

Our analysis of matching models emphasizestwo conditions that restrict the preferences ofthe firmshospitalscolleges a substitutes condi-tion and an law of aggregate demand conditionWe find that these two conditions are implied bythe assumptions of earlier analyses so our uni-fied treatment implies the central results ofthose theories as special cases

In the tradition of demand theory we definesubstitutes by a comparative statics conditionIn demand theory the exogenous parameterchange is a price decrease so the challenge is toextend the definition to models in which theremay be no price that is allowed to change Inour contracts model a price reduction corre-sponds formally to expanding the firmrsquos oppor-tunity set ie to making the set of feasiblecontracts larger Our substitutes condition as-serts that when the firm chooses from an ex-panded set of contracts the set of contracts itrejects also expands (weakly) As we will showthis abstract substitutes condition coincides ex-actly with the demand theory condition for stan-dard models with prices It also coincidesexactly with the ldquosubstitutable preferencesrdquo

914 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

condition for the college admissions problem(Roth and Marilda Sotomayor 1990)

The law of aggregate demand which is newin this paper is similarly defined by a compar-ative static It is the condition that when acollege or firm chooses from an expanded set itadmits at least as many students or hires at leastas many workers2

The term ldquolaw of aggregate demandrdquo is mo-tivated by the relation of this condition to thelaw of demand in producer theory According toproducer theory a profit-maximizing firm de-mands (weakly) more of any input as its pricefalls For the matching model with prices thelaw of aggregate demand requires that whenany input price falls the aggregate quantitydemanded which includes the quantities de-manded of that input and all of its substitutesrises (weakly) Notice that it is tricky even tostate such a law in producer theory with divis-ible inputs because there is no general aggre-gate quantity measure when divisible inputs arediverse In the present model with indivisibleworkers we measure the aggregate quantity ofworkers demanded or hired by the total numberof such workers

A key step in our analysis is to prove a newresult in demand theory if workers are substi-tutes then a profit-maximizing firmrsquos employ-ment choices satisfy the law of aggregatedemand Since firms are profit maximizers andregard workers as substitutes in the Kelso-Crawford model it follows that the law of ag-gregate demand holds for that model Thus oneimplication of the standard quasi-linearity as-sumption of auction theory is that the biddersrsquopreferences satisfy the law of aggregate de-mand We find that when preferences are re-sponsive as originally and still commonlyassumed in matching theory analyses they sat-isfy the law of aggregate demand3 We also

prove some new results for the class of auctionand matching models that satisfy this law

The paper is organized as follows Section Iintroduces the matching-with-contracts nota-tion treats an allocation as a set of contractsand characterizes the stable allocations in termsof the solution of a certain system of twoequations

Section II introduces the substitutes conditionand uses it to prove that the set of stable allo-cations is a nonempty lattice and that a certaingeneralization of the Gale-Shapley algorithmidentifies its maximum and minimum elementsThese two extreme points are characterized as adoctor-optimalhospital-pessimal point whichis a point that is the unanimously most preferredstable allocation for the doctors and the unani-mously least preferred stable allocation for thehospitals and a hospital-optimaldoctor-pessimalpoint with the reverse attributes

Section II also proves several related resultsFirst if there are at least two hospitals and ifsome hospital has preferences that do not satisfythe substitutes condition then even if all otherhospitals have just a single opening there existsa profile of preferences for the students andcolleges such that no stable allocation existsThis result is important for the construction ofmatching algorithms It means that any match-ing procedure that permits students and collegesto report preferences that do not satisfy thesubstitutes condition cannot be guaranteed al-ways to select a stable allocation with respect tothe reported preferences

Another result concerns vacancy chain dy-namics which traces the dynamic adjustment ofthe labor market when a worker retires or a newworker enters the market and the dynamics arerepresented by the operator we have describedThe analysis extends the results reported byYosef Blum et al (1997) and foreshadowed byKelso and Crawford (1982) We find that start-ing from a stable allocation the vacancy adjust-ment process converges to a new stableallocation

Section III contains the most novel results ofthe paper It introduces the law of aggregate

2 In their study of a model of ldquoschedule matchingrdquoAhmet Alkan and Gale (2003) independently introduced asimilar notion which they call ldquosize monotonicityrdquo

3 The original matching formulation of Gale and Shapley(1962) assumed that colleges simply have a rank orderlisting of students Roth (1985a) dubbed this ldquoresponsive-nessrdquo and sought to relax this condition Similarly in amodel of matching with wages Crawford and E M Knoer(1981) assumed that firm preferences over workers were

separable That restriction was relaxed by Kelso and Craw-ford (1982)

915VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

demand verifies that it holds for a profit-maximizing firm when inputs are substitutesand explores its consequences When both thesubstitutes and the law of aggregate demandconditions are satisfied then (a) the set of work-ers employed and the set of jobs filled is thesame at every stable collection of contracts and(b) it is a dominant strategy for doctors (orworkers or students) to report their preferencestruthfully in the doctor-offering version of theextended Gale-Shapley algorithm We alsodemonstrate the necessity of a weaker versionof the law of aggregate demand for theseconclusions

Our conclusion about this dominant strategyproperty substantially extends earlier findingsabout incentives in matching The first suchresults due to Lester Dubins and David Freed-man (1981) and Roth (1982) established thedominant strategy property for the marriageproblem which is a one-to-one matching prob-lem that is a special case of the college admis-sions problem Similarly Gabrielle Demangeand Gale (1985) establish the dominant strategyproperty for the worker-firm matching problemin which each firm has singleton preferencesThese results generalize to the case of respon-sive preferences that is to the case where eachhospital (or college or firm) behaves just thesame as a collection of smaller hospitals withone opening each For the college admissionsproblem Abdulkadiroglu (2003) has shown thatthe dominant strategy property also holds whencolleges have responsive preferences with ca-pacity constraints where the constraints limitthe number of workers of a particular type thatcan be hired All of these models with a domi-nant strategy property satisfy our substitutesand law of aggregate demand conditions so theearlier dominant strategy results are all sub-sumed by our new result

In Section IV we introduce a new parame-terized family of preferencesmdashthe endowed as-signment preferencesmdashand show that theysubsume certain previously identified classesand satisfy both the substitutes and law of ag-gregate demand conditions

Section V introduces cumulative offer pro-cesses as an alternative auctionmatching algo-rithm and shows that when contracts aresubstitutes it coincides with the doctor-offering

algorithm of the previous sections Since theAusubel-Milgrom proxy auction is also a cumu-lative offer process our dominant strategy con-clusion of Section III implies an extension ofthe Ausubel-Milgrom dominant strategy resultWhen contracts are not substitutes the cumula-tive offer process can converge to an infeasibleallocation We show that if there is a singlehospitalauctioneer however the cumulativeoffer process converges to a feasible stableallocation without restrictions on the hospitalrsquospreferences Section VI concludes All proofsare in the Appendix

I Stable Collections of Contracts

The matching model without transfers hasmany applications of which the best knownamong economists is the match of doctors tohospital residency programs in the UnitedStates For the remainder of the paper we de-scribe the match participants as ldquodoctorsrdquo andldquohospitalsrdquo These groups play the same respec-tive roles as students and colleges in the collegeadmissions problem and workers and firms inthe Kelso-Crawford labor market model

A Notation

The sets of doctors and hospitals are denotedby D and H respectively and the set of con-tracts is denoted by X We assume only thateach contract x X is bilateral so that it isassociated with one ldquodoctorrdquo xD D and oneldquohospitalrdquo xH H When all terms of employ-ment are fixed and exogenous the set of con-tracts is just the set of doctor-hospital pairs X D H For the Kelso-Crawford model a con-tract specifies a firm a worker and a wage X D H W

Each doctor d can sign only one contract Herpreferences over possible contracts includingthe null contract A are described by the totalorder d The null contract represents unem-ployment and contracts are acceptable or un-acceptable according to whether they are morepreferred than A When we write preferences asPd x d y d z we mean that Pd names thepreference order of d and that the listed con-tracts (in this case x y and z) are the onlyacceptable ones

916 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

Given a set of contracts X X offered in themarket doctor drsquos chosen set Cd(X) is eitherthe null set if no acceptable contracts are of-fered or the singleton set consisting of the mostpreferred contract We formalize this as follows

(1) Cd X

A if x XxD d x d A Amaxd

x XxD d otherwise

The choices of a hospital h are more compli-cated because it has preferences h over sets ofdoctors Its chosen set is a subset of the con-tracts that name it that is Ch(X) x XxH h In addition a hospital can sign onlyone contract with any given doctor

(2) h H X X x x ChXx

xf xD xD

Let CD(X) dD Cd(X) denote the set ofcontracts chosen by some doctor from set XThe remaining offers in X are in the rejectedset RD(X) X CD(X) Similarly the hos-pitalsrsquo chosen and rejected sets are denoted byCH(X) hH Ch(X) and RH(X) X CH(X)

B Stable Allocations Stable Sets ofContracts

In our model an allocation is a collection ofcontracts as that determines the payoffs to theparticipants We study allocations such thatthere is no alternative allocation that is strictlypreferred by some hospital and weakly pre-ferred by all of the doctors that it hires and suchthat no doctor strictly prefers to reject his con-tract It is a standard observation in matchingtheory that such an allocation is a core alloca-tion in the sense that no coalition of hospitalsand doctors can find another allocation feasiblefor them that all weakly prefer and somestrictly prefer This allocation is also a stableallocation in the sense that there is no coalitionthat can deviate profitably even if the deviatingcoalition assumes that outsiders will remainwilling to accept the same contracts

We formalize the notion of stable allocationsas follows

DEFINITION A set of contracts X X is astable allocation if

(i) CD(X) CH(X) X and(ii) there exists no hospital h and set of con-

tracts X Ch(X) such that

X Ch X X CD X X

If condition (i) fails then some doctor orhospital prefers to reject some contract thatdoctor or hospital then blocks the allocation Ifcondition (ii) fails then there is an alternativeset of contracts that a hospital strictly prefersand that its corresponding doctors weakly prefer

The first theorem states that a set of contractsis stable if any alternative contract would berejected by some doctor or some hospital fromits suitably defined opportunity set In the for-mulas below think of the doctorsrsquo opportunityset as XD and the hospitalsrsquo opportunity set asXH If X is the corresponding stable set then XDmust include in addition to X all contracts thatwould not be rejected by the hospitals and XHmust similarly include X and all contracts thatwould not be rejected by the doctors If X isstable then every alternative contract is rejectedby somebody so X XH XD This logic issummarized in the first theorem

THEOREM 1 If (XD XH) X2 is a solution tothe system of equations

(3) XD X RH XH

and

XH X RD XD

then XH XD is a stable set of contracts andXH XD CD(XD) CH(XH) Conversely forany stable collection of contracts X there ex-ists some pair (XD XH) satisfying (3) such thatX XH XD

Theorem 1 is formulated to apply to generalsets of contracts It is the basis of our analysis of

917VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

stable sets of contracts in the entire set of mod-els treated in this paper

II Substitutes

In this section we introduce our first restric-tion on hospital preferences which is the re-striction that contracts are substitutes We usethe restriction to prove the existence of a stableset of contracts and to study an algorithm thatidentifies those contracts

Our substitutes condition generalizes theRoth-Sotomayor substitutable preferences con-dition to preferences over contracts In wordsthe substitutable preferences condition statesthat if a contract is chosen by a hospital fromsome set of available contracts then that con-tract will still be chosen from any smaller setthat includes it Our substitutes condition issimilarly defined as follows

DEFINITION Elements of X are substitutesfor hospital h if for all subsets X X X wehave Rh(X) Rh(X)4

In the language of lattice theory which weuse below elements of X are substitutes forhospital h exactly when the function Rh isisotone

In demand theory substitutes is defined by acomparative static that uses prices It says thatlimiting attention to the domain of wage vectorsat which there is a unique optimum for thehospital the hospitalrsquos demand for any doctor dis nondecreasing in the wage of each otherdoctor d

Our next result verifies that for resource al-location problems involving prices our defini-tion of substitutes coincides with the standarddemand theory definition For simplicity wefocus on a single hospital and suppress its iden-tifier h from our notation Thus imagine that ahospital chooses doctorsrsquo contracts from a sub-set of X D W where D is a finite set of

doctors and W w w is a finite set ofpossible wages Assume that the set of wages Wis such that the hospitalsrsquo preferences are al-ways strict Suppose that w max W is aprohibitively high wage so that no hospital everhires a doctor at wage w

In demand theory it is standard to representthe hospitalrsquos market opportunities by a vectorw WD that specifies a wage wd at whicheach doctor can be hired We can extend thedomain of the choice function C to allow marketopportunities to be expressed by wage vectorsas follows

(4) w WDf Cw Cd wdd D

Formula (4) associates with any wage vector wthe set of contracts (d wd)d D and definesC(w) to be the choice from that set

With the choice function extended this waywe can now describe the traditional demandtheory substitutes condition The condition as-serts that increasing the wage of doctor d fromwd to wd (weakly) increases demand for anyother doctor d

DEFINITION C satisfies the demand-theorysubstitutes condition if (i) d d (ii) (dwd) C(w) and (iii) wd wd imply that (dwd) C(wd wd)

To compare the two conditions we need tobe able to assign a vector of wages to each setof contracts X It is possible that in X somedoctor is unavailable at any wage or is available atseveral different wages For a profit-maximizinghospital the doctorrsquos relevant wage is the low-est wage if any at which she is availableMoreover such a hospital does not distinguishbetween a doctor who is unavailable and onewho is available only at a prohibitively highwage Thus from the perspective of a profit-maximizing hospital having contracts X avail-able is equivalent to facing a wage vector W(X)specified as follows

(5) Wd X minss w or d s X

In view of the preceding discussion a profit-maximizing hospitalrsquos choices must obey thefollowing identity

4 This condition is identical in form to the ldquoconditionalphardquo used in the study of social choice for example byAmartya Sen (1970) but the meanings of the choice sets aredifferent In Senrsquos model the choice set is a collection ofmutually exclusive choices whereas in the matching prob-lems the set describes the choice itself

918 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

(6) CX CWX

THEOREM 2 Suppose that X D W is afinite set of doctor-wage pairs and that (6)holds Then C satisfies the demand theory sub-stitutes condition if and only if its contracts aresubstitutes

In particular this shows that the Kelso-Crawford ldquogross substitutesrdquo condition is sub-sumed by our substitutes condition

A A Generalized Gale-Shapley Algorithm

We now introduce a monotonic algorithmthat will be shown to coincide with the Gale-Shapley algorithm on its original domain Todescribe the monotonicity that is found in thealgorithm let us define an order on X X asfollows

(7) XD XH XD XH

N XD XD and XH XH

With this definition (X X ) is a finitelattice

The generalized Gale-Shapley algorithm isdefined as the iterated applications of a certainfunction F X X3 X X as defined below

(8) F1 X X RH X

F2 X X RD X

FXD XH F1 XH F2 F1 XH

As we have previously observed since the doc-torsrsquo choices are singletons a revealed prefer-ence argument establishes that the function RD X3 X is isotone If the contracts are substitutesfor the hospitals then the function RH X 3 Xis isotone as well When both are isotone thefunction F (X X ) 3 (X X ) isalso isotone that is it satisfies ((XD XH) (XD XH)) f (F(XD XH) F(XD XH))

Thus F X X 3 X X is an isotonefunction from a finite lattice into itself Usingfixed point theory for finite lattices the set offixed points is a nonempty lattice and iterated

applications of F starting from the minimumand maximum points of X X converge mono-tonically to a fixed point of F5 We summarizethe particular application here with the follow-ing theorem6

THEOREM 3 Suppose contracts are substi-tutes for the hospitals Then

(a) The set of fixed points of F on X X is anonempty finite lattice and in particularincludes a smallest element (X D X H) and alargest element (X D X H)

(b) Starting at (XD XH) (X A) the general-ized Gale-Shapley algorithm convergesmonotonically to the highest fixed point

X D X H

supX XFX X X X and

(c) Starting at (XD XH) (A X) the general-ized Gale-Shapley algorithm convergesmonotonically to the lowest fixed point

X D X H

infX XFX X X X

The facts that (X D X H) is the highest fixedpoint of F and that (X D X H) is the lowest in thespecified order mean that for any other fixedpoint (XD XH) X D XD X D and X H XH X H Because doctors are better off when theycan choose from a larger set of contracts it

5 This special case of Tarskirsquos fixed point theorem can besimply proved as follows Let Z be a finite lattice withmaximum point z Let z0 z z1 F(z0) zn F(zn1)Plainly z1 z0 and since F is isotone z2 F(z1) F(z0) z1 and similarly zn131 zn for all n So thedecreasing sequence zn converges in a finite number ofsteps to a point z with F( z) z Moreover for any fixedpoint z since z z z Fn( z) Fn(z) z for n large soz is the maximum fixed point A similar argument appliesfor the minimum fixed point

6 Hiroyuki Adachi (2000) and Federico Echenique andJorge Oviedo (2004) have also characterized the Gale-Shapley algorithm for the marriage problem and the collegeadmissions problem respectively as iterated applications ofa certain operator on a lattice See also Tamas Fleiner(2003)

919VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

follows that the doctors unanimously weaklyprefer CD(X D) to CD(XD) to CD(X D) and simi-larly that the hospitals unanimously preferCH(X H) to CH(XH) to CH(X H) Notice byTheorem 1 that CD(X D) CH(X H) X D X H and CD(X D) CH(X H) X D X H sowe have the following welfare conclusion

THEOREM 4 Suppose contracts are substi-tutes for the hospitals Then the stable set ofcontracts X D X H is the unanimously mostpreferred stable set for the doctors and theunanimously least preferred stable set for thehospitals Similarly the stable set X D X H isthe unanimously most preferred stable set forthe hospitals and the unanimously least pre-ferred stable set for the doctors

Theorems 3 and 4 duplicate and extend fa-miliar conclusions about stable matches in theGale-Shapley matching problem and a similarconclusion about equilibrium prices in theKelso-Crawford labor market model Thesenew theorems encompass both these older mod-els and additional ones with general contractterms

To see how the Gale-Shapley algorithm isencompassed consider the doctor-offering al-gorithm As in the original formulation we sup-pose that hospitals have a ranking of doctorsthat is independent of the other doctors they willhire so hospital h just chooses its nh mostpreferred doctors (from among those who areacceptable and have proposed to hospital h)

Let XH(t) be the cumulative set of contractsoffered by the doctors to the hospitals throughiteration t and let XD(t) be the set of contractsthat have not yet been rejected by the hospitalsthrough iteration t Then the contracts ldquoheldrdquo atthe end of the iteration are precisely those thathave been offered but not rejected which arethose in XD(t) XH(t) The process initiateswith no offers having been made or rejected soXD(0) X and XH(0) A

Iterated applications of the operator F de-scribed above define a monotonic process inwhich the set of doctors makes an ever-larger(accumulated) set of offers and the set of unre-jected offers grows smaller round by roundUsing the specification of F and starting fromthe extreme point (X A) we have

(9) XD t X RH XH t 1

XH t X RD XD t

After offers have been made in iteration t 1the hospitalrsquos cumulative set of offers is XH(t 1) Each hospital h holds onto the nh best offersit has received at any iteration provided thatmany acceptable offers have been made other-wise it holds all acceptable offers that havebeen made Thus the accumulated set of re-jected offers is RH(XH(t 1)) and the unre-jected offers are those in X RH(XH(t 1)) XD(t) At round t if a doctorrsquos contract is beingheld then the last offer the doctor made was itsbest contract in XD(t) If a doctorrsquos last offerwas rejected then its new offer is its best con-tract in XD(t) The contracts that doctors havenot offered at this round or any earlier one aretherefore those in RD(XD(t)) So the accumu-lated set of offers doctors have made are thosein X RD(XD(t)) XH(t) Once a fixed point ofthis process is found we have by Theorem 1 astable set of contracts XH(t) XD(t)

To illustrate the algorithm consider a simpleexample with two doctors and two hospitalswhere X D H and agents have the follow-ing preferences

(10) Pd1 h1 h2

Ph1 d1 d2 A

Pd2 h1 h2

Ph2 d1 d2 d1 d2 A

The algorithm is initialized with XD(0) X (d1 h1) (d1 h2) (d2 h1) (d2 h2) andXH(0) A Table 1 applies the operator givenin (9) to illustrate the algorithm

For t 1 starting from XD(1) X bothdoctors choose to work for the hospital h1 sothey reject their contracts with hospital h2 thusRD(XD(1)) (d1 h2) (d2 h2) Next XH(1) iscalculated as the complement of RD(XD(1)) soXH(1) (d1 h1) (d2 h1) From XH(1) thehospitals choose (d1 h1) and reject (d2 h1)completing the row for t 1

920 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

For t 2 we first compute XD(2) as thecomplement of RH(XH(1)) The doctors choose(d1 h1) (d2 h2) so they reject (d1 h2) Thehospitals must then choose from the comple-ment XH(2) X (d1 h2) The hospitalschoose (d1 h1) and (d2 h2) and reject (d2 h1) Inthe third round XD(3) XD(2) and the processhas reached a fixed point

The example illustrates the monotonicity ofthe algorithm XH(t) grows larger step by stepwhile XD(t) grows smaller At termination of thealgorithm the intersection of the choice sets isthe stable set of contracts XH(3) XD(3) (d1 h1) (d2 h2) Moreover when XD(t) andXH(t) are interpreted as suggested above theprocess XD(t) XH(t) described by (9) with theinitial conditions XD(0) X and XH(0) Acoincides with the doctor-offering Gale-Shapley algorithm

For the hospital-offering algorithm a similaranalysis applies but with a different interpreta-tion of the sets and a different initial conditionLet XD(t) be the cumulative set of contractsoffered by the hospitals to the doctors beforeiteration t and let XH(t) be the set of contractsthat have not yet been rejected by the hospitalsup to and including iteration t Then the con-tracts ldquoheldrdquo at the end of iteration t are pre-cisely those that have been offered but notrejected which are those in XD(t 13 1) XH(t)With this interpretation the analysis is identicalto the one above The Gale-Shapley hospitaloffering algorithm is characterized by (9) andthe initial conditions XD(0) A and XH(0) X

The same logic applies to the Kelso-Crawfordmodel provided one extends their original treat-ment to include a version in which the workersmake offers in addition to the treatment inwhich firms make offers The words of thepreceding paragraphs apply exactly but a con-tract offer now includes a wage so for exam-ple a hospital whose contract offer is rejected

by a doctor may find that its next most preferredcontract to the same doctor is at a higher wage

B When Contracts Are Not Substitutes

It is clear from the preceding analysis thatthat definition of substitutes is just sufficient toallow our mathematical tools to be applied Inthis section we establish more We show thatunless contracts are substitutes for every hospi-tal the very existence of a stable set of contractscannot be guaranteed7

THEOREM 5 Suppose H contains at least twohospitals which we denote by h and h Furthersuppose that Rh is not isotone that is contractsare not substitutes for h Then there exist pref-erence orderings for the doctors in set D apreference ordering for a hospital h with asingle job opening such that regardless of thepreferences of the other hospitals no stable setof contracts exists

Together Theorems 3 and 5 characterize theset of preferences that can be allowed as inputsinto a matching algorithm if we wish to guar-antee that the outcome of the algorithm is astable set of contracts with respect to the re-ported preferences According to Theorem 3we can allow all preferences that satisfy substi-tutes and still reach an outcome that is a stablecollection of contracts According to Theorem5 if we allow any preference that does notsatisfy the substitutes condition then there issome profile of singleton preferences for theother parties such that no stable collection ofcontracts exists

7 Kelso and Crawford (1982) provide a particular exam-ple in which preferences do not satisfy substitutes and theredoes not exist a stable allocation

TABLE 1mdashILLUSTRATION OF THE ALGORITHM

XD(t) RD(XD(t)) XH(t) RH(XH(t))t 0 X (d1 h2) (d2 h2) A At 1 X (d1 h2) (d2 h2) (d1 h1) (d2 h1) (d2 h1)t 2 (d1 h1) (d1 h2) (d2 h2) (d1 h2) (d1 h1) (d2 h1) (d2 h2) (d2 h1)t 3 (d1 h1) (d1 h2) (d2 h2) (d1 h2) (d1 h1) (d2 h1) (d2 h2) (d2 h1)

921VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

This theory also reaffirms and extends theclose connection between the substitutes condi-tion and other concepts that has been estab-lished in the recent auctions literature withquasi-linear preferences Milgrom (2000) stud-ies an auction model with discrete goods inwhich the set of possible bidder values is re-quired to include all the additive functions8 Heshows that if goods are substitutes then a com-petitive equilibrium exists If however thereare at least three bidders and if there is anyallowed value such that the goods are not allsubstitutes then there is some profile of valuessuch that no competitive equilibrium existsFaruk Gul and Ennio Stacchetti (1999) establishthe same positive existence result They alsoshow that if preferences include all values inwhich a bidder wants only one particular goodas well as any one for which goods are not allsubstitutes and if the number of bidders issufficiently large then there is some profile ofpreferences for which no competitive equilib-rium exists Ausubel and Milgrom (2002) estab-lish that if (a) there is some bidder for whompreferences are not demand theory substitutes(b) values may be any additive function and (c)there are at least three bidders in total thenthere is some profile of preferences such that theVickrey outcome is not stable and the coreimputations do not form a lattice Conversely ifall bidders have preferences that are demandtheory substitutes then the Vickrey outcome isin the core and the core imputations do form alattice Taken together these results establish aclose connection between the substitutes condi-tion the cooperative concept of the core thenoncooperative concepts of Vickrey outcomesand competitive equilibrium

C ldquoVacancy Chainrdquo Dynamics

Suppose that a labor market has reached equi-librium with all interested doctors placed

at hospitals in a stable match Then suppose onedoctor retires Imagine a process in which ahospital seeks to replace its retired doctor byraiding other hospitals to hire additional doc-tors If the hospital makes an offer that wouldsucceed in hiring a doctor away from anotherhospital the affected hospital has three optionsit may make an offer to another doctor (orseveral) improve the terms for its current doc-tor or leave the position vacant Suppose itmakes whatever contract offer would best serveits purposes

In models with a fixed number of positionsand no contracts this process in which doctorsand vacancies move from one hospital to an-other has been called vacancy chain dynamics(Blum et al 1997) Kelso and Crawford (1982)consider similar dynamics in the context of theirmodel

The formal results for our extended model aresimilar to those of the older theories Startingwith a stable collection of contracts X let XHbe the set of contracts that some doctor weaklyprefers to her current contract in X and letXD X (X XH) As in the proof ofTheorem 1 we have F(XD XH) (XD XH) andX XD XH

To study the dynamic adjustment that resultsfrom the retirement of doctor d we suppose theprocess starts from the initial state (XD(0)XH(0)) (XD XH) This means that the employ-ees start by considering only offers that are atleast as good as their current positions and thathospitals remember which employees have re-jected them in the past The doctorsrsquo rejectionfunction is changed by the retirement of doctord to RD where RD(X) RD(X) x XxD d that is in addition to the old rejec-tions all contract offers addressed to the retireddoctor are rejected

To synchronize the timing with our earliernotation let us imagine that hospitals makeoffers at round t 1 and doctors accept or rejectthem at round t Hospitals consider as poten-tially available the doctors in XH(t 1) X RD(XD(t 1)) and the doctors then reject all butthe best offers so the cumulative set of offersreceived is XD(t) X RH(XH(t 1)) Define

(11) FXD XH X RHXH X RDXD

8 A valuation function is additive if the value of any setof items is the sum of the separate values of the elementsSuch a function v is also described as ldquomodularrdquo Additivityis equivalent to the requirement that for all sets A and Bv(A B) 13 v(A B) v(A) 13 v(B)

922 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

If contracts are substitutes for the hospitalsthen F is isotone and since F(XD XH) (XDXH) it follows that F(XD XH) (XD XH)Then since (XD(0) XH(0)) (XD XH) we have(XD(1) XH(1)) F(XD(0) XH(0)) (XD(0)XH(0)) Iterating (XD(n) XH(n)) F(XD(n 1) XH(n 1)) (XD(n 1) XH(n 1)) thedoctors accumulate offers and the contracts thatare potentially available to the hospitals shrinkA fixed point is reached and by Theorem 1 itcorresponds to a stable collection of contracts

THEOREM 6 Suppose that contracts are sub-stitutes and that (XD XH) is a stable set ofcontracts Suppose that a doctor retires and thatthe ensuing adjustment process is described by(XD(0) XH(0)) (XD XH) and (XD(t) XH(t)) F(XD(t 1) XH(t 1)) Then the sequence(XD(t) XH(t)) converges to a stable collectionof contracts at which all the unretired doctorsare weakly better off and all the hospitals areweakly worse off than at the initial state (XDXH)9

The sequence of contract offers and jobmoves described by iterated applications of Fincludes possibly complex adjustments Hospi-tals that lose a doctor may seek several replace-ments Hospitals whose doctors receive contractoffers may retain those doctors by offering bet-ter terms or may hire a different doctor and laterrehire the original doctor at a new contract Allalong the way the doctors find themselveschoosing from more and better options and thehospitals find themselves marching down theirpreference lists by offering costlier terms pay-ing higher wages or making offers to otherdoctors whom they had earlier rejected

III Law of Aggregate Demand

We now introduce a second restriction onpreferences that allows us to prove the next tworesults about the structure of the set of stablematches We call this restriction the law ofaggregate demand Roughly this law states that

as the price falls agents should demand more ofa good Here price falls correspond to morecontracts being available and more demandcorresponds to taking on (weakly) more con-tracts We formalize this intuition with the fol-lowing definition

DEFINITION The preferences of hospital h H satisfy the law of aggregate demand if for allX X Ch(X) Ch(X)

According to this definition if the set ofpossible contracts expands (analogous to a de-crease in some doctorsrsquo wages) then the totalnumber of contracts chosen by hospital h eitherrises or stays the same The corresponding prop-erty for doctor preferences is implied by re-vealed preference because each doctor choosesat most one contract Just as for the substitutescondition when wages are endogenous we in-terpret the definition as applying to the domainof wage vectors for which the hospitalrsquos opti-mum is unique

The next theorem shows the important rela-tionship between profit maximization substi-tutes and the law of aggregate demand

THEOREM 7 If hospital hrsquos preferences arequasi-linear and satisfy the substitutes condi-tion then they satisfy the law of aggregatedemand

Below we use the law of aggregate demandto characterize both necessary and sufficientconditions for the rural hospitalsrsquo property andensure that truthful revelation is a dominantstrategy for the doctors Previously in matchingmodels without money the dominant strategyresult was known only for responsive prefer-ences with capacity constraints (Abdulkadiro-glu 2003) We subsume that result with ourtheorem

A Rural Hospitals Theorem

In the match between doctors and hospitalscertain rural hospitals often had trouble fillingall their positions raising the question ofwhether there are other core matches at whichthe rural hospitals might do better Roth (1986)analyzed this question for the case of X D

9 The theorem does not claim and it is not generally truethat this new point must be the new doctor-best stable set ofcontracts

923VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

H and responsive preferences and found thatthe answer is no every hospital that has unfilledpositions at some stable match is assigned ex-actly the same doctors at every stable match Inparticular every hospital hires the same numberof doctors at every stable match

In this section we show by an example thatthis last conclusion does not generalize to thefull set of environments in which contracts aresubstitutes10 We then prove that if preferencessatisfy the law of aggregate demand and substi-tutes then the last conclusion of Rothrsquos theoremholds every hospital signs exactly the samenumber of contracts at every point in the corealthough the doctors assigned and the terms ofemployment can vary Finally we show thatany violation of the law of aggregate demandimplies that preferences exist such that theabove conclusion does not hold

Suppose that H h1 h2 and D d1 d2d3 For hospital h1 suppose its choices maxi-mize where d3 d1 d2 d1 d2 A d1 d3 d2 d3 This prefer-ence satisfies substitutes11 Suppose h2 has oneposition with its preferences given by d1 d2 d3 A Finally suppose d1 and d2prefer h1 to h2 while d3 has the reverse prefer-ence Then the matches X (h1 d3) (h2 d1)and X (h1 d1) (h1 d2) (h2 d3) are bothstable but hospital h1 employs a different num-ber of doctors and the set of doctors assigneddiffers between the two matches

This example involves a failure of the law ofaggregate demand because as the set of con-tracts available to h1 expands by the addition of(h1 d3) to the set (h1 d1) (h1 d2) the numberof doctors demanded declines from two to oneWhen the law of aggregate demand holds how-ever we have the following result

THEOREM 8 If hospital preferences satisfysubstitutes and the law of aggregate demandthen for every stable allocation (XD XH) andevery d D and h H Cd(XD) Cd(X D)

and Ch(XH) Ch(X H) That is every doctorand hospital signs the same number of contractsat every stable collection of contracts

The next theorem verifies that the counterex-amples developed above can always be gener-alized whenever any hospitalrsquos preferencesviolate the law of aggregate demand

THEOREM 9 If there exists a hospital h setsX X X such that Ch(X) Ch(X) andat least one other hospital then there existsingleton preferences for the other hospitalsand doctors such that the number of doctorsemployed by h is different for two stablematches

Theorem 9 establishes that the law of aggre-gate demand is not only a sufficient conditionfor the rural hospitals result of Theorem 8 butin a particular sense a necessary one as well

B Truthful Revelation as a DominantStrategy

The main result of this section concerns doc-torsrsquo incentives to report their preferences truth-fully For the doctor-offering algorithm ifhospital preferences satisfy the law of aggregatedemand and the substitutes condition then it isdominant strategy for doctors to reveal truth-fully their preferences over contracts12 We fur-ther show that both preference conditions playessential roles in the conclusion

We will show the positive incentive result forthe doctor-offering algorithm in two stepswhich highlight the different roles of the twopreference assumptions First we show that thesubstitutes condition by itself guarantees thatdoctors cannot benefit by exaggerating the rank-ing of an unattainable contract More preciselyif there exists a preferences list for a doctor dsuch that d obtains contract x by submitting thislist then d can also obtain x by submitting apreference list that includes only contract xSecond we will show that adding the law of

10 A similar example appears in Ruth Martınez et al(2000)

11 These preferences however do not display the ldquosingleimprovement propertyrdquo that Gul and Stacchetti (1999) in-troduce and show is characteristic of substitutes preferencesin models with quasi-linear utility

12 It is of course not a dominant strategy for hospitals totruthfully reveal nor would it be so even if we consideredthe hospital-offering algorithm For further discussion ofthis point see Roth and Sotomayor (1990)

924 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

aggregate demand guarantees that a doctor doesat least as well as reporting truthfully as byreporting any singleton Together these are thedominant strategy result

To understand why submitting unattainedcontracts cannot help a doctor d consider thefollowing Let x be the most-preferred contractthat d can obtain by submitting any preferencelist (holding all other submitted preferencesfixed) Note that all that d accomplishes whenreporting that certain contracts are preferred to xis to make it easier for some coalition to blockoutcomes involving x Thus if x is attainablewith any report it is attainable with the reportPd x that ranks x as the only acceptable con-tract This intuition is captured in the followingtheorem

THEOREM 10 Let hospitalsrsquo preferences sat-isfy the substitutes condition and let the match-ing algorithm produce the doctor-optimalmatch Fixing the preferences of hospitals andof doctors besides d let x be the outcome that dobtains by reporting preferences Pd z1 dz2 d

d zn d x Then the outcome that dobtains by reporting preferences Pd x is also x

Some other doctors may be strictly better offwhen d submits her shorter preference list thereare fewer collections of contracts that d nowobjects to so the core may become larger andthe doctor-optimal point of the enlarged coremakes all doctors weakly better off and maymake some strictly better off

Without the law of aggregate demand how-ever it may still be in a doctorrsquos interest toconceal her preferences for unattainable posi-tions To see this consider the case with twohospitals and three doctors where contracts aresimply elements of D H and let preferences be

(12) Pd1 h1 h2

Ph1 d3 d1 d2 d1 d2

Pd2 h2 h1

Ph2 d1 d2 d3

Pd3 h2 h1

With these preferences the only stable matchis (d1 h2) (d3 h1) which leaves d2 unem-ployed However if d2 were to reverse herranking of the two hospitals then (d1 h1) (d2h1) (d3 h2) would be chosen by the doctor-offering algorithm leaving d2 better off Essen-tially by offering a contract to h2 d2 haschanged the number of positions availableWhen the preferences of the hospitals satisfythe law of aggregate demand however mak-ing more offers to the hospitals (weakly) in-creases the number of contracts the hospitalsaccept

THEOREM 11 Let hospitalsrsquo preferences sat-isfy substitutes and the law of aggregate de-mand and let the matching algorithm producethe doctor-optimal match Then fixing the pref-erences of the other doctors and of all thehospitals let x be the contract that d obtains bysubmitting the set of preferences Pd z1 dz2 d

d zn d x Then the preferences Pd y1 y2 yn x yn131 yN

obtain a contract that is Pd-preferred or indif-ferent to x

According to this theorem when a doctorrsquostrue preferences are Pd the doctor can never dobetter according to these true preferences thanby reporting the preferences truthfully

In fact the law of aggregate demand is ldquoal-mostrdquo a necessary condition as well The excep-tions can arise because certain violations of thelaw of aggregate demand are unobservable fromthe choice data of the algorithm and these can-not affect incentives Thus consider an examplewhere terms t are included in the contract andwhere a hospital h has preferences (d1 ht1) (d1 h t1) (d2 h t2) (d1 h t1) (d2 h t2) Although these preferences violatethe law of aggregate demand the algorithm willnever ldquoseerdquo the violation as either (d1 h t1) d1

(d1 h t1) or (d1 h t1) d1(d1 h t1) Thus

whichever terms that d1 first offers will deter-mine a conditional set of preferences for thehospital that does satisfy the law of aggregatedemand (The hospital will never reject an offerof either (d1 h t1) or (d1 h t1))

The next theorem says that if some hospitalrsquospreferences violate the law of aggregate demandin a way that can even potentially be observed

925VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

from the hospitalrsquos choices then there existpreferences for the other agents such that it isnot a dominant strategy for doctors to reporttruthfully even when the other assumptions wehave used are satisfied

THEOREM 12 Let hospital h have prefer-ences such that Ch(X) Ch(X x) and letthere exist two contracts y z such that yD zD xD yD and y z Rh(X x) Rh(X)Then if another hospital h exists there existsingleton preferences for the hospitals besides hand preferences for the doctors such that it isnot a dominant strategy for all doctors to revealtheir preferences truthfully

Thus to the extent that the law of aggregatedemand for hospital preferences has observableconsequences for the progress of the doctor-offering algorithm it is an indispensable condi-tion to ensure the dominant strategy property fordoctors

IV Classes of Conforming Preferences

Although the class of substitutes valuations isquite limited13 it is broader than the set ofresponsive preferences in useful ways Thesubstitutes valuations accommodate all the af-firmative action and subspecialty constraints de-scribed above and allow a doctorrsquos marginalproduct to depend on which other doctors thehospital attracts

In this section we introduce a parameterizedclass of quasi-linear substitutes valuations forhospitals evaluating sets of new hires The val-uations are based on an endowed assignmentmodel according to which hospitals have a set

of jobs to fill and an existing endowment ofdoctors while doctorsrsquo productivities varyamong jobs A hospital values new doctors ac-cording to the their incremental value in theassignment problem

From a general job assignment perspectivethe key restrictions of endowed assignment val-uations are that each doctor can do one and onlyone job and that the hospitalrsquos output is the sumof outputs of its various jobs A hospital cannotuse one doctor for two jobs nor can it combinethe skills of two doctors in the same job Alsothere is no interaction in the productivity ofdoctors in different jobs Given this mathemat-ical structure if a doctor is lost it will always beoptimal for the hospital to retain all of its otherdoctors although it may choose to reassignsome of the retained doctors to fill vacatedpositions

Another way to describe the set of endowedassignment valuations VEA is to build it upfrom three properties as follows First a sin-gleton valuation is one of the form v(S) maxdSd for some nonnegative vector Sin-gleton valuations represent the possible valua-tions by a hospital with just one opening andVEA includes all singleton valuations Second ifa hospital is composed of two units j 1 2each of which has a valuation vj VEA then thehospitalrsquos maximum value from assigningworkers between its units denoted by (v1 v2)(S) maxRSv1(R) 13 v2(S R) is also inthe set We call this property closure underaggregation Third if a hospitalrsquos value is de-rived from a value in VEA by endowing thehospital with a set of doctors T then the hospi-talrsquos incremental value for extra doctorsv(ST) v(S T) v(T) is also in the set VEAWe call this property closure under endowmentFinally two valuations v1 and v2 are calledequivalent if they differ by an additive con-stant For example for any fixed set of doctorsT v( T) is equivalent to v( T)

THEOREM 13 Let VEA denote the smallestfamily of valuations of sets of doctors that in-cludes all the singleton valuations and is closedunder aggregation and endowment Then foreach v VEA there exists a set of jobs J a setof doctors T and a (D 13 T) J-matrix [ij]such that v is equivalent to the following

13 Hans Reijnierse et al (2002) (see also Yuan-ChuanLien and Jun Yan 2003) have characterized the valuationfunctions that satisfy the substitutes condition as followsLet v(S) be the hospitalrsquos value of doctor set S and letvS(T) v(S T) v(S) denote the incremental value of theset of doctors T Then doctors are substitutes if for every setS and three other doctors d1 d2 and d3 there is no uniquemaximum in vS(d1) 13 vS(d2 d3) vS(d2) 13 vS(d1 d3)vS(d3) 13 vS(d1 d2)

926 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

(13) vSJ T maxz

d S

djzdj subject to

d S

zdj 1 for j J

j J

zdj 1 for d S T0 for d S T

zdj 0 1 for all d j

Conversely for every such J T and v( J T) VEA

We dub this family of valuations the endowedassignment valuations because of the form ofoptimization (13) The family VEA is an exten-sion of the assignment valuations derived byLloyd Shapley (1962) used by Roth (19841985b) in models of matching with wages andexplicit job assignments and emphasized in astudy of package bidding by Lehmann et al(2001) The endowed assignment valuations arequite useful for applications They also fit nicelywith the theory reported in previous sections forthe following reason

THEOREM 14 Every endowed assignmentvaluation v( J T) VEA is a substitutesvaluation

To the best of our knowledge all of thesubstitutes valuations that have been used orproposed for practical applications are includedamong the endowed assignment valuations In-deed the question of whether all substitutesvaluations are endowed assignment valuationsis an open one Here we review some of themost popular valuations to show how they fitinto the class

The most commonly studied class of prefer-ences for matching problems like the Match forwhich employment terms are exogenouslyfixed are the responsive preferences Thesespecify that each hospital h has a fixed numberof openings nh a set of acceptable doctors Dh

A D and a strict ordering h of the acceptabledoctors When a doctor is unacceptable thatmeans that hiring the doctor is always worsethan leaving her position unfilled Given any setof available doctors the hospital hires its nh

most preferred acceptable doctors if that manyare available and otherwise hires all of theacceptable doctors

To map responsive preferences into the as-signment problem framework define a utilityfunction uh D3 to represent h and set theminimum acceptable utility to zero Formally(1) if d d Dh

A then d h dN uh(d) uh(d)and (2) d Dh

AN uh(d) 0 Using this utilitywe specify an assignment problem as followsJ 1 nh and dj uh(d) 13 1 and fix thewage at 1 Using a positive wage is a device toensure that the hospital strictly prefers not tohire a doctor it plans not to assign to any job Itis evident that with this valuation preferencethe hospital most prefers to hire the set of avail-able acceptable doctors with the highest rank-ing according to h

Among the extensions of responsive prefer-ences that have been most important in practiceare ones to accommodate quotas of variouskinds For example one use of quotas is tomanage subspecialties of internal medicine inwhich a certain number of positions are to befilled by doctors planning that subspecialty ifenough acceptable doctors are available Onecan reserve ms jobs for subspecialty s by pro-viding that there are ms jobs in which doctors inthat subspecialty have their productivity in-creased by a large constant M Then if msdoctors in subspecialty s are available at leastthat many will be demanded at the optimalsolution to (13) If that many qualified doctorsare not available the jobs will be filled by otherdoctors according to their productivities

Another use of quotas is for an affirmativeaction policy that absolutely reserves jobs formembers of certain target groups For each af-firmative action group G define a correspond-ing set of jobs JG and let J G JG Specifythat for any doctor d G and job j JG dj uh(d) and otherwise dj 0 One can alsointroduce an unrestricted category of jobs j thatany doctor can fill with productivity dj uh(d) This obviously ensures that a certainnumber of jobs are reserved for each targetgroup

A recent treatment of affirmative action byRoth (1991) extended by Abdulkadiroglu(2003) uses the class of responsive preferenceswith capacity constraints This class requires

927VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

that the set of doctors be partitioned into a finitenumber of affirmative action groups and that foreach group G the hospital has a capacity mG thatlimits the number of doctors who can be hiredfrom that group In addition at most nh doctorsin total can be hired

To represent such preferences using endowedassignment valuations let us specify that thereare mG jobs of type G and yenG mG jobs in totalThe hospital is endowed with nh yenG mGdoctors The endowed doctors have productivityij M in every job where M is a largenumber This ensures that at most nh new doc-tors will be hired at any optimum For thenonendowed doctors we calculate productivi-ties uh(d) in the same fashion as for the respon-sive preferences and set dj uh(d) for jobs j oftype G and dj 0 for all other jobs Thisensures that at most mG doctors will be hiredfrom group G By inspection this specificationrepresents Abdulkadiroglursquos affirmative actionpreferences

Unlike the specifications used for the currentNational Resident Matching Program algo-rithm the endowed assignment valuations per-mit overlapping affirmative action categoriesFor example suppose that a small hospital has atarget of hiring one female and one minoritydoctor In the endowed assignment structurethe hospital may assign a minority female doc-tor to fill either a minority slot or a female slotbut not both This is necessary to retain thesubstitutes demand structure for otherwisemaking a minority female doctor availablecould lead the hospital to hire a nonminoritymale doctor whom it would otherwise reject

Endowed assignment valuations thus providea flexible parameterized way for hospitals torepresent their preferences for matching with orwithout wages using a class of quasi-linear pref-erences that satisfies the substitutes conditionand the law of aggregate demand

V Cumulative Offer Processes and Auctions

The algorithms described by the system (9)with different starting points have the propertythat they can terminate only at a stable set ofcontracts Nevertheless unless preferences sat-isfy the substitutes condition the system is notguaranteed to converge at all even when a fixed

point exists In this section we offer a differentcharacterization of the Gale-Shapley doctor-offering algorithm that will prove especiallywell suited to situations in which contracts maynot be substitutes but in which there is just oneldquohospitalrdquo the auctioneer For now we allowthe possibility that there are several hospitals

The alternative representation is constructedby replacing the system of equations (9) by thefollowing system

(14) XD t X RH XH t 1

XH t XH t 1 CD XD t

We call the algorithm that begins with XD(0) X and XH(0) A and obeys (14) a cumulativeoffer process because the formalism capturesthe idea that hospitals accumulate offers fromdoctors in the set XH(t) and hold their bestchoices CH(XH(t)) from the accumulated setThere is no assumption of consistency imposedon the algorithm so it is possible that severalhospitals are ldquoholdingrdquo contract offers from thesame doctor The corresponding allocation is ofcourse infeasible since each doctor can ulti-mately accept just one contract

At each round t of the cumulative offer pro-cess all doctors make their best offers from theset of not-yet-rejected choices XD(t) but anydoctor d for whom a contract is being heldsimply repeats one of its earlier offers Thusnew offers are made only by doctors who havebeen rejected

To see why this is so let x CH(XH(t)) be acontract that is being held and consider thecorresponding doctor xD d By revealed pref-erence doctor d strictly prefers x to any contractthat she has not yet offered since those con-tracts were available to offer at the time that xwas offered Since drsquos most preferred contractin Xd(t) at the current time must be weaklypreferred to x it must be coincide with one ofdrsquos earlier offers

The second equation of system (14) is the onethat distinguishes the cumulative offer processfrom the system in (9) In the cumulative offerprocess without any assumptions about hospi-talsrsquo preferences XH(t) grows monotonicallyfrom round to round so the sequence of setsconverges In contrast the earlier process was

928 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

guaranteed to converge only when contracts aresubstitutes for the hospitals

When contracts are substitutes the two sys-tems of equations are equivalent

THEOREM 15 Suppose that contracts aresubstitutes for the hospitals and that XD(0) Xand XH(0) A Then the sequences of pairs(XD(t) XH(t)) generated by the two laws ofmotion (9) and (14) are identical

Even with the initial condition XD(0) X andXH(0) A the algorithms described by (9) and(14) may differ when contracts are not substi-tutes In that case by inspection of the system(14) the cumulative offer process still con-verges because XH(t) is bounded by the finiteset X and grows monotonically from round toround What is at issue is whether the hospitalrsquoschoice from its final search set in the cumulativeoffer process is a feasible and stable set ofcontracts

We will find below that when there is a singlehospital the outcome is indeed a feasible andstable set of contracts In that case the cumu-lative offer process coincides with the general-ized proxy auction of Ausubel and Milgrom(2002) Those authors analyze in detail the casewhen a bid consists of a price and a subset of theset of goods that the bidder wishes to buy Ateach round the seller ldquoholdsrdquo the collection ofbids that maximizes its total revenues subject tothe constraint that each good can be sold onlyonce The generalized proxy auction howeveris not limited to the sale of goods and in fact isidentical in scope to our present model ofmatching with contracts In particular the auc-tioneer may impose a variety of constraints onthe feasible collections of bids and may weighnonprice factors either exclusively or in com-bination with prices to decide which collectionof bids to hold Bidders for their part maymake bids that include factors besides price andmay not include price at all

To illustrate the role of general contracts inthis auction setting consider the auction designsuggested by Paul Brewer and Charles Plott(1996) in which bidders seek to buy access to arailroad track In that application a bid specifiesa trainrsquos direction of travel departure and ar-rival times and price offered It is assumed that

trains travel at a uniform speed along the trackIn this setting the contract terms must includethe direction and the two times and the seller isconstrained to hold only combinations of bidssuch that trains maintain safe distances fromone another at all times

A second example of the generalized proxyprocess is a procurement auction in which thebuyer scores suppliers on the basis of suchfactors as quality excess capacity credit ratingand historical reliability as well as price and inwhich the buyer prefers to set aside someamount of its purchase for minority contractorsor to maintain geographic diversity of supply toreduce the chance of supply disruptions In anasset sale the seller may weigh the probabilitythat the sale will be completed for example dueto financing contingencies or because a union orantitrust regulators must approve the sale

The cumulative offer process model withgeneral contracts accommodates all of thesepossibilities The auctioneer in the model cor-responds to a single ldquohospitalrdquomdashhereafter theauctioneermdashwith a choice function CH thatselects her most preferred collection of contractproposals We have the following result (whichis first stated using different notation than in theAusubel-Milgrom paper)

THEOREM 16 When the doctor-offering cu-mulative offer process with a single hospitalterminates at time t with outcome (XD(t) XH(t))the hospitalrsquos choice CH(XH(t)) is a stable col-lection of contracts

Cumulative offer processes connect the the-ory of matching with contracts to the emergingtheory of package auctions and auctions withcomplex constraints

VI Conclusion

We have introduced a general model ofmatching with bilateral contracts that encom-passes and extends two-sided matching modelswith and without money and certain auctionmodels The new formulation allows some con-tract terms to be exogenously fixed and others tobe endogenous in any combinations In thisvery general framework we characterize stable

929VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

collections of contracts in terms of the solutionto a certain system of equations

The key to the analysis is to extend twoconcepts of demand theory to models with orwithout prices The first concept to be extendedis the notion of substitutes Our definition ap-plies essentially the Roth-Sotomayor substitut-able preferences condition to a more generalclass of contracts contracts are substitutes ifwhenever the set of feasible bilateral contractsexpands the set of contracts that the firm rejectsalso expands We show that (a) our definitioncoincides with the usual demand theory condi-tion when both apply (b) when contracts aresubstitutes a stable collection of contracts ex-ists and (c) if any hospital or firm has prefer-ences that are not substitutes then there arepreferences with single openings for each otherfirm such that no stable allocation exists Wefurther show that when the substitute conditionapplies (a) both the doctor-offering and hospi-tal-offering Gale-Shapley algorithms can berepresented as iterated operations of the sameoperator (starting from different initial condi-tions) and (b) starting at a stable allocationfrom which a doctor retires a natural marketdynamic mimics the Gale-Shapley process tofind a new stable allocation

The second relevant demand theory conceptis the law of demand which we extend both toinclude heterogeneous inputs and to encompassmodels with or without prices The law of ag-gregate demand condition holds that when theset of feasible contracts expands the number ofcontracts that the firm chooses to sign weaklyincreases In terms of traditional demand theorythis means that for example when the wages ofsome of a heterogeneous group of workers fallsif the workers are substitutes then the totalnumber of workers employed rises We showthat (a) when inputs are substitutes the choicesof a profit-maximizing firmhospital satisfy thelaw of aggregate demand Moreover when thechoices of every hospitalfirm satisfy the law ofaggregate demand and the substitutes conditionthen (b) the set of workersdoctors employed isthe same at every stable allocation (c) the num-ber employed by each firmhospital is also thesame and (d) truthful reporting is a dominantstrategy for doctors in the doctor-offering algo-rithm Moreover we prove (e) that if the law of

aggregate demand fails in any potentially ob-servable way then the preceding dominantstrategy property does not hold

For these results to be useful for practicalmechanism design one needs to account forhow preferences especially hospital prefer-ences are to be reported to the mechanismThere needs to be a convenient way for hospi-tals to express a rich array of preferences andone needs to know whether the preferences be-ing reported actually satisfy the conditions ofthe various theorems Toward that end we in-troduce a parametric form that we call extendedassignment valuations which strictly general-izes several existing specifications and whichalways satisfies both the substitutes and law ofaggregate demand conditions

Finally we introduce an alternative treatmentof the doctor-offering algorithm the cumulativeoffer process We show that when contracts aresubstitutes the previously characterized doctor-offering algorithm coincides exactly with a cu-mulative offer process When contracts are notsubstitutes but there is just one hospital (theldquoauctioneerrdquo) the cumulative offer process co-incides with the Ausubel-Milgrom ascendingproxy auction This identity clarifies the con-nection between these algorithms and com-bined with the dominant strategy theoremreported above generalizes the Ausubel-Milgromdominant strategy theorem for the proxyauctions

Our new approach reveals deep similaritiesamong several of the most successful auctionand matching designs in current use and amongthe environmental conditions in which theoret-ically the mechanisms should perform at theirbest Understanding these similarities can helpus to understand the limitations of these mech-anisms paving the way for new designs

APPENDIX

PROOF OF THEOREM 1Let (XD XH) X2 be a solution to (3) Then

XD XH XD RD(XD) CD(XD) andsimilarly XH XD XH RH(XH) CH(XH)so XH XD CH(XH) CD(XD)

Next we show that X XH XD is a stableset of contracts Since X CH(XH) CD(XD)it follows by revealed preference that X

930 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

CH(X) CD(X) so condition (i) of the defi-nition of stability is satisfied

Consider any hospital h and set of contractsX CD(X X) naming hospital h Since X CD(XD) revealed preference of the doctorsimplies that X XD CD(XD) and hence thatX RD(XD) X XD RD(XD) CD(XD) RD(XD) A Thus X X RD(XD) XHby (3) So if X Ch(X) then by the revealedpreference of hospital h X h Ch(XH) Ch(X) Hence X Ch(X X) so condition(ii) is satisfied So the set of contracts X isunblocked

For the converse suppose that X is a stablecollection of contracts Then CD(X) X LetXH be the set of contracts that the doctorsweakly prefer to X and XD the set of contractsthat doctors weakly disprefer By constructionX XH X XD X is a partition of X

To obtain (3) observe first that if there issome h such that Ch(XH) Xh then X Ch(XH) violates stability condition (ii) SoCh(XH) Xh for all h that is CH(XH) X Itfollows that X RH(XH) X (XH X) X (X XD) XD and that X RD(XD) X (XD CD(XD)) X (XD X) XH

Hence (XD XH) satisfies (3) and XH XD X

PROOF OF THEOREM 2Let i j ( j wj) C(w) and wi wi Define

Z(w) ( j wj)wj wj Then Z(wi wi) Z(w) If contracts are substitutes then R(Z(wiwi)) R(Z(w)) By (6) since ( j wj) C(w)it follows that ( j wj) C(Z(w)) so ( j wj) R(Z(w)) Hence ( j wj) R(Z(wi wi)) So ( jwj) Z(wi wi) R(Z(wi wi)) C(Z(wiwi)) and thus (j wj) C(wi wi) by assumption(6) Thus C satisfies demand theory substitutes

Conversely suppose contracts are not substi-tutes Then there exists a set X an element (iwi) X and ( j wj) R(X) such that ( j wj) R(X) where X X (i wi) Using (6)wi Wi(X) Let w W(X) and wi Wi(X)Then wi wi and ( j wj) C(w) but ( j wj) C(wi wi) so C does not satisfy the demandtheory substitutes condition

PROOF OF THEOREM 5We may limit attention to the case with

exactly two hospitals by specifying that

the doctors find the other hospitals to beunacceptable

Suppose Rh is not isotone Then there existssome x y X and X X such that for all x X xH h and such that x Rh(X) Rh(X y) By construction since x y Ch(X y) contracts x and y specify different doctorssay d1 xD yD d2 Let x and y denote thecorresponding contracts for doctors d1 and d2 inwhich hospital h is substituted for h

We specify preferences as follows first forhospital h we take x h y h A and allother contracts are unacceptable Second doc-tors in xD(CH(X) CH(X y)) d1 d2prefer their elements of CH(X) CH(X y)to any other contract Third d1 has x d1

x and ranks all other contracts lower Fourthd2 has y d2

y and ranks all other con-tracts lower Finally the remaining doctors findall contracts from hospitals h and h to beunacceptable

Consider a feasible acceptable allocation Xsuch that y X Since h and d2 can have onlyone contract in X x y X Then hrsquos con-tracts in X form a subset of X so x is notincluded and d1 has a contract less preferredthan x Then the deviation by (d1 h) to xblocks X

Consider a feasible acceptable allocation Xsuch that y X Then either x y X or Xis blocked by a coalition including h d1 and d2using the contracts x and y However if x y X then a deviation by (d2 h) to contract yblocks X

Since all feasible allocations are blockedthere exists no stable set of contracts

PROOF OF THEOREM 7Suppose X D H W and let Z(w) ( j

wj)wj wj Then the law of aggregate de-mand is the statement that for any wage vectorsw w satisfying w w such that the choices setsare singletons C(Z(w)) C(Z(w)) The proofis by contradiction Suppose the law of aggre-gate demand does not hold Then there exists awage vector w and a doctor d such that for some(and hence all) 0 C(Z(wd 13 wd)) C(Z(wd wd)) Since hrsquos preferences arequasi-linear changing doctor drsquos wage can af-fect the hiring of other doctors only if it affectsthe hiring of doctor d It follows that there are

931VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

exactly two optimal choices for the hospital atwage vector w these are C(Z(wd wd)) atwhich doctor d is hired and C(Z(wd 13 wd))at which d is not hired but such that two otherdoctors are hired that is there exist doctors dd C(Z(wd 13 wd)) C(Z(wd wd))Let the corresponding payoff for the hospital(when faced with wage vector w) be

Consider the wage vector w (wd wd 2 wdd) For positive and suffi-ciently small the hospitalrsquos payoff at wage vec-tor w is 13 2 if it chooses C(Z(wd 13 wd))and it is 13 if it chooses C(Z(wd wd))and one of these choices must be optimal SoC(w) C(Z(wd 13 wd)) But then raisingthe wage of doctor d from wd 2 to wd whileholding the other wages at wd reduces the de-mand for doctor d from one to zero in violationof the demand theory substitutes condition

PROOF OF THEOREM 8By definition XD X D so by revealed pref-

erence Cd(X D) Cd(XD) Also X H XH soby the law of aggregate demand Ch(X H) Ch(XH) By Theorem 1 CD(XD) CH(XH)and CD(X D) CH(X H) so yendD Cd(XD) yenhH Ch(XH) and yendD Cd(XD) yenhH Ch(XH)Combining these leads to yendD Cd(X D) yendD Cd(XD) yenhH Ch(XH) yenhH Ch(XH) yendD Cd(XD) which begins and ends with the samesum Hence none of the inequalities can bestrict

PROOF OF THEOREM 9Since Ch(X) Ch(X) there exists some

set Y X Y X and contract x such thatCh(Y) Ch(Y x) Since x Ch(Y x)(as otherwise Ch(Y) Ch(Y x) for thepreferences to be rationalizable) there must ex-ist two contracts y z Rh(Y x) Rh(Y)such that y x z y Moreover since y z Ch(Y) yD zD

Denoting by h the second hospital whose exis-tence is hypothesized by the theorem we specifypreferences as follows Let all the doctors with con-tracts in Y have those contracts be their most favoredand let all other doctors find any contract with hunacceptable Let all doctors find any contract notinvolving hospital h or h to be unacceptable

In principle there are three casesIf xD yD then let PxD

y x and PzD z

Then there exist two stable matches Ch(Y x) and Ch(Y) with zD employed in the firstmatch but not in the second

The case xD zD is symmetricFinally if yD xD zD then let x y z

denote contracts with hospital h where the doc-tors (and any other terms) are the same as in xy z respectively Specify the remaining prefer-ences by PxD

x x PyD y y PzD

z z and Ph y x A z Thenthere exist two different stable matches x Ch(Y) and y Ch(Y x) with zD em-ployed in the first match but not in the second

PROOF OF THEOREM 10Let X denote the collection of contracts cho-

sen by the algorithm when doctor d submitspreference Pd If this collection which is stableunder the reported preferences is not stableunder Pd then there exists a blocking coalitionThis blocking coalition must contain d as noother doctorrsquos preferences have changed butthat is impossible since x is drsquos favorite con-tract according to the preferences Pd Since X isstable under Pd the doctor-optimal stable matchunder Pd (the existence of which is guaranteedby Theorem 2) must make every doctor(weakly) better off than at X In particulardoctor d must obtain x

PROOF OF THEOREM 11From Theorem 10 Pd x also obtains x

Hence by the rural hospitals theorem d is em-ployed at every point in the core when Pd x issubmitted So every allocation X at which d isunemployed is blocked by some coalition andset of contracts when d submits Pd Conse-quently if d submits the preferences Pd y1 y2 yn x then every allocation at whichd is unemployed is still blocked by the samecoalition and set of contracts Since the doctor-best stable allocation is one at which d gets aPd-acceptable contract that allocation is weaklyPd-preferred to x Finally the doctor-optimalmatch when Pd is submitted is still the doctor-optimal match when Pd is submitted as drsquospreferences over contracts less preferred than xcannot be used to block a match where shereceives a contract weakly preferred to x

932 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

PROOF OF THEOREM 12Consider contracts x y and z such that

xD xD yD yD zD zD and xH yH zH h Let the preferences of the three identified bePxD

x x PyD y y and PzD

z z andlet those of h be Ph y z x Forthe other contracts x Y Ch(X) let x be xDrsquosmost favored contract For the remaining doctorslet any contract with h or h be unacceptable

With the preceding preferences the only sta-ble allocation includes contracts x and y leav-ing doctor zD unemployed If however zDmisrepresents her preferences and reports PzD

z z then the doctor-optimal stable matchincludes z leaving doctor zD better off

PROOF OF THEOREM 13Setting J 1 and T A it is clear by

inspection that this family includes all singletonvaluations

The family is closed under endowment be-cause given any such valuation v( J T)endowing a set of doctors T simply creates thevaluation v( J T T))

To verify that the family is closed underaggregation consider any two valuations v( J T) and v( J T) Since J and T are justindex sets we may assume without loss ofgenerality that T T J J A DefineT T T and J J J Let

(15) ij ij if i D T j Jij if i D T j J0 otherwise

By inspection of the optimization problems v( J T) v( J T) v( J T)

For the converse consider the valuation v( J T) given by (13) We derive it construc-tively from the singleton valuations aggrega-tion and endowment as follows Let vj be thesingleton valuation associated with row j inmatrix [ij] for j 1 J Since VEA isclosed under aggregation v1 vJ v( J A) VEA Since VEA is also closed underendowment we may endow the doctors in T toobtain v( J T) VEA

PROOF OF THEOREM 14L Shapley (1962) (see also Lehmann et al

2001) had already proved that every assignment

valuation without endowments v( J A) is asubstitutes valuation Ausubel and Milgrom(2002) prove that a valuation v is a substitutesvaluation if and only if the corresponding indi-rect profit function ((p) v(S) yendS pd) issubmodular Let be the indirect profit func-tion corresponding to v( J A) Then theindirect profit function corresponding to v( J T) is (p1 pN) (p1 pN 0 0)Since is the profit function of the substitutesvaluation vh it is submodular and hence issubmodular as well

PROOF OF THEOREM 15Suppose that contracts are substitutes for the

hospitals We proceed by induction The initialcondition specifies that the sequences are iden-tical through time t 0 Denote the sequencecorresponding to the cumulative offer processby a superscript C and denote the alternativeprocess defined by (9) with no superscript As-sume the inductive hypothesis that the se-quences are the same up to round t 1 andsuppress the corresponding superscripts for thevalues at that round Then XD(t) X RH(XH(t 1)) XD

C(t) This also implies that

(16) X XH t 1 XD t

To complete the proof we must show thatXH

C(t) XH(t) or equivalently that XH(t 1) CD(XD(t)) X RD(XD(t))

For t 2 XHC(t 2) XH

C(t 1) by con-struction so by the inductive hypothesis XH(t 2) XH(t 1) Since contracts are substitutesRH is isotone so X RH(XH(t 1)) X RH(XH(t 2)) and hence XD(t) XD(t 1)For t 1 the inclusion XD(t) XD(t 1) isimplied by the initial condition XD(0) X

Recall that by revealed preference RD isisotone It follows that RD(XD(t)) RD(XD(t 1)) and hence using (9) that XH(t 1) X RD(XD(t 1)) X RD(XD(t)) XH(t) ThusXH(t 1) XH(t 1) (X RD(XD(t))) XH(t 1) RD(XD(t)) So XH(t 1) CD(XD(t)) XH(t 1) (XD(t) RD(XD(t))) (XH(t 1) RD(XD(t))) (XD(t) RD(XD(t))) (XH(t 1) XD(t)) RD(XD(t)) X RD(XD(t)) where the last stepequality follows from (16)

933VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

PROOF OF THEOREM 16By construction any contract not in XH(t) is

less preferred by some doctor d than everycorresponding contract in XH(t) (because doctord offers her most preferred contracts in se-quence) So any collection of contracts thatincludes some not in XH(t) must be strictly lesspreferred by one of the doctors Any profitablecoalitional deviation must use only contracts inXH(t)

By construction the one hospitalauctioneermust be part of any deviating coalition andCH(XH(t)) is its strictly most preferred collectionof contracts in XH(t) so there is no profitablecoalitional deviation using just contracts in XH(t)

REFERENCES

Abdulkadiroglu Atila ldquoCollege Admissionswith Affirmative Actionrdquo Unpublished Pa-per 2003

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoBoston Public School MatchingrdquoAmerican Economic Review 2005a (Papersand Proceedings) 95(2) pp 368ndash71

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoThe New York City High SchoolMatchrdquo American Economic Review 2005b(Papers and Proceedings) 95(2) pp 364ndash67

Abdulkadiroglu Atila and Sonmez TayfunldquoSchool Choice A Mechanism Design Ap-proachrdquo American Economic Review 200393(3) pp 729ndash47

Adachi Hiroyuki ldquoOn a Characterization of Sta-ble Matchingsrdquo Economics Letters 200068(1) pp 43ndash49

Alkan Ahmet and Gale David ldquoStable ScheduleMatching under Revealed Preferencerdquo Jour-nal of Economic Theory 2003 112(2) pp289ndash306

Ausubel Lawrence M Cramton Peter and Mil-grom Paul R ldquoThe Clock-Poxy Auction APractical Combinatorial Auction Designrdquo inPeter Cramton Yoav Shoham and RichardSteinberg eds Combinatorial auctionsCambridge MA MIT Press 2005 ch 5

Ausubel Lawrence M and Milgrom Paul RldquoAscending Auctions with Package Bid-dingrdquo Frontiers of Theoretical Economics2002 1(1) Article 1

Blum Yosef Roth Alvin E and Rothblum UrielG ldquoVacancy Chains and Equilibration in Se-nior-Level Labor Marketsrdquo Journal of Eco-nomic Theory 1997 76(2) pp 362ndash411

Brewer Paul J and Plott Charles R ldquoA BinaryConflict Ascending Price (Bicap) Mechanismfor the Decentralized Allocation of the Rightto Use Railroad Tracksrdquo International Jour-nal of Industrial Organization 1996 14(6)pp 857ndash86

Bulow Jeremy and Levin Jonathan ldquoMatchingand Price Competitionrdquo Stanford UniversityStanford Economics Working Paper No1818 2003

Cramton Peter Shoham Yoav and SteinbergRichard Combinatorial auctions Cam-bridge MA MIT Press (forthcoming)

Crawford Vincent P and Knoer Elsie M ldquoJobMatching with Heterogeneous Firms andWorkersrdquo Econometrica 1981 49(2) pp437ndash50

Demange Gabrielle and Gale David ldquoThe Strat-egy Structure of Two-Sided Matching Mar-ketsrdquo Econometrica 1985 53(4) pp 873ndash88

Dubins Lester and Freedman David ldquoMachia-velli and the Gale-Shapley Algorithmrdquo Na-val Research Logistics Quarterly 198188(7) pp 485ndash94

Echenique Federico and Oviedo Jorge ldquoCoreMany-to-One Matchings by Fixed-PointMethodsrdquo Journal of Economic Theory2004 115(2) pp 358ndash76

Fleiner Tamas ldquoA Fixed-Point Approach toStable Matchings and Some ApplicationsrdquoMathematics of Operations Research 200328(1) pp 103ndash26

Gale David and Shapley Lloyd ldquoCollege Ad-missions and the Stability of MarriagerdquoAmerican Mathematical Monthly 196269(1) pp 9ndash15

Gul Faruk and Stacchetti Ennio ldquoWalrasianEquilibrium with Gross Substitutesrdquo Journalof Economic Theory 1999 87(1) pp 95ndash124

Kelso Alexander and Crawford Vincent P ldquoJobMatching Coalition Formation and GrossSubstitutesrdquo Econometrica 1982 50(6) pp1483ndash504

Lehmann Benny Lehmann Daniel and NisanNoam ldquoCombinatorial Auctions with De-

934 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

creasing Marginal Utilityrdquo Games and Eco-nomic Behavior 2005 (forthcoming)

Lien Yuan-Chuan and Yan Jun ldquoOn the GrossSubstitutes Conditionrdquo Unpublished Paper2003 httpwwwstamfordeduyclienTerm_Paper_Lien_Yanpdf

Martınez Ruth Masso Jordi Neme Alejandroand Oviedo Jorge ldquoSingle Agents and the Setof Many-to-One Stable Matchingsrdquo Journalof Economic Theory 2000 91(1) pp 91ndash105

Milgrom Paul R Putting auction theory towork Cambridge Cambridge UniversityPress 2004

Milgrom Paul R ldquoPutting Auction Theory toWork The Simultaneous Ascending Auc-tionrdquo Journal of Political Economy 2000108(2) pp 245ndash72

Porter David Rassenti Stephen RoopnarineAnil and Smith Vernon ldquoCombinatorial Auc-tion Designrdquo Proceedings of the NationalAcademy of Sciences 2003 100(19) pp11153ndash57

Reijnierse Hans van Gellekom Anita and PottersJos A M ldquoVerifying Gross SubstitutabilityrdquoEconomic Theory 2002 20(4) pp 767ndash76

Roth Alvin E ldquoThe Economics of Matching Sta-bility and Incentivesrdquo Mathematics of Opera-tions Research 1982 7(4) pp 617ndash28

Roth Alvin E ldquoStability and Polarization ofInterests in Job Matchingrdquo Econometrica1984 52(1) pp 47ndash57

Roth Alvin E ldquoThe College Admissions Prob-lem Is Not Equivalent to the Marriage Prob-lemrdquo Journal of Economic Theory 1985a36(2) pp 277ndash88

Roth Alvin E ldquoConflict and Coincidence ofInterest in Job Matching Some New Resultsand Open Questionsrdquo Mathematics of Oper-ations Research 1985b 10(3) pp 379ndash89

Roth Alvin E ldquoOn the Allocation of Residentsto Rural Hospitals A General Property ofTwo-Sided Matching Marketsrdquo Economet-rica 1986 54(2) pp 425ndash27

Roth Alvin E ldquoA Natural Experiment in theOrganization of Entry-Level Labor MarketsRegional Markets for New Physicians andSurgeons in the United Kingdomrdquo AmericanEconomic Review 1991 81(3) pp 415ndash40

Roth Alvin E and Peranson Elliott ldquoThe Rede-sign of the Matching Market for AmericanPhysicians Some Engineering Aspects ofEconomic Designrdquo American Economic Re-view 1999 89(4) pp 748ndash80

Roth Alvin E and Sotomayor Marilda Two-sided matching A study in game-theoreticmodeling and analysis Cambridge Cam-bridge University Press 1990

Sen Amartya Collective choice and social wel-fare San Francisco Holden-Day Inc 1970

Shapley Lloyd ldquoComplements and Substitutesin the Optimal Assignment Problemrdquo NavalResearch Logistics Quarterly 1962 9(1) pp45ndash48

935VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

Page 2: Matching with Contracts - Stanford Universityweb.stanford.edu/~milgrom/publishedarticles/Matching with... · 2005. 10. 22. · Gale-Shapley matching algorithm. Hence, the Gale-Shapley

to fill its remaining openings This procedure isprecisely the hospital-offering version of theGale-Shapley matching algorithm Hence theGale-Shapley matching algorithm is a specialcase of the Kelso-Crawford procedure

The possibility of extending the NationalResident Matching Program (the ldquoMatchrdquo) topermit wage competition is an important con-sideration in assessing public policy toward theMatch particularly because work by JeremyBulow and Jonathan Levin (2003) lends sometheoretical support for the position that theMatch may compress and reduce doctorsrsquowages relative to a perfectly competitive stan-dard The practical possibility of such an exten-sion depends on many details includingimportantly the form in which doctors and hos-pitals would have to report their preferences foruse in the Match In its current incarnation theMatch can accommodate hospital preferencesthat encompass affirmative action constraintsand a subtle relationship between internal med-icine and its subspecialties so it will be impor-tant for any replacement algorithm to allowsimilar preferences to be expressed In SectionIV we introduce a parameterized family of val-uations that accomplishes that

A second important similarity is between theGale-Shapley doctor-offering algorithm and theAusubel-Milgrom proxy auction Explainingthis relationship requires restating the algorithmin a different form from the one used for thepreceding comparison We show that if the hos-pitals in the Match consider doctors to be sub-stitutes then the doctor-offering algorithm isequivalent to a certain cumulative offer processin which the hospitals at each round can choosefrom all the offers they have received at anyround current or past In a different environ-ment where there is but a single ldquohospitalrdquo orauctioneer with unrestricted preferences andgeneral contract terms this cumulative offerprocess coincides exactly with the Ausubel-Milgrom proxy auction

Despite the close connections among thesemechanisms previous analyses have treatedthem separately In particular analyses of auc-tions typically assume that biddersrsquo payoffs arequasi-linear No corresponding assumption ismade in analyzing the medical match or thecollege admissions problem indeed the very

possibility of monetary transfers is excludedfrom those formulations As discussed belowthe quasi-linearity assumption combines withthe substitutes assumption in a subtle and re-strictive way

This paper presents a new model that sub-sumes unifies and extends the models citedabove The basic unit of analysis in the newmodel is the contract To reproduce the Gale-Shapley college admissions problem we spec-ify that a contract is fully identified by thestudent and college other terms of the relation-ship depend only on the partiesrsquo identities Toreproduce the Kelso-Crawford model of firmsbidding for workers we specify that a contractis fully identified by the firm the worker andthe wage Finally to reproduce the Ausubel-Milgrom model of package bidding we specifythat a contract is identified by the bidder thepackage of items that the bidder will acquireand the price to be paid for that package Sev-eral additional variations can be encompassedby the model For example Roth (1984 1985b)allows that a contract might specify the partic-ular responsibilities that a worker will havewithin the firm

Our analysis of matching models emphasizestwo conditions that restrict the preferences ofthe firmshospitalscolleges a substitutes condi-tion and an law of aggregate demand conditionWe find that these two conditions are implied bythe assumptions of earlier analyses so our uni-fied treatment implies the central results ofthose theories as special cases

In the tradition of demand theory we definesubstitutes by a comparative statics conditionIn demand theory the exogenous parameterchange is a price decrease so the challenge is toextend the definition to models in which theremay be no price that is allowed to change Inour contracts model a price reduction corre-sponds formally to expanding the firmrsquos oppor-tunity set ie to making the set of feasiblecontracts larger Our substitutes condition as-serts that when the firm chooses from an ex-panded set of contracts the set of contracts itrejects also expands (weakly) As we will showthis abstract substitutes condition coincides ex-actly with the demand theory condition for stan-dard models with prices It also coincidesexactly with the ldquosubstitutable preferencesrdquo

914 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

condition for the college admissions problem(Roth and Marilda Sotomayor 1990)

The law of aggregate demand which is newin this paper is similarly defined by a compar-ative static It is the condition that when acollege or firm chooses from an expanded set itadmits at least as many students or hires at leastas many workers2

The term ldquolaw of aggregate demandrdquo is mo-tivated by the relation of this condition to thelaw of demand in producer theory According toproducer theory a profit-maximizing firm de-mands (weakly) more of any input as its pricefalls For the matching model with prices thelaw of aggregate demand requires that whenany input price falls the aggregate quantitydemanded which includes the quantities de-manded of that input and all of its substitutesrises (weakly) Notice that it is tricky even tostate such a law in producer theory with divis-ible inputs because there is no general aggre-gate quantity measure when divisible inputs arediverse In the present model with indivisibleworkers we measure the aggregate quantity ofworkers demanded or hired by the total numberof such workers

A key step in our analysis is to prove a newresult in demand theory if workers are substi-tutes then a profit-maximizing firmrsquos employ-ment choices satisfy the law of aggregatedemand Since firms are profit maximizers andregard workers as substitutes in the Kelso-Crawford model it follows that the law of ag-gregate demand holds for that model Thus oneimplication of the standard quasi-linearity as-sumption of auction theory is that the biddersrsquopreferences satisfy the law of aggregate de-mand We find that when preferences are re-sponsive as originally and still commonlyassumed in matching theory analyses they sat-isfy the law of aggregate demand3 We also

prove some new results for the class of auctionand matching models that satisfy this law

The paper is organized as follows Section Iintroduces the matching-with-contracts nota-tion treats an allocation as a set of contractsand characterizes the stable allocations in termsof the solution of a certain system of twoequations

Section II introduces the substitutes conditionand uses it to prove that the set of stable allo-cations is a nonempty lattice and that a certaingeneralization of the Gale-Shapley algorithmidentifies its maximum and minimum elementsThese two extreme points are characterized as adoctor-optimalhospital-pessimal point whichis a point that is the unanimously most preferredstable allocation for the doctors and the unani-mously least preferred stable allocation for thehospitals and a hospital-optimaldoctor-pessimalpoint with the reverse attributes

Section II also proves several related resultsFirst if there are at least two hospitals and ifsome hospital has preferences that do not satisfythe substitutes condition then even if all otherhospitals have just a single opening there existsa profile of preferences for the students andcolleges such that no stable allocation existsThis result is important for the construction ofmatching algorithms It means that any match-ing procedure that permits students and collegesto report preferences that do not satisfy thesubstitutes condition cannot be guaranteed al-ways to select a stable allocation with respect tothe reported preferences

Another result concerns vacancy chain dy-namics which traces the dynamic adjustment ofthe labor market when a worker retires or a newworker enters the market and the dynamics arerepresented by the operator we have describedThe analysis extends the results reported byYosef Blum et al (1997) and foreshadowed byKelso and Crawford (1982) We find that start-ing from a stable allocation the vacancy adjust-ment process converges to a new stableallocation

Section III contains the most novel results ofthe paper It introduces the law of aggregate

2 In their study of a model of ldquoschedule matchingrdquoAhmet Alkan and Gale (2003) independently introduced asimilar notion which they call ldquosize monotonicityrdquo

3 The original matching formulation of Gale and Shapley(1962) assumed that colleges simply have a rank orderlisting of students Roth (1985a) dubbed this ldquoresponsive-nessrdquo and sought to relax this condition Similarly in amodel of matching with wages Crawford and E M Knoer(1981) assumed that firm preferences over workers were

separable That restriction was relaxed by Kelso and Craw-ford (1982)

915VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

demand verifies that it holds for a profit-maximizing firm when inputs are substitutesand explores its consequences When both thesubstitutes and the law of aggregate demandconditions are satisfied then (a) the set of work-ers employed and the set of jobs filled is thesame at every stable collection of contracts and(b) it is a dominant strategy for doctors (orworkers or students) to report their preferencestruthfully in the doctor-offering version of theextended Gale-Shapley algorithm We alsodemonstrate the necessity of a weaker versionof the law of aggregate demand for theseconclusions

Our conclusion about this dominant strategyproperty substantially extends earlier findingsabout incentives in matching The first suchresults due to Lester Dubins and David Freed-man (1981) and Roth (1982) established thedominant strategy property for the marriageproblem which is a one-to-one matching prob-lem that is a special case of the college admis-sions problem Similarly Gabrielle Demangeand Gale (1985) establish the dominant strategyproperty for the worker-firm matching problemin which each firm has singleton preferencesThese results generalize to the case of respon-sive preferences that is to the case where eachhospital (or college or firm) behaves just thesame as a collection of smaller hospitals withone opening each For the college admissionsproblem Abdulkadiroglu (2003) has shown thatthe dominant strategy property also holds whencolleges have responsive preferences with ca-pacity constraints where the constraints limitthe number of workers of a particular type thatcan be hired All of these models with a domi-nant strategy property satisfy our substitutesand law of aggregate demand conditions so theearlier dominant strategy results are all sub-sumed by our new result

In Section IV we introduce a new parame-terized family of preferencesmdashthe endowed as-signment preferencesmdashand show that theysubsume certain previously identified classesand satisfy both the substitutes and law of ag-gregate demand conditions

Section V introduces cumulative offer pro-cesses as an alternative auctionmatching algo-rithm and shows that when contracts aresubstitutes it coincides with the doctor-offering

algorithm of the previous sections Since theAusubel-Milgrom proxy auction is also a cumu-lative offer process our dominant strategy con-clusion of Section III implies an extension ofthe Ausubel-Milgrom dominant strategy resultWhen contracts are not substitutes the cumula-tive offer process can converge to an infeasibleallocation We show that if there is a singlehospitalauctioneer however the cumulativeoffer process converges to a feasible stableallocation without restrictions on the hospitalrsquospreferences Section VI concludes All proofsare in the Appendix

I Stable Collections of Contracts

The matching model without transfers hasmany applications of which the best knownamong economists is the match of doctors tohospital residency programs in the UnitedStates For the remainder of the paper we de-scribe the match participants as ldquodoctorsrdquo andldquohospitalsrdquo These groups play the same respec-tive roles as students and colleges in the collegeadmissions problem and workers and firms inthe Kelso-Crawford labor market model

A Notation

The sets of doctors and hospitals are denotedby D and H respectively and the set of con-tracts is denoted by X We assume only thateach contract x X is bilateral so that it isassociated with one ldquodoctorrdquo xD D and oneldquohospitalrdquo xH H When all terms of employ-ment are fixed and exogenous the set of con-tracts is just the set of doctor-hospital pairs X D H For the Kelso-Crawford model a con-tract specifies a firm a worker and a wage X D H W

Each doctor d can sign only one contract Herpreferences over possible contracts includingthe null contract A are described by the totalorder d The null contract represents unem-ployment and contracts are acceptable or un-acceptable according to whether they are morepreferred than A When we write preferences asPd x d y d z we mean that Pd names thepreference order of d and that the listed con-tracts (in this case x y and z) are the onlyacceptable ones

916 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

Given a set of contracts X X offered in themarket doctor drsquos chosen set Cd(X) is eitherthe null set if no acceptable contracts are of-fered or the singleton set consisting of the mostpreferred contract We formalize this as follows

(1) Cd X

A if x XxD d x d A Amaxd

x XxD d otherwise

The choices of a hospital h are more compli-cated because it has preferences h over sets ofdoctors Its chosen set is a subset of the con-tracts that name it that is Ch(X) x XxH h In addition a hospital can sign onlyone contract with any given doctor

(2) h H X X x x ChXx

xf xD xD

Let CD(X) dD Cd(X) denote the set ofcontracts chosen by some doctor from set XThe remaining offers in X are in the rejectedset RD(X) X CD(X) Similarly the hos-pitalsrsquo chosen and rejected sets are denoted byCH(X) hH Ch(X) and RH(X) X CH(X)

B Stable Allocations Stable Sets ofContracts

In our model an allocation is a collection ofcontracts as that determines the payoffs to theparticipants We study allocations such thatthere is no alternative allocation that is strictlypreferred by some hospital and weakly pre-ferred by all of the doctors that it hires and suchthat no doctor strictly prefers to reject his con-tract It is a standard observation in matchingtheory that such an allocation is a core alloca-tion in the sense that no coalition of hospitalsand doctors can find another allocation feasiblefor them that all weakly prefer and somestrictly prefer This allocation is also a stableallocation in the sense that there is no coalitionthat can deviate profitably even if the deviatingcoalition assumes that outsiders will remainwilling to accept the same contracts

We formalize the notion of stable allocationsas follows

DEFINITION A set of contracts X X is astable allocation if

(i) CD(X) CH(X) X and(ii) there exists no hospital h and set of con-

tracts X Ch(X) such that

X Ch X X CD X X

If condition (i) fails then some doctor orhospital prefers to reject some contract thatdoctor or hospital then blocks the allocation Ifcondition (ii) fails then there is an alternativeset of contracts that a hospital strictly prefersand that its corresponding doctors weakly prefer

The first theorem states that a set of contractsis stable if any alternative contract would berejected by some doctor or some hospital fromits suitably defined opportunity set In the for-mulas below think of the doctorsrsquo opportunityset as XD and the hospitalsrsquo opportunity set asXH If X is the corresponding stable set then XDmust include in addition to X all contracts thatwould not be rejected by the hospitals and XHmust similarly include X and all contracts thatwould not be rejected by the doctors If X isstable then every alternative contract is rejectedby somebody so X XH XD This logic issummarized in the first theorem

THEOREM 1 If (XD XH) X2 is a solution tothe system of equations

(3) XD X RH XH

and

XH X RD XD

then XH XD is a stable set of contracts andXH XD CD(XD) CH(XH) Conversely forany stable collection of contracts X there ex-ists some pair (XD XH) satisfying (3) such thatX XH XD

Theorem 1 is formulated to apply to generalsets of contracts It is the basis of our analysis of

917VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

stable sets of contracts in the entire set of mod-els treated in this paper

II Substitutes

In this section we introduce our first restric-tion on hospital preferences which is the re-striction that contracts are substitutes We usethe restriction to prove the existence of a stableset of contracts and to study an algorithm thatidentifies those contracts

Our substitutes condition generalizes theRoth-Sotomayor substitutable preferences con-dition to preferences over contracts In wordsthe substitutable preferences condition statesthat if a contract is chosen by a hospital fromsome set of available contracts then that con-tract will still be chosen from any smaller setthat includes it Our substitutes condition issimilarly defined as follows

DEFINITION Elements of X are substitutesfor hospital h if for all subsets X X X wehave Rh(X) Rh(X)4

In the language of lattice theory which weuse below elements of X are substitutes forhospital h exactly when the function Rh isisotone

In demand theory substitutes is defined by acomparative static that uses prices It says thatlimiting attention to the domain of wage vectorsat which there is a unique optimum for thehospital the hospitalrsquos demand for any doctor dis nondecreasing in the wage of each otherdoctor d

Our next result verifies that for resource al-location problems involving prices our defini-tion of substitutes coincides with the standarddemand theory definition For simplicity wefocus on a single hospital and suppress its iden-tifier h from our notation Thus imagine that ahospital chooses doctorsrsquo contracts from a sub-set of X D W where D is a finite set of

doctors and W w w is a finite set ofpossible wages Assume that the set of wages Wis such that the hospitalsrsquo preferences are al-ways strict Suppose that w max W is aprohibitively high wage so that no hospital everhires a doctor at wage w

In demand theory it is standard to representthe hospitalrsquos market opportunities by a vectorw WD that specifies a wage wd at whicheach doctor can be hired We can extend thedomain of the choice function C to allow marketopportunities to be expressed by wage vectorsas follows

(4) w WDf Cw Cd wdd D

Formula (4) associates with any wage vector wthe set of contracts (d wd)d D and definesC(w) to be the choice from that set

With the choice function extended this waywe can now describe the traditional demandtheory substitutes condition The condition as-serts that increasing the wage of doctor d fromwd to wd (weakly) increases demand for anyother doctor d

DEFINITION C satisfies the demand-theorysubstitutes condition if (i) d d (ii) (dwd) C(w) and (iii) wd wd imply that (dwd) C(wd wd)

To compare the two conditions we need tobe able to assign a vector of wages to each setof contracts X It is possible that in X somedoctor is unavailable at any wage or is available atseveral different wages For a profit-maximizinghospital the doctorrsquos relevant wage is the low-est wage if any at which she is availableMoreover such a hospital does not distinguishbetween a doctor who is unavailable and onewho is available only at a prohibitively highwage Thus from the perspective of a profit-maximizing hospital having contracts X avail-able is equivalent to facing a wage vector W(X)specified as follows

(5) Wd X minss w or d s X

In view of the preceding discussion a profit-maximizing hospitalrsquos choices must obey thefollowing identity

4 This condition is identical in form to the ldquoconditionalphardquo used in the study of social choice for example byAmartya Sen (1970) but the meanings of the choice sets aredifferent In Senrsquos model the choice set is a collection ofmutually exclusive choices whereas in the matching prob-lems the set describes the choice itself

918 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

(6) CX CWX

THEOREM 2 Suppose that X D W is afinite set of doctor-wage pairs and that (6)holds Then C satisfies the demand theory sub-stitutes condition if and only if its contracts aresubstitutes

In particular this shows that the Kelso-Crawford ldquogross substitutesrdquo condition is sub-sumed by our substitutes condition

A A Generalized Gale-Shapley Algorithm

We now introduce a monotonic algorithmthat will be shown to coincide with the Gale-Shapley algorithm on its original domain Todescribe the monotonicity that is found in thealgorithm let us define an order on X X asfollows

(7) XD XH XD XH

N XD XD and XH XH

With this definition (X X ) is a finitelattice

The generalized Gale-Shapley algorithm isdefined as the iterated applications of a certainfunction F X X3 X X as defined below

(8) F1 X X RH X

F2 X X RD X

FXD XH F1 XH F2 F1 XH

As we have previously observed since the doc-torsrsquo choices are singletons a revealed prefer-ence argument establishes that the function RD X3 X is isotone If the contracts are substitutesfor the hospitals then the function RH X 3 Xis isotone as well When both are isotone thefunction F (X X ) 3 (X X ) isalso isotone that is it satisfies ((XD XH) (XD XH)) f (F(XD XH) F(XD XH))

Thus F X X 3 X X is an isotonefunction from a finite lattice into itself Usingfixed point theory for finite lattices the set offixed points is a nonempty lattice and iterated

applications of F starting from the minimumand maximum points of X X converge mono-tonically to a fixed point of F5 We summarizethe particular application here with the follow-ing theorem6

THEOREM 3 Suppose contracts are substi-tutes for the hospitals Then

(a) The set of fixed points of F on X X is anonempty finite lattice and in particularincludes a smallest element (X D X H) and alargest element (X D X H)

(b) Starting at (XD XH) (X A) the general-ized Gale-Shapley algorithm convergesmonotonically to the highest fixed point

X D X H

supX XFX X X X and

(c) Starting at (XD XH) (A X) the general-ized Gale-Shapley algorithm convergesmonotonically to the lowest fixed point

X D X H

infX XFX X X X

The facts that (X D X H) is the highest fixedpoint of F and that (X D X H) is the lowest in thespecified order mean that for any other fixedpoint (XD XH) X D XD X D and X H XH X H Because doctors are better off when theycan choose from a larger set of contracts it

5 This special case of Tarskirsquos fixed point theorem can besimply proved as follows Let Z be a finite lattice withmaximum point z Let z0 z z1 F(z0) zn F(zn1)Plainly z1 z0 and since F is isotone z2 F(z1) F(z0) z1 and similarly zn131 zn for all n So thedecreasing sequence zn converges in a finite number ofsteps to a point z with F( z) z Moreover for any fixedpoint z since z z z Fn( z) Fn(z) z for n large soz is the maximum fixed point A similar argument appliesfor the minimum fixed point

6 Hiroyuki Adachi (2000) and Federico Echenique andJorge Oviedo (2004) have also characterized the Gale-Shapley algorithm for the marriage problem and the collegeadmissions problem respectively as iterated applications ofa certain operator on a lattice See also Tamas Fleiner(2003)

919VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

follows that the doctors unanimously weaklyprefer CD(X D) to CD(XD) to CD(X D) and simi-larly that the hospitals unanimously preferCH(X H) to CH(XH) to CH(X H) Notice byTheorem 1 that CD(X D) CH(X H) X D X H and CD(X D) CH(X H) X D X H sowe have the following welfare conclusion

THEOREM 4 Suppose contracts are substi-tutes for the hospitals Then the stable set ofcontracts X D X H is the unanimously mostpreferred stable set for the doctors and theunanimously least preferred stable set for thehospitals Similarly the stable set X D X H isthe unanimously most preferred stable set forthe hospitals and the unanimously least pre-ferred stable set for the doctors

Theorems 3 and 4 duplicate and extend fa-miliar conclusions about stable matches in theGale-Shapley matching problem and a similarconclusion about equilibrium prices in theKelso-Crawford labor market model Thesenew theorems encompass both these older mod-els and additional ones with general contractterms

To see how the Gale-Shapley algorithm isencompassed consider the doctor-offering al-gorithm As in the original formulation we sup-pose that hospitals have a ranking of doctorsthat is independent of the other doctors they willhire so hospital h just chooses its nh mostpreferred doctors (from among those who areacceptable and have proposed to hospital h)

Let XH(t) be the cumulative set of contractsoffered by the doctors to the hospitals throughiteration t and let XD(t) be the set of contractsthat have not yet been rejected by the hospitalsthrough iteration t Then the contracts ldquoheldrdquo atthe end of the iteration are precisely those thathave been offered but not rejected which arethose in XD(t) XH(t) The process initiateswith no offers having been made or rejected soXD(0) X and XH(0) A

Iterated applications of the operator F de-scribed above define a monotonic process inwhich the set of doctors makes an ever-larger(accumulated) set of offers and the set of unre-jected offers grows smaller round by roundUsing the specification of F and starting fromthe extreme point (X A) we have

(9) XD t X RH XH t 1

XH t X RD XD t

After offers have been made in iteration t 1the hospitalrsquos cumulative set of offers is XH(t 1) Each hospital h holds onto the nh best offersit has received at any iteration provided thatmany acceptable offers have been made other-wise it holds all acceptable offers that havebeen made Thus the accumulated set of re-jected offers is RH(XH(t 1)) and the unre-jected offers are those in X RH(XH(t 1)) XD(t) At round t if a doctorrsquos contract is beingheld then the last offer the doctor made was itsbest contract in XD(t) If a doctorrsquos last offerwas rejected then its new offer is its best con-tract in XD(t) The contracts that doctors havenot offered at this round or any earlier one aretherefore those in RD(XD(t)) So the accumu-lated set of offers doctors have made are thosein X RD(XD(t)) XH(t) Once a fixed point ofthis process is found we have by Theorem 1 astable set of contracts XH(t) XD(t)

To illustrate the algorithm consider a simpleexample with two doctors and two hospitalswhere X D H and agents have the follow-ing preferences

(10) Pd1 h1 h2

Ph1 d1 d2 A

Pd2 h1 h2

Ph2 d1 d2 d1 d2 A

The algorithm is initialized with XD(0) X (d1 h1) (d1 h2) (d2 h1) (d2 h2) andXH(0) A Table 1 applies the operator givenin (9) to illustrate the algorithm

For t 1 starting from XD(1) X bothdoctors choose to work for the hospital h1 sothey reject their contracts with hospital h2 thusRD(XD(1)) (d1 h2) (d2 h2) Next XH(1) iscalculated as the complement of RD(XD(1)) soXH(1) (d1 h1) (d2 h1) From XH(1) thehospitals choose (d1 h1) and reject (d2 h1)completing the row for t 1

920 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

For t 2 we first compute XD(2) as thecomplement of RH(XH(1)) The doctors choose(d1 h1) (d2 h2) so they reject (d1 h2) Thehospitals must then choose from the comple-ment XH(2) X (d1 h2) The hospitalschoose (d1 h1) and (d2 h2) and reject (d2 h1) Inthe third round XD(3) XD(2) and the processhas reached a fixed point

The example illustrates the monotonicity ofthe algorithm XH(t) grows larger step by stepwhile XD(t) grows smaller At termination of thealgorithm the intersection of the choice sets isthe stable set of contracts XH(3) XD(3) (d1 h1) (d2 h2) Moreover when XD(t) andXH(t) are interpreted as suggested above theprocess XD(t) XH(t) described by (9) with theinitial conditions XD(0) X and XH(0) Acoincides with the doctor-offering Gale-Shapley algorithm

For the hospital-offering algorithm a similaranalysis applies but with a different interpreta-tion of the sets and a different initial conditionLet XD(t) be the cumulative set of contractsoffered by the hospitals to the doctors beforeiteration t and let XH(t) be the set of contractsthat have not yet been rejected by the hospitalsup to and including iteration t Then the con-tracts ldquoheldrdquo at the end of iteration t are pre-cisely those that have been offered but notrejected which are those in XD(t 13 1) XH(t)With this interpretation the analysis is identicalto the one above The Gale-Shapley hospitaloffering algorithm is characterized by (9) andthe initial conditions XD(0) A and XH(0) X

The same logic applies to the Kelso-Crawfordmodel provided one extends their original treat-ment to include a version in which the workersmake offers in addition to the treatment inwhich firms make offers The words of thepreceding paragraphs apply exactly but a con-tract offer now includes a wage so for exam-ple a hospital whose contract offer is rejected

by a doctor may find that its next most preferredcontract to the same doctor is at a higher wage

B When Contracts Are Not Substitutes

It is clear from the preceding analysis thatthat definition of substitutes is just sufficient toallow our mathematical tools to be applied Inthis section we establish more We show thatunless contracts are substitutes for every hospi-tal the very existence of a stable set of contractscannot be guaranteed7

THEOREM 5 Suppose H contains at least twohospitals which we denote by h and h Furthersuppose that Rh is not isotone that is contractsare not substitutes for h Then there exist pref-erence orderings for the doctors in set D apreference ordering for a hospital h with asingle job opening such that regardless of thepreferences of the other hospitals no stable setof contracts exists

Together Theorems 3 and 5 characterize theset of preferences that can be allowed as inputsinto a matching algorithm if we wish to guar-antee that the outcome of the algorithm is astable set of contracts with respect to the re-ported preferences According to Theorem 3we can allow all preferences that satisfy substi-tutes and still reach an outcome that is a stablecollection of contracts According to Theorem5 if we allow any preference that does notsatisfy the substitutes condition then there issome profile of singleton preferences for theother parties such that no stable collection ofcontracts exists

7 Kelso and Crawford (1982) provide a particular exam-ple in which preferences do not satisfy substitutes and theredoes not exist a stable allocation

TABLE 1mdashILLUSTRATION OF THE ALGORITHM

XD(t) RD(XD(t)) XH(t) RH(XH(t))t 0 X (d1 h2) (d2 h2) A At 1 X (d1 h2) (d2 h2) (d1 h1) (d2 h1) (d2 h1)t 2 (d1 h1) (d1 h2) (d2 h2) (d1 h2) (d1 h1) (d2 h1) (d2 h2) (d2 h1)t 3 (d1 h1) (d1 h2) (d2 h2) (d1 h2) (d1 h1) (d2 h1) (d2 h2) (d2 h1)

921VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

This theory also reaffirms and extends theclose connection between the substitutes condi-tion and other concepts that has been estab-lished in the recent auctions literature withquasi-linear preferences Milgrom (2000) stud-ies an auction model with discrete goods inwhich the set of possible bidder values is re-quired to include all the additive functions8 Heshows that if goods are substitutes then a com-petitive equilibrium exists If however thereare at least three bidders and if there is anyallowed value such that the goods are not allsubstitutes then there is some profile of valuessuch that no competitive equilibrium existsFaruk Gul and Ennio Stacchetti (1999) establishthe same positive existence result They alsoshow that if preferences include all values inwhich a bidder wants only one particular goodas well as any one for which goods are not allsubstitutes and if the number of bidders issufficiently large then there is some profile ofpreferences for which no competitive equilib-rium exists Ausubel and Milgrom (2002) estab-lish that if (a) there is some bidder for whompreferences are not demand theory substitutes(b) values may be any additive function and (c)there are at least three bidders in total thenthere is some profile of preferences such that theVickrey outcome is not stable and the coreimputations do not form a lattice Conversely ifall bidders have preferences that are demandtheory substitutes then the Vickrey outcome isin the core and the core imputations do form alattice Taken together these results establish aclose connection between the substitutes condi-tion the cooperative concept of the core thenoncooperative concepts of Vickrey outcomesand competitive equilibrium

C ldquoVacancy Chainrdquo Dynamics

Suppose that a labor market has reached equi-librium with all interested doctors placed

at hospitals in a stable match Then suppose onedoctor retires Imagine a process in which ahospital seeks to replace its retired doctor byraiding other hospitals to hire additional doc-tors If the hospital makes an offer that wouldsucceed in hiring a doctor away from anotherhospital the affected hospital has three optionsit may make an offer to another doctor (orseveral) improve the terms for its current doc-tor or leave the position vacant Suppose itmakes whatever contract offer would best serveits purposes

In models with a fixed number of positionsand no contracts this process in which doctorsand vacancies move from one hospital to an-other has been called vacancy chain dynamics(Blum et al 1997) Kelso and Crawford (1982)consider similar dynamics in the context of theirmodel

The formal results for our extended model aresimilar to those of the older theories Startingwith a stable collection of contracts X let XHbe the set of contracts that some doctor weaklyprefers to her current contract in X and letXD X (X XH) As in the proof ofTheorem 1 we have F(XD XH) (XD XH) andX XD XH

To study the dynamic adjustment that resultsfrom the retirement of doctor d we suppose theprocess starts from the initial state (XD(0)XH(0)) (XD XH) This means that the employ-ees start by considering only offers that are atleast as good as their current positions and thathospitals remember which employees have re-jected them in the past The doctorsrsquo rejectionfunction is changed by the retirement of doctord to RD where RD(X) RD(X) x XxD d that is in addition to the old rejec-tions all contract offers addressed to the retireddoctor are rejected

To synchronize the timing with our earliernotation let us imagine that hospitals makeoffers at round t 1 and doctors accept or rejectthem at round t Hospitals consider as poten-tially available the doctors in XH(t 1) X RD(XD(t 1)) and the doctors then reject all butthe best offers so the cumulative set of offersreceived is XD(t) X RH(XH(t 1)) Define

(11) FXD XH X RHXH X RDXD

8 A valuation function is additive if the value of any setof items is the sum of the separate values of the elementsSuch a function v is also described as ldquomodularrdquo Additivityis equivalent to the requirement that for all sets A and Bv(A B) 13 v(A B) v(A) 13 v(B)

922 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

If contracts are substitutes for the hospitalsthen F is isotone and since F(XD XH) (XDXH) it follows that F(XD XH) (XD XH)Then since (XD(0) XH(0)) (XD XH) we have(XD(1) XH(1)) F(XD(0) XH(0)) (XD(0)XH(0)) Iterating (XD(n) XH(n)) F(XD(n 1) XH(n 1)) (XD(n 1) XH(n 1)) thedoctors accumulate offers and the contracts thatare potentially available to the hospitals shrinkA fixed point is reached and by Theorem 1 itcorresponds to a stable collection of contracts

THEOREM 6 Suppose that contracts are sub-stitutes and that (XD XH) is a stable set ofcontracts Suppose that a doctor retires and thatthe ensuing adjustment process is described by(XD(0) XH(0)) (XD XH) and (XD(t) XH(t)) F(XD(t 1) XH(t 1)) Then the sequence(XD(t) XH(t)) converges to a stable collectionof contracts at which all the unretired doctorsare weakly better off and all the hospitals areweakly worse off than at the initial state (XDXH)9

The sequence of contract offers and jobmoves described by iterated applications of Fincludes possibly complex adjustments Hospi-tals that lose a doctor may seek several replace-ments Hospitals whose doctors receive contractoffers may retain those doctors by offering bet-ter terms or may hire a different doctor and laterrehire the original doctor at a new contract Allalong the way the doctors find themselveschoosing from more and better options and thehospitals find themselves marching down theirpreference lists by offering costlier terms pay-ing higher wages or making offers to otherdoctors whom they had earlier rejected

III Law of Aggregate Demand

We now introduce a second restriction onpreferences that allows us to prove the next tworesults about the structure of the set of stablematches We call this restriction the law ofaggregate demand Roughly this law states that

as the price falls agents should demand more ofa good Here price falls correspond to morecontracts being available and more demandcorresponds to taking on (weakly) more con-tracts We formalize this intuition with the fol-lowing definition

DEFINITION The preferences of hospital h H satisfy the law of aggregate demand if for allX X Ch(X) Ch(X)

According to this definition if the set ofpossible contracts expands (analogous to a de-crease in some doctorsrsquo wages) then the totalnumber of contracts chosen by hospital h eitherrises or stays the same The corresponding prop-erty for doctor preferences is implied by re-vealed preference because each doctor choosesat most one contract Just as for the substitutescondition when wages are endogenous we in-terpret the definition as applying to the domainof wage vectors for which the hospitalrsquos opti-mum is unique

The next theorem shows the important rela-tionship between profit maximization substi-tutes and the law of aggregate demand

THEOREM 7 If hospital hrsquos preferences arequasi-linear and satisfy the substitutes condi-tion then they satisfy the law of aggregatedemand

Below we use the law of aggregate demandto characterize both necessary and sufficientconditions for the rural hospitalsrsquo property andensure that truthful revelation is a dominantstrategy for the doctors Previously in matchingmodels without money the dominant strategyresult was known only for responsive prefer-ences with capacity constraints (Abdulkadiro-glu 2003) We subsume that result with ourtheorem

A Rural Hospitals Theorem

In the match between doctors and hospitalscertain rural hospitals often had trouble fillingall their positions raising the question ofwhether there are other core matches at whichthe rural hospitals might do better Roth (1986)analyzed this question for the case of X D

9 The theorem does not claim and it is not generally truethat this new point must be the new doctor-best stable set ofcontracts

923VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

H and responsive preferences and found thatthe answer is no every hospital that has unfilledpositions at some stable match is assigned ex-actly the same doctors at every stable match Inparticular every hospital hires the same numberof doctors at every stable match

In this section we show by an example thatthis last conclusion does not generalize to thefull set of environments in which contracts aresubstitutes10 We then prove that if preferencessatisfy the law of aggregate demand and substi-tutes then the last conclusion of Rothrsquos theoremholds every hospital signs exactly the samenumber of contracts at every point in the corealthough the doctors assigned and the terms ofemployment can vary Finally we show thatany violation of the law of aggregate demandimplies that preferences exist such that theabove conclusion does not hold

Suppose that H h1 h2 and D d1 d2d3 For hospital h1 suppose its choices maxi-mize where d3 d1 d2 d1 d2 A d1 d3 d2 d3 This prefer-ence satisfies substitutes11 Suppose h2 has oneposition with its preferences given by d1 d2 d3 A Finally suppose d1 and d2prefer h1 to h2 while d3 has the reverse prefer-ence Then the matches X (h1 d3) (h2 d1)and X (h1 d1) (h1 d2) (h2 d3) are bothstable but hospital h1 employs a different num-ber of doctors and the set of doctors assigneddiffers between the two matches

This example involves a failure of the law ofaggregate demand because as the set of con-tracts available to h1 expands by the addition of(h1 d3) to the set (h1 d1) (h1 d2) the numberof doctors demanded declines from two to oneWhen the law of aggregate demand holds how-ever we have the following result

THEOREM 8 If hospital preferences satisfysubstitutes and the law of aggregate demandthen for every stable allocation (XD XH) andevery d D and h H Cd(XD) Cd(X D)

and Ch(XH) Ch(X H) That is every doctorand hospital signs the same number of contractsat every stable collection of contracts

The next theorem verifies that the counterex-amples developed above can always be gener-alized whenever any hospitalrsquos preferencesviolate the law of aggregate demand

THEOREM 9 If there exists a hospital h setsX X X such that Ch(X) Ch(X) andat least one other hospital then there existsingleton preferences for the other hospitalsand doctors such that the number of doctorsemployed by h is different for two stablematches

Theorem 9 establishes that the law of aggre-gate demand is not only a sufficient conditionfor the rural hospitals result of Theorem 8 butin a particular sense a necessary one as well

B Truthful Revelation as a DominantStrategy

The main result of this section concerns doc-torsrsquo incentives to report their preferences truth-fully For the doctor-offering algorithm ifhospital preferences satisfy the law of aggregatedemand and the substitutes condition then it isdominant strategy for doctors to reveal truth-fully their preferences over contracts12 We fur-ther show that both preference conditions playessential roles in the conclusion

We will show the positive incentive result forthe doctor-offering algorithm in two stepswhich highlight the different roles of the twopreference assumptions First we show that thesubstitutes condition by itself guarantees thatdoctors cannot benefit by exaggerating the rank-ing of an unattainable contract More preciselyif there exists a preferences list for a doctor dsuch that d obtains contract x by submitting thislist then d can also obtain x by submitting apreference list that includes only contract xSecond we will show that adding the law of

10 A similar example appears in Ruth Martınez et al(2000)

11 These preferences however do not display the ldquosingleimprovement propertyrdquo that Gul and Stacchetti (1999) in-troduce and show is characteristic of substitutes preferencesin models with quasi-linear utility

12 It is of course not a dominant strategy for hospitals totruthfully reveal nor would it be so even if we consideredthe hospital-offering algorithm For further discussion ofthis point see Roth and Sotomayor (1990)

924 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

aggregate demand guarantees that a doctor doesat least as well as reporting truthfully as byreporting any singleton Together these are thedominant strategy result

To understand why submitting unattainedcontracts cannot help a doctor d consider thefollowing Let x be the most-preferred contractthat d can obtain by submitting any preferencelist (holding all other submitted preferencesfixed) Note that all that d accomplishes whenreporting that certain contracts are preferred to xis to make it easier for some coalition to blockoutcomes involving x Thus if x is attainablewith any report it is attainable with the reportPd x that ranks x as the only acceptable con-tract This intuition is captured in the followingtheorem

THEOREM 10 Let hospitalsrsquo preferences sat-isfy the substitutes condition and let the match-ing algorithm produce the doctor-optimalmatch Fixing the preferences of hospitals andof doctors besides d let x be the outcome that dobtains by reporting preferences Pd z1 dz2 d

d zn d x Then the outcome that dobtains by reporting preferences Pd x is also x

Some other doctors may be strictly better offwhen d submits her shorter preference list thereare fewer collections of contracts that d nowobjects to so the core may become larger andthe doctor-optimal point of the enlarged coremakes all doctors weakly better off and maymake some strictly better off

Without the law of aggregate demand how-ever it may still be in a doctorrsquos interest toconceal her preferences for unattainable posi-tions To see this consider the case with twohospitals and three doctors where contracts aresimply elements of D H and let preferences be

(12) Pd1 h1 h2

Ph1 d3 d1 d2 d1 d2

Pd2 h2 h1

Ph2 d1 d2 d3

Pd3 h2 h1

With these preferences the only stable matchis (d1 h2) (d3 h1) which leaves d2 unem-ployed However if d2 were to reverse herranking of the two hospitals then (d1 h1) (d2h1) (d3 h2) would be chosen by the doctor-offering algorithm leaving d2 better off Essen-tially by offering a contract to h2 d2 haschanged the number of positions availableWhen the preferences of the hospitals satisfythe law of aggregate demand however mak-ing more offers to the hospitals (weakly) in-creases the number of contracts the hospitalsaccept

THEOREM 11 Let hospitalsrsquo preferences sat-isfy substitutes and the law of aggregate de-mand and let the matching algorithm producethe doctor-optimal match Then fixing the pref-erences of the other doctors and of all thehospitals let x be the contract that d obtains bysubmitting the set of preferences Pd z1 dz2 d

d zn d x Then the preferences Pd y1 y2 yn x yn131 yN

obtain a contract that is Pd-preferred or indif-ferent to x

According to this theorem when a doctorrsquostrue preferences are Pd the doctor can never dobetter according to these true preferences thanby reporting the preferences truthfully

In fact the law of aggregate demand is ldquoal-mostrdquo a necessary condition as well The excep-tions can arise because certain violations of thelaw of aggregate demand are unobservable fromthe choice data of the algorithm and these can-not affect incentives Thus consider an examplewhere terms t are included in the contract andwhere a hospital h has preferences (d1 ht1) (d1 h t1) (d2 h t2) (d1 h t1) (d2 h t2) Although these preferences violatethe law of aggregate demand the algorithm willnever ldquoseerdquo the violation as either (d1 h t1) d1

(d1 h t1) or (d1 h t1) d1(d1 h t1) Thus

whichever terms that d1 first offers will deter-mine a conditional set of preferences for thehospital that does satisfy the law of aggregatedemand (The hospital will never reject an offerof either (d1 h t1) or (d1 h t1))

The next theorem says that if some hospitalrsquospreferences violate the law of aggregate demandin a way that can even potentially be observed

925VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

from the hospitalrsquos choices then there existpreferences for the other agents such that it isnot a dominant strategy for doctors to reporttruthfully even when the other assumptions wehave used are satisfied

THEOREM 12 Let hospital h have prefer-ences such that Ch(X) Ch(X x) and letthere exist two contracts y z such that yD zD xD yD and y z Rh(X x) Rh(X)Then if another hospital h exists there existsingleton preferences for the hospitals besides hand preferences for the doctors such that it isnot a dominant strategy for all doctors to revealtheir preferences truthfully

Thus to the extent that the law of aggregatedemand for hospital preferences has observableconsequences for the progress of the doctor-offering algorithm it is an indispensable condi-tion to ensure the dominant strategy property fordoctors

IV Classes of Conforming Preferences

Although the class of substitutes valuations isquite limited13 it is broader than the set ofresponsive preferences in useful ways Thesubstitutes valuations accommodate all the af-firmative action and subspecialty constraints de-scribed above and allow a doctorrsquos marginalproduct to depend on which other doctors thehospital attracts

In this section we introduce a parameterizedclass of quasi-linear substitutes valuations forhospitals evaluating sets of new hires The val-uations are based on an endowed assignmentmodel according to which hospitals have a set

of jobs to fill and an existing endowment ofdoctors while doctorsrsquo productivities varyamong jobs A hospital values new doctors ac-cording to the their incremental value in theassignment problem

From a general job assignment perspectivethe key restrictions of endowed assignment val-uations are that each doctor can do one and onlyone job and that the hospitalrsquos output is the sumof outputs of its various jobs A hospital cannotuse one doctor for two jobs nor can it combinethe skills of two doctors in the same job Alsothere is no interaction in the productivity ofdoctors in different jobs Given this mathemat-ical structure if a doctor is lost it will always beoptimal for the hospital to retain all of its otherdoctors although it may choose to reassignsome of the retained doctors to fill vacatedpositions

Another way to describe the set of endowedassignment valuations VEA is to build it upfrom three properties as follows First a sin-gleton valuation is one of the form v(S) maxdSd for some nonnegative vector Sin-gleton valuations represent the possible valua-tions by a hospital with just one opening andVEA includes all singleton valuations Second ifa hospital is composed of two units j 1 2each of which has a valuation vj VEA then thehospitalrsquos maximum value from assigningworkers between its units denoted by (v1 v2)(S) maxRSv1(R) 13 v2(S R) is also inthe set We call this property closure underaggregation Third if a hospitalrsquos value is de-rived from a value in VEA by endowing thehospital with a set of doctors T then the hospi-talrsquos incremental value for extra doctorsv(ST) v(S T) v(T) is also in the set VEAWe call this property closure under endowmentFinally two valuations v1 and v2 are calledequivalent if they differ by an additive con-stant For example for any fixed set of doctorsT v( T) is equivalent to v( T)

THEOREM 13 Let VEA denote the smallestfamily of valuations of sets of doctors that in-cludes all the singleton valuations and is closedunder aggregation and endowment Then foreach v VEA there exists a set of jobs J a setof doctors T and a (D 13 T) J-matrix [ij]such that v is equivalent to the following

13 Hans Reijnierse et al (2002) (see also Yuan-ChuanLien and Jun Yan 2003) have characterized the valuationfunctions that satisfy the substitutes condition as followsLet v(S) be the hospitalrsquos value of doctor set S and letvS(T) v(S T) v(S) denote the incremental value of theset of doctors T Then doctors are substitutes if for every setS and three other doctors d1 d2 and d3 there is no uniquemaximum in vS(d1) 13 vS(d2 d3) vS(d2) 13 vS(d1 d3)vS(d3) 13 vS(d1 d2)

926 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

(13) vSJ T maxz

d S

djzdj subject to

d S

zdj 1 for j J

j J

zdj 1 for d S T0 for d S T

zdj 0 1 for all d j

Conversely for every such J T and v( J T) VEA

We dub this family of valuations the endowedassignment valuations because of the form ofoptimization (13) The family VEA is an exten-sion of the assignment valuations derived byLloyd Shapley (1962) used by Roth (19841985b) in models of matching with wages andexplicit job assignments and emphasized in astudy of package bidding by Lehmann et al(2001) The endowed assignment valuations arequite useful for applications They also fit nicelywith the theory reported in previous sections forthe following reason

THEOREM 14 Every endowed assignmentvaluation v( J T) VEA is a substitutesvaluation

To the best of our knowledge all of thesubstitutes valuations that have been used orproposed for practical applications are includedamong the endowed assignment valuations In-deed the question of whether all substitutesvaluations are endowed assignment valuationsis an open one Here we review some of themost popular valuations to show how they fitinto the class

The most commonly studied class of prefer-ences for matching problems like the Match forwhich employment terms are exogenouslyfixed are the responsive preferences Thesespecify that each hospital h has a fixed numberof openings nh a set of acceptable doctors Dh

A D and a strict ordering h of the acceptabledoctors When a doctor is unacceptable thatmeans that hiring the doctor is always worsethan leaving her position unfilled Given any setof available doctors the hospital hires its nh

most preferred acceptable doctors if that manyare available and otherwise hires all of theacceptable doctors

To map responsive preferences into the as-signment problem framework define a utilityfunction uh D3 to represent h and set theminimum acceptable utility to zero Formally(1) if d d Dh

A then d h dN uh(d) uh(d)and (2) d Dh

AN uh(d) 0 Using this utilitywe specify an assignment problem as followsJ 1 nh and dj uh(d) 13 1 and fix thewage at 1 Using a positive wage is a device toensure that the hospital strictly prefers not tohire a doctor it plans not to assign to any job Itis evident that with this valuation preferencethe hospital most prefers to hire the set of avail-able acceptable doctors with the highest rank-ing according to h

Among the extensions of responsive prefer-ences that have been most important in practiceare ones to accommodate quotas of variouskinds For example one use of quotas is tomanage subspecialties of internal medicine inwhich a certain number of positions are to befilled by doctors planning that subspecialty ifenough acceptable doctors are available Onecan reserve ms jobs for subspecialty s by pro-viding that there are ms jobs in which doctors inthat subspecialty have their productivity in-creased by a large constant M Then if msdoctors in subspecialty s are available at leastthat many will be demanded at the optimalsolution to (13) If that many qualified doctorsare not available the jobs will be filled by otherdoctors according to their productivities

Another use of quotas is for an affirmativeaction policy that absolutely reserves jobs formembers of certain target groups For each af-firmative action group G define a correspond-ing set of jobs JG and let J G JG Specifythat for any doctor d G and job j JG dj uh(d) and otherwise dj 0 One can alsointroduce an unrestricted category of jobs j thatany doctor can fill with productivity dj uh(d) This obviously ensures that a certainnumber of jobs are reserved for each targetgroup

A recent treatment of affirmative action byRoth (1991) extended by Abdulkadiroglu(2003) uses the class of responsive preferenceswith capacity constraints This class requires

927VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

that the set of doctors be partitioned into a finitenumber of affirmative action groups and that foreach group G the hospital has a capacity mG thatlimits the number of doctors who can be hiredfrom that group In addition at most nh doctorsin total can be hired

To represent such preferences using endowedassignment valuations let us specify that thereare mG jobs of type G and yenG mG jobs in totalThe hospital is endowed with nh yenG mGdoctors The endowed doctors have productivityij M in every job where M is a largenumber This ensures that at most nh new doc-tors will be hired at any optimum For thenonendowed doctors we calculate productivi-ties uh(d) in the same fashion as for the respon-sive preferences and set dj uh(d) for jobs j oftype G and dj 0 for all other jobs Thisensures that at most mG doctors will be hiredfrom group G By inspection this specificationrepresents Abdulkadiroglursquos affirmative actionpreferences

Unlike the specifications used for the currentNational Resident Matching Program algo-rithm the endowed assignment valuations per-mit overlapping affirmative action categoriesFor example suppose that a small hospital has atarget of hiring one female and one minoritydoctor In the endowed assignment structurethe hospital may assign a minority female doc-tor to fill either a minority slot or a female slotbut not both This is necessary to retain thesubstitutes demand structure for otherwisemaking a minority female doctor availablecould lead the hospital to hire a nonminoritymale doctor whom it would otherwise reject

Endowed assignment valuations thus providea flexible parameterized way for hospitals torepresent their preferences for matching with orwithout wages using a class of quasi-linear pref-erences that satisfies the substitutes conditionand the law of aggregate demand

V Cumulative Offer Processes and Auctions

The algorithms described by the system (9)with different starting points have the propertythat they can terminate only at a stable set ofcontracts Nevertheless unless preferences sat-isfy the substitutes condition the system is notguaranteed to converge at all even when a fixed

point exists In this section we offer a differentcharacterization of the Gale-Shapley doctor-offering algorithm that will prove especiallywell suited to situations in which contracts maynot be substitutes but in which there is just oneldquohospitalrdquo the auctioneer For now we allowthe possibility that there are several hospitals

The alternative representation is constructedby replacing the system of equations (9) by thefollowing system

(14) XD t X RH XH t 1

XH t XH t 1 CD XD t

We call the algorithm that begins with XD(0) X and XH(0) A and obeys (14) a cumulativeoffer process because the formalism capturesthe idea that hospitals accumulate offers fromdoctors in the set XH(t) and hold their bestchoices CH(XH(t)) from the accumulated setThere is no assumption of consistency imposedon the algorithm so it is possible that severalhospitals are ldquoholdingrdquo contract offers from thesame doctor The corresponding allocation is ofcourse infeasible since each doctor can ulti-mately accept just one contract

At each round t of the cumulative offer pro-cess all doctors make their best offers from theset of not-yet-rejected choices XD(t) but anydoctor d for whom a contract is being heldsimply repeats one of its earlier offers Thusnew offers are made only by doctors who havebeen rejected

To see why this is so let x CH(XH(t)) be acontract that is being held and consider thecorresponding doctor xD d By revealed pref-erence doctor d strictly prefers x to any contractthat she has not yet offered since those con-tracts were available to offer at the time that xwas offered Since drsquos most preferred contractin Xd(t) at the current time must be weaklypreferred to x it must be coincide with one ofdrsquos earlier offers

The second equation of system (14) is the onethat distinguishes the cumulative offer processfrom the system in (9) In the cumulative offerprocess without any assumptions about hospi-talsrsquo preferences XH(t) grows monotonicallyfrom round to round so the sequence of setsconverges In contrast the earlier process was

928 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

guaranteed to converge only when contracts aresubstitutes for the hospitals

When contracts are substitutes the two sys-tems of equations are equivalent

THEOREM 15 Suppose that contracts aresubstitutes for the hospitals and that XD(0) Xand XH(0) A Then the sequences of pairs(XD(t) XH(t)) generated by the two laws ofmotion (9) and (14) are identical

Even with the initial condition XD(0) X andXH(0) A the algorithms described by (9) and(14) may differ when contracts are not substi-tutes In that case by inspection of the system(14) the cumulative offer process still con-verges because XH(t) is bounded by the finiteset X and grows monotonically from round toround What is at issue is whether the hospitalrsquoschoice from its final search set in the cumulativeoffer process is a feasible and stable set ofcontracts

We will find below that when there is a singlehospital the outcome is indeed a feasible andstable set of contracts In that case the cumu-lative offer process coincides with the general-ized proxy auction of Ausubel and Milgrom(2002) Those authors analyze in detail the casewhen a bid consists of a price and a subset of theset of goods that the bidder wishes to buy Ateach round the seller ldquoholdsrdquo the collection ofbids that maximizes its total revenues subject tothe constraint that each good can be sold onlyonce The generalized proxy auction howeveris not limited to the sale of goods and in fact isidentical in scope to our present model ofmatching with contracts In particular the auc-tioneer may impose a variety of constraints onthe feasible collections of bids and may weighnonprice factors either exclusively or in com-bination with prices to decide which collectionof bids to hold Bidders for their part maymake bids that include factors besides price andmay not include price at all

To illustrate the role of general contracts inthis auction setting consider the auction designsuggested by Paul Brewer and Charles Plott(1996) in which bidders seek to buy access to arailroad track In that application a bid specifiesa trainrsquos direction of travel departure and ar-rival times and price offered It is assumed that

trains travel at a uniform speed along the trackIn this setting the contract terms must includethe direction and the two times and the seller isconstrained to hold only combinations of bidssuch that trains maintain safe distances fromone another at all times

A second example of the generalized proxyprocess is a procurement auction in which thebuyer scores suppliers on the basis of suchfactors as quality excess capacity credit ratingand historical reliability as well as price and inwhich the buyer prefers to set aside someamount of its purchase for minority contractorsor to maintain geographic diversity of supply toreduce the chance of supply disruptions In anasset sale the seller may weigh the probabilitythat the sale will be completed for example dueto financing contingencies or because a union orantitrust regulators must approve the sale

The cumulative offer process model withgeneral contracts accommodates all of thesepossibilities The auctioneer in the model cor-responds to a single ldquohospitalrdquomdashhereafter theauctioneermdashwith a choice function CH thatselects her most preferred collection of contractproposals We have the following result (whichis first stated using different notation than in theAusubel-Milgrom paper)

THEOREM 16 When the doctor-offering cu-mulative offer process with a single hospitalterminates at time t with outcome (XD(t) XH(t))the hospitalrsquos choice CH(XH(t)) is a stable col-lection of contracts

Cumulative offer processes connect the the-ory of matching with contracts to the emergingtheory of package auctions and auctions withcomplex constraints

VI Conclusion

We have introduced a general model ofmatching with bilateral contracts that encom-passes and extends two-sided matching modelswith and without money and certain auctionmodels The new formulation allows some con-tract terms to be exogenously fixed and others tobe endogenous in any combinations In thisvery general framework we characterize stable

929VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

collections of contracts in terms of the solutionto a certain system of equations

The key to the analysis is to extend twoconcepts of demand theory to models with orwithout prices The first concept to be extendedis the notion of substitutes Our definition ap-plies essentially the Roth-Sotomayor substitut-able preferences condition to a more generalclass of contracts contracts are substitutes ifwhenever the set of feasible bilateral contractsexpands the set of contracts that the firm rejectsalso expands We show that (a) our definitioncoincides with the usual demand theory condi-tion when both apply (b) when contracts aresubstitutes a stable collection of contracts ex-ists and (c) if any hospital or firm has prefer-ences that are not substitutes then there arepreferences with single openings for each otherfirm such that no stable allocation exists Wefurther show that when the substitute conditionapplies (a) both the doctor-offering and hospi-tal-offering Gale-Shapley algorithms can berepresented as iterated operations of the sameoperator (starting from different initial condi-tions) and (b) starting at a stable allocationfrom which a doctor retires a natural marketdynamic mimics the Gale-Shapley process tofind a new stable allocation

The second relevant demand theory conceptis the law of demand which we extend both toinclude heterogeneous inputs and to encompassmodels with or without prices The law of ag-gregate demand condition holds that when theset of feasible contracts expands the number ofcontracts that the firm chooses to sign weaklyincreases In terms of traditional demand theorythis means that for example when the wages ofsome of a heterogeneous group of workers fallsif the workers are substitutes then the totalnumber of workers employed rises We showthat (a) when inputs are substitutes the choicesof a profit-maximizing firmhospital satisfy thelaw of aggregate demand Moreover when thechoices of every hospitalfirm satisfy the law ofaggregate demand and the substitutes conditionthen (b) the set of workersdoctors employed isthe same at every stable allocation (c) the num-ber employed by each firmhospital is also thesame and (d) truthful reporting is a dominantstrategy for doctors in the doctor-offering algo-rithm Moreover we prove (e) that if the law of

aggregate demand fails in any potentially ob-servable way then the preceding dominantstrategy property does not hold

For these results to be useful for practicalmechanism design one needs to account forhow preferences especially hospital prefer-ences are to be reported to the mechanismThere needs to be a convenient way for hospi-tals to express a rich array of preferences andone needs to know whether the preferences be-ing reported actually satisfy the conditions ofthe various theorems Toward that end we in-troduce a parametric form that we call extendedassignment valuations which strictly general-izes several existing specifications and whichalways satisfies both the substitutes and law ofaggregate demand conditions

Finally we introduce an alternative treatmentof the doctor-offering algorithm the cumulativeoffer process We show that when contracts aresubstitutes the previously characterized doctor-offering algorithm coincides exactly with a cu-mulative offer process When contracts are notsubstitutes but there is just one hospital (theldquoauctioneerrdquo) the cumulative offer process co-incides with the Ausubel-Milgrom ascendingproxy auction This identity clarifies the con-nection between these algorithms and com-bined with the dominant strategy theoremreported above generalizes the Ausubel-Milgromdominant strategy theorem for the proxyauctions

Our new approach reveals deep similaritiesamong several of the most successful auctionand matching designs in current use and amongthe environmental conditions in which theoret-ically the mechanisms should perform at theirbest Understanding these similarities can helpus to understand the limitations of these mech-anisms paving the way for new designs

APPENDIX

PROOF OF THEOREM 1Let (XD XH) X2 be a solution to (3) Then

XD XH XD RD(XD) CD(XD) andsimilarly XH XD XH RH(XH) CH(XH)so XH XD CH(XH) CD(XD)

Next we show that X XH XD is a stableset of contracts Since X CH(XH) CD(XD)it follows by revealed preference that X

930 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

CH(X) CD(X) so condition (i) of the defi-nition of stability is satisfied

Consider any hospital h and set of contractsX CD(X X) naming hospital h Since X CD(XD) revealed preference of the doctorsimplies that X XD CD(XD) and hence thatX RD(XD) X XD RD(XD) CD(XD) RD(XD) A Thus X X RD(XD) XHby (3) So if X Ch(X) then by the revealedpreference of hospital h X h Ch(XH) Ch(X) Hence X Ch(X X) so condition(ii) is satisfied So the set of contracts X isunblocked

For the converse suppose that X is a stablecollection of contracts Then CD(X) X LetXH be the set of contracts that the doctorsweakly prefer to X and XD the set of contractsthat doctors weakly disprefer By constructionX XH X XD X is a partition of X

To obtain (3) observe first that if there issome h such that Ch(XH) Xh then X Ch(XH) violates stability condition (ii) SoCh(XH) Xh for all h that is CH(XH) X Itfollows that X RH(XH) X (XH X) X (X XD) XD and that X RD(XD) X (XD CD(XD)) X (XD X) XH

Hence (XD XH) satisfies (3) and XH XD X

PROOF OF THEOREM 2Let i j ( j wj) C(w) and wi wi Define

Z(w) ( j wj)wj wj Then Z(wi wi) Z(w) If contracts are substitutes then R(Z(wiwi)) R(Z(w)) By (6) since ( j wj) C(w)it follows that ( j wj) C(Z(w)) so ( j wj) R(Z(w)) Hence ( j wj) R(Z(wi wi)) So ( jwj) Z(wi wi) R(Z(wi wi)) C(Z(wiwi)) and thus (j wj) C(wi wi) by assumption(6) Thus C satisfies demand theory substitutes

Conversely suppose contracts are not substi-tutes Then there exists a set X an element (iwi) X and ( j wj) R(X) such that ( j wj) R(X) where X X (i wi) Using (6)wi Wi(X) Let w W(X) and wi Wi(X)Then wi wi and ( j wj) C(w) but ( j wj) C(wi wi) so C does not satisfy the demandtheory substitutes condition

PROOF OF THEOREM 5We may limit attention to the case with

exactly two hospitals by specifying that

the doctors find the other hospitals to beunacceptable

Suppose Rh is not isotone Then there existssome x y X and X X such that for all x X xH h and such that x Rh(X) Rh(X y) By construction since x y Ch(X y) contracts x and y specify different doctorssay d1 xD yD d2 Let x and y denote thecorresponding contracts for doctors d1 and d2 inwhich hospital h is substituted for h

We specify preferences as follows first forhospital h we take x h y h A and allother contracts are unacceptable Second doc-tors in xD(CH(X) CH(X y)) d1 d2prefer their elements of CH(X) CH(X y)to any other contract Third d1 has x d1

x and ranks all other contracts lower Fourthd2 has y d2

y and ranks all other con-tracts lower Finally the remaining doctors findall contracts from hospitals h and h to beunacceptable

Consider a feasible acceptable allocation Xsuch that y X Since h and d2 can have onlyone contract in X x y X Then hrsquos con-tracts in X form a subset of X so x is notincluded and d1 has a contract less preferredthan x Then the deviation by (d1 h) to xblocks X

Consider a feasible acceptable allocation Xsuch that y X Then either x y X or Xis blocked by a coalition including h d1 and d2using the contracts x and y However if x y X then a deviation by (d2 h) to contract yblocks X

Since all feasible allocations are blockedthere exists no stable set of contracts

PROOF OF THEOREM 7Suppose X D H W and let Z(w) ( j

wj)wj wj Then the law of aggregate de-mand is the statement that for any wage vectorsw w satisfying w w such that the choices setsare singletons C(Z(w)) C(Z(w)) The proofis by contradiction Suppose the law of aggre-gate demand does not hold Then there exists awage vector w and a doctor d such that for some(and hence all) 0 C(Z(wd 13 wd)) C(Z(wd wd)) Since hrsquos preferences arequasi-linear changing doctor drsquos wage can af-fect the hiring of other doctors only if it affectsthe hiring of doctor d It follows that there are

931VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

exactly two optimal choices for the hospital atwage vector w these are C(Z(wd wd)) atwhich doctor d is hired and C(Z(wd 13 wd))at which d is not hired but such that two otherdoctors are hired that is there exist doctors dd C(Z(wd 13 wd)) C(Z(wd wd))Let the corresponding payoff for the hospital(when faced with wage vector w) be

Consider the wage vector w (wd wd 2 wdd) For positive and suffi-ciently small the hospitalrsquos payoff at wage vec-tor w is 13 2 if it chooses C(Z(wd 13 wd))and it is 13 if it chooses C(Z(wd wd))and one of these choices must be optimal SoC(w) C(Z(wd 13 wd)) But then raisingthe wage of doctor d from wd 2 to wd whileholding the other wages at wd reduces the de-mand for doctor d from one to zero in violationof the demand theory substitutes condition

PROOF OF THEOREM 8By definition XD X D so by revealed pref-

erence Cd(X D) Cd(XD) Also X H XH soby the law of aggregate demand Ch(X H) Ch(XH) By Theorem 1 CD(XD) CH(XH)and CD(X D) CH(X H) so yendD Cd(XD) yenhH Ch(XH) and yendD Cd(XD) yenhH Ch(XH)Combining these leads to yendD Cd(X D) yendD Cd(XD) yenhH Ch(XH) yenhH Ch(XH) yendD Cd(XD) which begins and ends with the samesum Hence none of the inequalities can bestrict

PROOF OF THEOREM 9Since Ch(X) Ch(X) there exists some

set Y X Y X and contract x such thatCh(Y) Ch(Y x) Since x Ch(Y x)(as otherwise Ch(Y) Ch(Y x) for thepreferences to be rationalizable) there must ex-ist two contracts y z Rh(Y x) Rh(Y)such that y x z y Moreover since y z Ch(Y) yD zD

Denoting by h the second hospital whose exis-tence is hypothesized by the theorem we specifypreferences as follows Let all the doctors with con-tracts in Y have those contracts be their most favoredand let all other doctors find any contract with hunacceptable Let all doctors find any contract notinvolving hospital h or h to be unacceptable

In principle there are three casesIf xD yD then let PxD

y x and PzD z

Then there exist two stable matches Ch(Y x) and Ch(Y) with zD employed in the firstmatch but not in the second

The case xD zD is symmetricFinally if yD xD zD then let x y z

denote contracts with hospital h where the doc-tors (and any other terms) are the same as in xy z respectively Specify the remaining prefer-ences by PxD

x x PyD y y PzD

z z and Ph y x A z Thenthere exist two different stable matches x Ch(Y) and y Ch(Y x) with zD em-ployed in the first match but not in the second

PROOF OF THEOREM 10Let X denote the collection of contracts cho-

sen by the algorithm when doctor d submitspreference Pd If this collection which is stableunder the reported preferences is not stableunder Pd then there exists a blocking coalitionThis blocking coalition must contain d as noother doctorrsquos preferences have changed butthat is impossible since x is drsquos favorite con-tract according to the preferences Pd Since X isstable under Pd the doctor-optimal stable matchunder Pd (the existence of which is guaranteedby Theorem 2) must make every doctor(weakly) better off than at X In particulardoctor d must obtain x

PROOF OF THEOREM 11From Theorem 10 Pd x also obtains x

Hence by the rural hospitals theorem d is em-ployed at every point in the core when Pd x issubmitted So every allocation X at which d isunemployed is blocked by some coalition andset of contracts when d submits Pd Conse-quently if d submits the preferences Pd y1 y2 yn x then every allocation at whichd is unemployed is still blocked by the samecoalition and set of contracts Since the doctor-best stable allocation is one at which d gets aPd-acceptable contract that allocation is weaklyPd-preferred to x Finally the doctor-optimalmatch when Pd is submitted is still the doctor-optimal match when Pd is submitted as drsquospreferences over contracts less preferred than xcannot be used to block a match where shereceives a contract weakly preferred to x

932 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

PROOF OF THEOREM 12Consider contracts x y and z such that

xD xD yD yD zD zD and xH yH zH h Let the preferences of the three identified bePxD

x x PyD y y and PzD

z z andlet those of h be Ph y z x Forthe other contracts x Y Ch(X) let x be xDrsquosmost favored contract For the remaining doctorslet any contract with h or h be unacceptable

With the preceding preferences the only sta-ble allocation includes contracts x and y leav-ing doctor zD unemployed If however zDmisrepresents her preferences and reports PzD

z z then the doctor-optimal stable matchincludes z leaving doctor zD better off

PROOF OF THEOREM 13Setting J 1 and T A it is clear by

inspection that this family includes all singletonvaluations

The family is closed under endowment be-cause given any such valuation v( J T)endowing a set of doctors T simply creates thevaluation v( J T T))

To verify that the family is closed underaggregation consider any two valuations v( J T) and v( J T) Since J and T are justindex sets we may assume without loss ofgenerality that T T J J A DefineT T T and J J J Let

(15) ij ij if i D T j Jij if i D T j J0 otherwise

By inspection of the optimization problems v( J T) v( J T) v( J T)

For the converse consider the valuation v( J T) given by (13) We derive it construc-tively from the singleton valuations aggrega-tion and endowment as follows Let vj be thesingleton valuation associated with row j inmatrix [ij] for j 1 J Since VEA isclosed under aggregation v1 vJ v( J A) VEA Since VEA is also closed underendowment we may endow the doctors in T toobtain v( J T) VEA

PROOF OF THEOREM 14L Shapley (1962) (see also Lehmann et al

2001) had already proved that every assignment

valuation without endowments v( J A) is asubstitutes valuation Ausubel and Milgrom(2002) prove that a valuation v is a substitutesvaluation if and only if the corresponding indi-rect profit function ((p) v(S) yendS pd) issubmodular Let be the indirect profit func-tion corresponding to v( J A) Then theindirect profit function corresponding to v( J T) is (p1 pN) (p1 pN 0 0)Since is the profit function of the substitutesvaluation vh it is submodular and hence issubmodular as well

PROOF OF THEOREM 15Suppose that contracts are substitutes for the

hospitals We proceed by induction The initialcondition specifies that the sequences are iden-tical through time t 0 Denote the sequencecorresponding to the cumulative offer processby a superscript C and denote the alternativeprocess defined by (9) with no superscript As-sume the inductive hypothesis that the se-quences are the same up to round t 1 andsuppress the corresponding superscripts for thevalues at that round Then XD(t) X RH(XH(t 1)) XD

C(t) This also implies that

(16) X XH t 1 XD t

To complete the proof we must show thatXH

C(t) XH(t) or equivalently that XH(t 1) CD(XD(t)) X RD(XD(t))

For t 2 XHC(t 2) XH

C(t 1) by con-struction so by the inductive hypothesis XH(t 2) XH(t 1) Since contracts are substitutesRH is isotone so X RH(XH(t 1)) X RH(XH(t 2)) and hence XD(t) XD(t 1)For t 1 the inclusion XD(t) XD(t 1) isimplied by the initial condition XD(0) X

Recall that by revealed preference RD isisotone It follows that RD(XD(t)) RD(XD(t 1)) and hence using (9) that XH(t 1) X RD(XD(t 1)) X RD(XD(t)) XH(t) ThusXH(t 1) XH(t 1) (X RD(XD(t))) XH(t 1) RD(XD(t)) So XH(t 1) CD(XD(t)) XH(t 1) (XD(t) RD(XD(t))) (XH(t 1) RD(XD(t))) (XD(t) RD(XD(t))) (XH(t 1) XD(t)) RD(XD(t)) X RD(XD(t)) where the last stepequality follows from (16)

933VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

PROOF OF THEOREM 16By construction any contract not in XH(t) is

less preferred by some doctor d than everycorresponding contract in XH(t) (because doctord offers her most preferred contracts in se-quence) So any collection of contracts thatincludes some not in XH(t) must be strictly lesspreferred by one of the doctors Any profitablecoalitional deviation must use only contracts inXH(t)

By construction the one hospitalauctioneermust be part of any deviating coalition andCH(XH(t)) is its strictly most preferred collectionof contracts in XH(t) so there is no profitablecoalitional deviation using just contracts in XH(t)

REFERENCES

Abdulkadiroglu Atila ldquoCollege Admissionswith Affirmative Actionrdquo Unpublished Pa-per 2003

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoBoston Public School MatchingrdquoAmerican Economic Review 2005a (Papersand Proceedings) 95(2) pp 368ndash71

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoThe New York City High SchoolMatchrdquo American Economic Review 2005b(Papers and Proceedings) 95(2) pp 364ndash67

Abdulkadiroglu Atila and Sonmez TayfunldquoSchool Choice A Mechanism Design Ap-proachrdquo American Economic Review 200393(3) pp 729ndash47

Adachi Hiroyuki ldquoOn a Characterization of Sta-ble Matchingsrdquo Economics Letters 200068(1) pp 43ndash49

Alkan Ahmet and Gale David ldquoStable ScheduleMatching under Revealed Preferencerdquo Jour-nal of Economic Theory 2003 112(2) pp289ndash306

Ausubel Lawrence M Cramton Peter and Mil-grom Paul R ldquoThe Clock-Poxy Auction APractical Combinatorial Auction Designrdquo inPeter Cramton Yoav Shoham and RichardSteinberg eds Combinatorial auctionsCambridge MA MIT Press 2005 ch 5

Ausubel Lawrence M and Milgrom Paul RldquoAscending Auctions with Package Bid-dingrdquo Frontiers of Theoretical Economics2002 1(1) Article 1

Blum Yosef Roth Alvin E and Rothblum UrielG ldquoVacancy Chains and Equilibration in Se-nior-Level Labor Marketsrdquo Journal of Eco-nomic Theory 1997 76(2) pp 362ndash411

Brewer Paul J and Plott Charles R ldquoA BinaryConflict Ascending Price (Bicap) Mechanismfor the Decentralized Allocation of the Rightto Use Railroad Tracksrdquo International Jour-nal of Industrial Organization 1996 14(6)pp 857ndash86

Bulow Jeremy and Levin Jonathan ldquoMatchingand Price Competitionrdquo Stanford UniversityStanford Economics Working Paper No1818 2003

Cramton Peter Shoham Yoav and SteinbergRichard Combinatorial auctions Cam-bridge MA MIT Press (forthcoming)

Crawford Vincent P and Knoer Elsie M ldquoJobMatching with Heterogeneous Firms andWorkersrdquo Econometrica 1981 49(2) pp437ndash50

Demange Gabrielle and Gale David ldquoThe Strat-egy Structure of Two-Sided Matching Mar-ketsrdquo Econometrica 1985 53(4) pp 873ndash88

Dubins Lester and Freedman David ldquoMachia-velli and the Gale-Shapley Algorithmrdquo Na-val Research Logistics Quarterly 198188(7) pp 485ndash94

Echenique Federico and Oviedo Jorge ldquoCoreMany-to-One Matchings by Fixed-PointMethodsrdquo Journal of Economic Theory2004 115(2) pp 358ndash76

Fleiner Tamas ldquoA Fixed-Point Approach toStable Matchings and Some ApplicationsrdquoMathematics of Operations Research 200328(1) pp 103ndash26

Gale David and Shapley Lloyd ldquoCollege Ad-missions and the Stability of MarriagerdquoAmerican Mathematical Monthly 196269(1) pp 9ndash15

Gul Faruk and Stacchetti Ennio ldquoWalrasianEquilibrium with Gross Substitutesrdquo Journalof Economic Theory 1999 87(1) pp 95ndash124

Kelso Alexander and Crawford Vincent P ldquoJobMatching Coalition Formation and GrossSubstitutesrdquo Econometrica 1982 50(6) pp1483ndash504

Lehmann Benny Lehmann Daniel and NisanNoam ldquoCombinatorial Auctions with De-

934 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

creasing Marginal Utilityrdquo Games and Eco-nomic Behavior 2005 (forthcoming)

Lien Yuan-Chuan and Yan Jun ldquoOn the GrossSubstitutes Conditionrdquo Unpublished Paper2003 httpwwwstamfordeduyclienTerm_Paper_Lien_Yanpdf

Martınez Ruth Masso Jordi Neme Alejandroand Oviedo Jorge ldquoSingle Agents and the Setof Many-to-One Stable Matchingsrdquo Journalof Economic Theory 2000 91(1) pp 91ndash105

Milgrom Paul R Putting auction theory towork Cambridge Cambridge UniversityPress 2004

Milgrom Paul R ldquoPutting Auction Theory toWork The Simultaneous Ascending Auc-tionrdquo Journal of Political Economy 2000108(2) pp 245ndash72

Porter David Rassenti Stephen RoopnarineAnil and Smith Vernon ldquoCombinatorial Auc-tion Designrdquo Proceedings of the NationalAcademy of Sciences 2003 100(19) pp11153ndash57

Reijnierse Hans van Gellekom Anita and PottersJos A M ldquoVerifying Gross SubstitutabilityrdquoEconomic Theory 2002 20(4) pp 767ndash76

Roth Alvin E ldquoThe Economics of Matching Sta-bility and Incentivesrdquo Mathematics of Opera-tions Research 1982 7(4) pp 617ndash28

Roth Alvin E ldquoStability and Polarization ofInterests in Job Matchingrdquo Econometrica1984 52(1) pp 47ndash57

Roth Alvin E ldquoThe College Admissions Prob-lem Is Not Equivalent to the Marriage Prob-lemrdquo Journal of Economic Theory 1985a36(2) pp 277ndash88

Roth Alvin E ldquoConflict and Coincidence ofInterest in Job Matching Some New Resultsand Open Questionsrdquo Mathematics of Oper-ations Research 1985b 10(3) pp 379ndash89

Roth Alvin E ldquoOn the Allocation of Residentsto Rural Hospitals A General Property ofTwo-Sided Matching Marketsrdquo Economet-rica 1986 54(2) pp 425ndash27

Roth Alvin E ldquoA Natural Experiment in theOrganization of Entry-Level Labor MarketsRegional Markets for New Physicians andSurgeons in the United Kingdomrdquo AmericanEconomic Review 1991 81(3) pp 415ndash40

Roth Alvin E and Peranson Elliott ldquoThe Rede-sign of the Matching Market for AmericanPhysicians Some Engineering Aspects ofEconomic Designrdquo American Economic Re-view 1999 89(4) pp 748ndash80

Roth Alvin E and Sotomayor Marilda Two-sided matching A study in game-theoreticmodeling and analysis Cambridge Cam-bridge University Press 1990

Sen Amartya Collective choice and social wel-fare San Francisco Holden-Day Inc 1970

Shapley Lloyd ldquoComplements and Substitutesin the Optimal Assignment Problemrdquo NavalResearch Logistics Quarterly 1962 9(1) pp45ndash48

935VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

Page 3: Matching with Contracts - Stanford Universityweb.stanford.edu/~milgrom/publishedarticles/Matching with... · 2005. 10. 22. · Gale-Shapley matching algorithm. Hence, the Gale-Shapley

condition for the college admissions problem(Roth and Marilda Sotomayor 1990)

The law of aggregate demand which is newin this paper is similarly defined by a compar-ative static It is the condition that when acollege or firm chooses from an expanded set itadmits at least as many students or hires at leastas many workers2

The term ldquolaw of aggregate demandrdquo is mo-tivated by the relation of this condition to thelaw of demand in producer theory According toproducer theory a profit-maximizing firm de-mands (weakly) more of any input as its pricefalls For the matching model with prices thelaw of aggregate demand requires that whenany input price falls the aggregate quantitydemanded which includes the quantities de-manded of that input and all of its substitutesrises (weakly) Notice that it is tricky even tostate such a law in producer theory with divis-ible inputs because there is no general aggre-gate quantity measure when divisible inputs arediverse In the present model with indivisibleworkers we measure the aggregate quantity ofworkers demanded or hired by the total numberof such workers

A key step in our analysis is to prove a newresult in demand theory if workers are substi-tutes then a profit-maximizing firmrsquos employ-ment choices satisfy the law of aggregatedemand Since firms are profit maximizers andregard workers as substitutes in the Kelso-Crawford model it follows that the law of ag-gregate demand holds for that model Thus oneimplication of the standard quasi-linearity as-sumption of auction theory is that the biddersrsquopreferences satisfy the law of aggregate de-mand We find that when preferences are re-sponsive as originally and still commonlyassumed in matching theory analyses they sat-isfy the law of aggregate demand3 We also

prove some new results for the class of auctionand matching models that satisfy this law

The paper is organized as follows Section Iintroduces the matching-with-contracts nota-tion treats an allocation as a set of contractsand characterizes the stable allocations in termsof the solution of a certain system of twoequations

Section II introduces the substitutes conditionand uses it to prove that the set of stable allo-cations is a nonempty lattice and that a certaingeneralization of the Gale-Shapley algorithmidentifies its maximum and minimum elementsThese two extreme points are characterized as adoctor-optimalhospital-pessimal point whichis a point that is the unanimously most preferredstable allocation for the doctors and the unani-mously least preferred stable allocation for thehospitals and a hospital-optimaldoctor-pessimalpoint with the reverse attributes

Section II also proves several related resultsFirst if there are at least two hospitals and ifsome hospital has preferences that do not satisfythe substitutes condition then even if all otherhospitals have just a single opening there existsa profile of preferences for the students andcolleges such that no stable allocation existsThis result is important for the construction ofmatching algorithms It means that any match-ing procedure that permits students and collegesto report preferences that do not satisfy thesubstitutes condition cannot be guaranteed al-ways to select a stable allocation with respect tothe reported preferences

Another result concerns vacancy chain dy-namics which traces the dynamic adjustment ofthe labor market when a worker retires or a newworker enters the market and the dynamics arerepresented by the operator we have describedThe analysis extends the results reported byYosef Blum et al (1997) and foreshadowed byKelso and Crawford (1982) We find that start-ing from a stable allocation the vacancy adjust-ment process converges to a new stableallocation

Section III contains the most novel results ofthe paper It introduces the law of aggregate

2 In their study of a model of ldquoschedule matchingrdquoAhmet Alkan and Gale (2003) independently introduced asimilar notion which they call ldquosize monotonicityrdquo

3 The original matching formulation of Gale and Shapley(1962) assumed that colleges simply have a rank orderlisting of students Roth (1985a) dubbed this ldquoresponsive-nessrdquo and sought to relax this condition Similarly in amodel of matching with wages Crawford and E M Knoer(1981) assumed that firm preferences over workers were

separable That restriction was relaxed by Kelso and Craw-ford (1982)

915VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

demand verifies that it holds for a profit-maximizing firm when inputs are substitutesand explores its consequences When both thesubstitutes and the law of aggregate demandconditions are satisfied then (a) the set of work-ers employed and the set of jobs filled is thesame at every stable collection of contracts and(b) it is a dominant strategy for doctors (orworkers or students) to report their preferencestruthfully in the doctor-offering version of theextended Gale-Shapley algorithm We alsodemonstrate the necessity of a weaker versionof the law of aggregate demand for theseconclusions

Our conclusion about this dominant strategyproperty substantially extends earlier findingsabout incentives in matching The first suchresults due to Lester Dubins and David Freed-man (1981) and Roth (1982) established thedominant strategy property for the marriageproblem which is a one-to-one matching prob-lem that is a special case of the college admis-sions problem Similarly Gabrielle Demangeand Gale (1985) establish the dominant strategyproperty for the worker-firm matching problemin which each firm has singleton preferencesThese results generalize to the case of respon-sive preferences that is to the case where eachhospital (or college or firm) behaves just thesame as a collection of smaller hospitals withone opening each For the college admissionsproblem Abdulkadiroglu (2003) has shown thatthe dominant strategy property also holds whencolleges have responsive preferences with ca-pacity constraints where the constraints limitthe number of workers of a particular type thatcan be hired All of these models with a domi-nant strategy property satisfy our substitutesand law of aggregate demand conditions so theearlier dominant strategy results are all sub-sumed by our new result

In Section IV we introduce a new parame-terized family of preferencesmdashthe endowed as-signment preferencesmdashand show that theysubsume certain previously identified classesand satisfy both the substitutes and law of ag-gregate demand conditions

Section V introduces cumulative offer pro-cesses as an alternative auctionmatching algo-rithm and shows that when contracts aresubstitutes it coincides with the doctor-offering

algorithm of the previous sections Since theAusubel-Milgrom proxy auction is also a cumu-lative offer process our dominant strategy con-clusion of Section III implies an extension ofthe Ausubel-Milgrom dominant strategy resultWhen contracts are not substitutes the cumula-tive offer process can converge to an infeasibleallocation We show that if there is a singlehospitalauctioneer however the cumulativeoffer process converges to a feasible stableallocation without restrictions on the hospitalrsquospreferences Section VI concludes All proofsare in the Appendix

I Stable Collections of Contracts

The matching model without transfers hasmany applications of which the best knownamong economists is the match of doctors tohospital residency programs in the UnitedStates For the remainder of the paper we de-scribe the match participants as ldquodoctorsrdquo andldquohospitalsrdquo These groups play the same respec-tive roles as students and colleges in the collegeadmissions problem and workers and firms inthe Kelso-Crawford labor market model

A Notation

The sets of doctors and hospitals are denotedby D and H respectively and the set of con-tracts is denoted by X We assume only thateach contract x X is bilateral so that it isassociated with one ldquodoctorrdquo xD D and oneldquohospitalrdquo xH H When all terms of employ-ment are fixed and exogenous the set of con-tracts is just the set of doctor-hospital pairs X D H For the Kelso-Crawford model a con-tract specifies a firm a worker and a wage X D H W

Each doctor d can sign only one contract Herpreferences over possible contracts includingthe null contract A are described by the totalorder d The null contract represents unem-ployment and contracts are acceptable or un-acceptable according to whether they are morepreferred than A When we write preferences asPd x d y d z we mean that Pd names thepreference order of d and that the listed con-tracts (in this case x y and z) are the onlyacceptable ones

916 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

Given a set of contracts X X offered in themarket doctor drsquos chosen set Cd(X) is eitherthe null set if no acceptable contracts are of-fered or the singleton set consisting of the mostpreferred contract We formalize this as follows

(1) Cd X

A if x XxD d x d A Amaxd

x XxD d otherwise

The choices of a hospital h are more compli-cated because it has preferences h over sets ofdoctors Its chosen set is a subset of the con-tracts that name it that is Ch(X) x XxH h In addition a hospital can sign onlyone contract with any given doctor

(2) h H X X x x ChXx

xf xD xD

Let CD(X) dD Cd(X) denote the set ofcontracts chosen by some doctor from set XThe remaining offers in X are in the rejectedset RD(X) X CD(X) Similarly the hos-pitalsrsquo chosen and rejected sets are denoted byCH(X) hH Ch(X) and RH(X) X CH(X)

B Stable Allocations Stable Sets ofContracts

In our model an allocation is a collection ofcontracts as that determines the payoffs to theparticipants We study allocations such thatthere is no alternative allocation that is strictlypreferred by some hospital and weakly pre-ferred by all of the doctors that it hires and suchthat no doctor strictly prefers to reject his con-tract It is a standard observation in matchingtheory that such an allocation is a core alloca-tion in the sense that no coalition of hospitalsand doctors can find another allocation feasiblefor them that all weakly prefer and somestrictly prefer This allocation is also a stableallocation in the sense that there is no coalitionthat can deviate profitably even if the deviatingcoalition assumes that outsiders will remainwilling to accept the same contracts

We formalize the notion of stable allocationsas follows

DEFINITION A set of contracts X X is astable allocation if

(i) CD(X) CH(X) X and(ii) there exists no hospital h and set of con-

tracts X Ch(X) such that

X Ch X X CD X X

If condition (i) fails then some doctor orhospital prefers to reject some contract thatdoctor or hospital then blocks the allocation Ifcondition (ii) fails then there is an alternativeset of contracts that a hospital strictly prefersand that its corresponding doctors weakly prefer

The first theorem states that a set of contractsis stable if any alternative contract would berejected by some doctor or some hospital fromits suitably defined opportunity set In the for-mulas below think of the doctorsrsquo opportunityset as XD and the hospitalsrsquo opportunity set asXH If X is the corresponding stable set then XDmust include in addition to X all contracts thatwould not be rejected by the hospitals and XHmust similarly include X and all contracts thatwould not be rejected by the doctors If X isstable then every alternative contract is rejectedby somebody so X XH XD This logic issummarized in the first theorem

THEOREM 1 If (XD XH) X2 is a solution tothe system of equations

(3) XD X RH XH

and

XH X RD XD

then XH XD is a stable set of contracts andXH XD CD(XD) CH(XH) Conversely forany stable collection of contracts X there ex-ists some pair (XD XH) satisfying (3) such thatX XH XD

Theorem 1 is formulated to apply to generalsets of contracts It is the basis of our analysis of

917VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

stable sets of contracts in the entire set of mod-els treated in this paper

II Substitutes

In this section we introduce our first restric-tion on hospital preferences which is the re-striction that contracts are substitutes We usethe restriction to prove the existence of a stableset of contracts and to study an algorithm thatidentifies those contracts

Our substitutes condition generalizes theRoth-Sotomayor substitutable preferences con-dition to preferences over contracts In wordsthe substitutable preferences condition statesthat if a contract is chosen by a hospital fromsome set of available contracts then that con-tract will still be chosen from any smaller setthat includes it Our substitutes condition issimilarly defined as follows

DEFINITION Elements of X are substitutesfor hospital h if for all subsets X X X wehave Rh(X) Rh(X)4

In the language of lattice theory which weuse below elements of X are substitutes forhospital h exactly when the function Rh isisotone

In demand theory substitutes is defined by acomparative static that uses prices It says thatlimiting attention to the domain of wage vectorsat which there is a unique optimum for thehospital the hospitalrsquos demand for any doctor dis nondecreasing in the wage of each otherdoctor d

Our next result verifies that for resource al-location problems involving prices our defini-tion of substitutes coincides with the standarddemand theory definition For simplicity wefocus on a single hospital and suppress its iden-tifier h from our notation Thus imagine that ahospital chooses doctorsrsquo contracts from a sub-set of X D W where D is a finite set of

doctors and W w w is a finite set ofpossible wages Assume that the set of wages Wis such that the hospitalsrsquo preferences are al-ways strict Suppose that w max W is aprohibitively high wage so that no hospital everhires a doctor at wage w

In demand theory it is standard to representthe hospitalrsquos market opportunities by a vectorw WD that specifies a wage wd at whicheach doctor can be hired We can extend thedomain of the choice function C to allow marketopportunities to be expressed by wage vectorsas follows

(4) w WDf Cw Cd wdd D

Formula (4) associates with any wage vector wthe set of contracts (d wd)d D and definesC(w) to be the choice from that set

With the choice function extended this waywe can now describe the traditional demandtheory substitutes condition The condition as-serts that increasing the wage of doctor d fromwd to wd (weakly) increases demand for anyother doctor d

DEFINITION C satisfies the demand-theorysubstitutes condition if (i) d d (ii) (dwd) C(w) and (iii) wd wd imply that (dwd) C(wd wd)

To compare the two conditions we need tobe able to assign a vector of wages to each setof contracts X It is possible that in X somedoctor is unavailable at any wage or is available atseveral different wages For a profit-maximizinghospital the doctorrsquos relevant wage is the low-est wage if any at which she is availableMoreover such a hospital does not distinguishbetween a doctor who is unavailable and onewho is available only at a prohibitively highwage Thus from the perspective of a profit-maximizing hospital having contracts X avail-able is equivalent to facing a wage vector W(X)specified as follows

(5) Wd X minss w or d s X

In view of the preceding discussion a profit-maximizing hospitalrsquos choices must obey thefollowing identity

4 This condition is identical in form to the ldquoconditionalphardquo used in the study of social choice for example byAmartya Sen (1970) but the meanings of the choice sets aredifferent In Senrsquos model the choice set is a collection ofmutually exclusive choices whereas in the matching prob-lems the set describes the choice itself

918 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

(6) CX CWX

THEOREM 2 Suppose that X D W is afinite set of doctor-wage pairs and that (6)holds Then C satisfies the demand theory sub-stitutes condition if and only if its contracts aresubstitutes

In particular this shows that the Kelso-Crawford ldquogross substitutesrdquo condition is sub-sumed by our substitutes condition

A A Generalized Gale-Shapley Algorithm

We now introduce a monotonic algorithmthat will be shown to coincide with the Gale-Shapley algorithm on its original domain Todescribe the monotonicity that is found in thealgorithm let us define an order on X X asfollows

(7) XD XH XD XH

N XD XD and XH XH

With this definition (X X ) is a finitelattice

The generalized Gale-Shapley algorithm isdefined as the iterated applications of a certainfunction F X X3 X X as defined below

(8) F1 X X RH X

F2 X X RD X

FXD XH F1 XH F2 F1 XH

As we have previously observed since the doc-torsrsquo choices are singletons a revealed prefer-ence argument establishes that the function RD X3 X is isotone If the contracts are substitutesfor the hospitals then the function RH X 3 Xis isotone as well When both are isotone thefunction F (X X ) 3 (X X ) isalso isotone that is it satisfies ((XD XH) (XD XH)) f (F(XD XH) F(XD XH))

Thus F X X 3 X X is an isotonefunction from a finite lattice into itself Usingfixed point theory for finite lattices the set offixed points is a nonempty lattice and iterated

applications of F starting from the minimumand maximum points of X X converge mono-tonically to a fixed point of F5 We summarizethe particular application here with the follow-ing theorem6

THEOREM 3 Suppose contracts are substi-tutes for the hospitals Then

(a) The set of fixed points of F on X X is anonempty finite lattice and in particularincludes a smallest element (X D X H) and alargest element (X D X H)

(b) Starting at (XD XH) (X A) the general-ized Gale-Shapley algorithm convergesmonotonically to the highest fixed point

X D X H

supX XFX X X X and

(c) Starting at (XD XH) (A X) the general-ized Gale-Shapley algorithm convergesmonotonically to the lowest fixed point

X D X H

infX XFX X X X

The facts that (X D X H) is the highest fixedpoint of F and that (X D X H) is the lowest in thespecified order mean that for any other fixedpoint (XD XH) X D XD X D and X H XH X H Because doctors are better off when theycan choose from a larger set of contracts it

5 This special case of Tarskirsquos fixed point theorem can besimply proved as follows Let Z be a finite lattice withmaximum point z Let z0 z z1 F(z0) zn F(zn1)Plainly z1 z0 and since F is isotone z2 F(z1) F(z0) z1 and similarly zn131 zn for all n So thedecreasing sequence zn converges in a finite number ofsteps to a point z with F( z) z Moreover for any fixedpoint z since z z z Fn( z) Fn(z) z for n large soz is the maximum fixed point A similar argument appliesfor the minimum fixed point

6 Hiroyuki Adachi (2000) and Federico Echenique andJorge Oviedo (2004) have also characterized the Gale-Shapley algorithm for the marriage problem and the collegeadmissions problem respectively as iterated applications ofa certain operator on a lattice See also Tamas Fleiner(2003)

919VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

follows that the doctors unanimously weaklyprefer CD(X D) to CD(XD) to CD(X D) and simi-larly that the hospitals unanimously preferCH(X H) to CH(XH) to CH(X H) Notice byTheorem 1 that CD(X D) CH(X H) X D X H and CD(X D) CH(X H) X D X H sowe have the following welfare conclusion

THEOREM 4 Suppose contracts are substi-tutes for the hospitals Then the stable set ofcontracts X D X H is the unanimously mostpreferred stable set for the doctors and theunanimously least preferred stable set for thehospitals Similarly the stable set X D X H isthe unanimously most preferred stable set forthe hospitals and the unanimously least pre-ferred stable set for the doctors

Theorems 3 and 4 duplicate and extend fa-miliar conclusions about stable matches in theGale-Shapley matching problem and a similarconclusion about equilibrium prices in theKelso-Crawford labor market model Thesenew theorems encompass both these older mod-els and additional ones with general contractterms

To see how the Gale-Shapley algorithm isencompassed consider the doctor-offering al-gorithm As in the original formulation we sup-pose that hospitals have a ranking of doctorsthat is independent of the other doctors they willhire so hospital h just chooses its nh mostpreferred doctors (from among those who areacceptable and have proposed to hospital h)

Let XH(t) be the cumulative set of contractsoffered by the doctors to the hospitals throughiteration t and let XD(t) be the set of contractsthat have not yet been rejected by the hospitalsthrough iteration t Then the contracts ldquoheldrdquo atthe end of the iteration are precisely those thathave been offered but not rejected which arethose in XD(t) XH(t) The process initiateswith no offers having been made or rejected soXD(0) X and XH(0) A

Iterated applications of the operator F de-scribed above define a monotonic process inwhich the set of doctors makes an ever-larger(accumulated) set of offers and the set of unre-jected offers grows smaller round by roundUsing the specification of F and starting fromthe extreme point (X A) we have

(9) XD t X RH XH t 1

XH t X RD XD t

After offers have been made in iteration t 1the hospitalrsquos cumulative set of offers is XH(t 1) Each hospital h holds onto the nh best offersit has received at any iteration provided thatmany acceptable offers have been made other-wise it holds all acceptable offers that havebeen made Thus the accumulated set of re-jected offers is RH(XH(t 1)) and the unre-jected offers are those in X RH(XH(t 1)) XD(t) At round t if a doctorrsquos contract is beingheld then the last offer the doctor made was itsbest contract in XD(t) If a doctorrsquos last offerwas rejected then its new offer is its best con-tract in XD(t) The contracts that doctors havenot offered at this round or any earlier one aretherefore those in RD(XD(t)) So the accumu-lated set of offers doctors have made are thosein X RD(XD(t)) XH(t) Once a fixed point ofthis process is found we have by Theorem 1 astable set of contracts XH(t) XD(t)

To illustrate the algorithm consider a simpleexample with two doctors and two hospitalswhere X D H and agents have the follow-ing preferences

(10) Pd1 h1 h2

Ph1 d1 d2 A

Pd2 h1 h2

Ph2 d1 d2 d1 d2 A

The algorithm is initialized with XD(0) X (d1 h1) (d1 h2) (d2 h1) (d2 h2) andXH(0) A Table 1 applies the operator givenin (9) to illustrate the algorithm

For t 1 starting from XD(1) X bothdoctors choose to work for the hospital h1 sothey reject their contracts with hospital h2 thusRD(XD(1)) (d1 h2) (d2 h2) Next XH(1) iscalculated as the complement of RD(XD(1)) soXH(1) (d1 h1) (d2 h1) From XH(1) thehospitals choose (d1 h1) and reject (d2 h1)completing the row for t 1

920 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

For t 2 we first compute XD(2) as thecomplement of RH(XH(1)) The doctors choose(d1 h1) (d2 h2) so they reject (d1 h2) Thehospitals must then choose from the comple-ment XH(2) X (d1 h2) The hospitalschoose (d1 h1) and (d2 h2) and reject (d2 h1) Inthe third round XD(3) XD(2) and the processhas reached a fixed point

The example illustrates the monotonicity ofthe algorithm XH(t) grows larger step by stepwhile XD(t) grows smaller At termination of thealgorithm the intersection of the choice sets isthe stable set of contracts XH(3) XD(3) (d1 h1) (d2 h2) Moreover when XD(t) andXH(t) are interpreted as suggested above theprocess XD(t) XH(t) described by (9) with theinitial conditions XD(0) X and XH(0) Acoincides with the doctor-offering Gale-Shapley algorithm

For the hospital-offering algorithm a similaranalysis applies but with a different interpreta-tion of the sets and a different initial conditionLet XD(t) be the cumulative set of contractsoffered by the hospitals to the doctors beforeiteration t and let XH(t) be the set of contractsthat have not yet been rejected by the hospitalsup to and including iteration t Then the con-tracts ldquoheldrdquo at the end of iteration t are pre-cisely those that have been offered but notrejected which are those in XD(t 13 1) XH(t)With this interpretation the analysis is identicalto the one above The Gale-Shapley hospitaloffering algorithm is characterized by (9) andthe initial conditions XD(0) A and XH(0) X

The same logic applies to the Kelso-Crawfordmodel provided one extends their original treat-ment to include a version in which the workersmake offers in addition to the treatment inwhich firms make offers The words of thepreceding paragraphs apply exactly but a con-tract offer now includes a wage so for exam-ple a hospital whose contract offer is rejected

by a doctor may find that its next most preferredcontract to the same doctor is at a higher wage

B When Contracts Are Not Substitutes

It is clear from the preceding analysis thatthat definition of substitutes is just sufficient toallow our mathematical tools to be applied Inthis section we establish more We show thatunless contracts are substitutes for every hospi-tal the very existence of a stable set of contractscannot be guaranteed7

THEOREM 5 Suppose H contains at least twohospitals which we denote by h and h Furthersuppose that Rh is not isotone that is contractsare not substitutes for h Then there exist pref-erence orderings for the doctors in set D apreference ordering for a hospital h with asingle job opening such that regardless of thepreferences of the other hospitals no stable setof contracts exists

Together Theorems 3 and 5 characterize theset of preferences that can be allowed as inputsinto a matching algorithm if we wish to guar-antee that the outcome of the algorithm is astable set of contracts with respect to the re-ported preferences According to Theorem 3we can allow all preferences that satisfy substi-tutes and still reach an outcome that is a stablecollection of contracts According to Theorem5 if we allow any preference that does notsatisfy the substitutes condition then there issome profile of singleton preferences for theother parties such that no stable collection ofcontracts exists

7 Kelso and Crawford (1982) provide a particular exam-ple in which preferences do not satisfy substitutes and theredoes not exist a stable allocation

TABLE 1mdashILLUSTRATION OF THE ALGORITHM

XD(t) RD(XD(t)) XH(t) RH(XH(t))t 0 X (d1 h2) (d2 h2) A At 1 X (d1 h2) (d2 h2) (d1 h1) (d2 h1) (d2 h1)t 2 (d1 h1) (d1 h2) (d2 h2) (d1 h2) (d1 h1) (d2 h1) (d2 h2) (d2 h1)t 3 (d1 h1) (d1 h2) (d2 h2) (d1 h2) (d1 h1) (d2 h1) (d2 h2) (d2 h1)

921VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

This theory also reaffirms and extends theclose connection between the substitutes condi-tion and other concepts that has been estab-lished in the recent auctions literature withquasi-linear preferences Milgrom (2000) stud-ies an auction model with discrete goods inwhich the set of possible bidder values is re-quired to include all the additive functions8 Heshows that if goods are substitutes then a com-petitive equilibrium exists If however thereare at least three bidders and if there is anyallowed value such that the goods are not allsubstitutes then there is some profile of valuessuch that no competitive equilibrium existsFaruk Gul and Ennio Stacchetti (1999) establishthe same positive existence result They alsoshow that if preferences include all values inwhich a bidder wants only one particular goodas well as any one for which goods are not allsubstitutes and if the number of bidders issufficiently large then there is some profile ofpreferences for which no competitive equilib-rium exists Ausubel and Milgrom (2002) estab-lish that if (a) there is some bidder for whompreferences are not demand theory substitutes(b) values may be any additive function and (c)there are at least three bidders in total thenthere is some profile of preferences such that theVickrey outcome is not stable and the coreimputations do not form a lattice Conversely ifall bidders have preferences that are demandtheory substitutes then the Vickrey outcome isin the core and the core imputations do form alattice Taken together these results establish aclose connection between the substitutes condi-tion the cooperative concept of the core thenoncooperative concepts of Vickrey outcomesand competitive equilibrium

C ldquoVacancy Chainrdquo Dynamics

Suppose that a labor market has reached equi-librium with all interested doctors placed

at hospitals in a stable match Then suppose onedoctor retires Imagine a process in which ahospital seeks to replace its retired doctor byraiding other hospitals to hire additional doc-tors If the hospital makes an offer that wouldsucceed in hiring a doctor away from anotherhospital the affected hospital has three optionsit may make an offer to another doctor (orseveral) improve the terms for its current doc-tor or leave the position vacant Suppose itmakes whatever contract offer would best serveits purposes

In models with a fixed number of positionsand no contracts this process in which doctorsand vacancies move from one hospital to an-other has been called vacancy chain dynamics(Blum et al 1997) Kelso and Crawford (1982)consider similar dynamics in the context of theirmodel

The formal results for our extended model aresimilar to those of the older theories Startingwith a stable collection of contracts X let XHbe the set of contracts that some doctor weaklyprefers to her current contract in X and letXD X (X XH) As in the proof ofTheorem 1 we have F(XD XH) (XD XH) andX XD XH

To study the dynamic adjustment that resultsfrom the retirement of doctor d we suppose theprocess starts from the initial state (XD(0)XH(0)) (XD XH) This means that the employ-ees start by considering only offers that are atleast as good as their current positions and thathospitals remember which employees have re-jected them in the past The doctorsrsquo rejectionfunction is changed by the retirement of doctord to RD where RD(X) RD(X) x XxD d that is in addition to the old rejec-tions all contract offers addressed to the retireddoctor are rejected

To synchronize the timing with our earliernotation let us imagine that hospitals makeoffers at round t 1 and doctors accept or rejectthem at round t Hospitals consider as poten-tially available the doctors in XH(t 1) X RD(XD(t 1)) and the doctors then reject all butthe best offers so the cumulative set of offersreceived is XD(t) X RH(XH(t 1)) Define

(11) FXD XH X RHXH X RDXD

8 A valuation function is additive if the value of any setof items is the sum of the separate values of the elementsSuch a function v is also described as ldquomodularrdquo Additivityis equivalent to the requirement that for all sets A and Bv(A B) 13 v(A B) v(A) 13 v(B)

922 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

If contracts are substitutes for the hospitalsthen F is isotone and since F(XD XH) (XDXH) it follows that F(XD XH) (XD XH)Then since (XD(0) XH(0)) (XD XH) we have(XD(1) XH(1)) F(XD(0) XH(0)) (XD(0)XH(0)) Iterating (XD(n) XH(n)) F(XD(n 1) XH(n 1)) (XD(n 1) XH(n 1)) thedoctors accumulate offers and the contracts thatare potentially available to the hospitals shrinkA fixed point is reached and by Theorem 1 itcorresponds to a stable collection of contracts

THEOREM 6 Suppose that contracts are sub-stitutes and that (XD XH) is a stable set ofcontracts Suppose that a doctor retires and thatthe ensuing adjustment process is described by(XD(0) XH(0)) (XD XH) and (XD(t) XH(t)) F(XD(t 1) XH(t 1)) Then the sequence(XD(t) XH(t)) converges to a stable collectionof contracts at which all the unretired doctorsare weakly better off and all the hospitals areweakly worse off than at the initial state (XDXH)9

The sequence of contract offers and jobmoves described by iterated applications of Fincludes possibly complex adjustments Hospi-tals that lose a doctor may seek several replace-ments Hospitals whose doctors receive contractoffers may retain those doctors by offering bet-ter terms or may hire a different doctor and laterrehire the original doctor at a new contract Allalong the way the doctors find themselveschoosing from more and better options and thehospitals find themselves marching down theirpreference lists by offering costlier terms pay-ing higher wages or making offers to otherdoctors whom they had earlier rejected

III Law of Aggregate Demand

We now introduce a second restriction onpreferences that allows us to prove the next tworesults about the structure of the set of stablematches We call this restriction the law ofaggregate demand Roughly this law states that

as the price falls agents should demand more ofa good Here price falls correspond to morecontracts being available and more demandcorresponds to taking on (weakly) more con-tracts We formalize this intuition with the fol-lowing definition

DEFINITION The preferences of hospital h H satisfy the law of aggregate demand if for allX X Ch(X) Ch(X)

According to this definition if the set ofpossible contracts expands (analogous to a de-crease in some doctorsrsquo wages) then the totalnumber of contracts chosen by hospital h eitherrises or stays the same The corresponding prop-erty for doctor preferences is implied by re-vealed preference because each doctor choosesat most one contract Just as for the substitutescondition when wages are endogenous we in-terpret the definition as applying to the domainof wage vectors for which the hospitalrsquos opti-mum is unique

The next theorem shows the important rela-tionship between profit maximization substi-tutes and the law of aggregate demand

THEOREM 7 If hospital hrsquos preferences arequasi-linear and satisfy the substitutes condi-tion then they satisfy the law of aggregatedemand

Below we use the law of aggregate demandto characterize both necessary and sufficientconditions for the rural hospitalsrsquo property andensure that truthful revelation is a dominantstrategy for the doctors Previously in matchingmodels without money the dominant strategyresult was known only for responsive prefer-ences with capacity constraints (Abdulkadiro-glu 2003) We subsume that result with ourtheorem

A Rural Hospitals Theorem

In the match between doctors and hospitalscertain rural hospitals often had trouble fillingall their positions raising the question ofwhether there are other core matches at whichthe rural hospitals might do better Roth (1986)analyzed this question for the case of X D

9 The theorem does not claim and it is not generally truethat this new point must be the new doctor-best stable set ofcontracts

923VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

H and responsive preferences and found thatthe answer is no every hospital that has unfilledpositions at some stable match is assigned ex-actly the same doctors at every stable match Inparticular every hospital hires the same numberof doctors at every stable match

In this section we show by an example thatthis last conclusion does not generalize to thefull set of environments in which contracts aresubstitutes10 We then prove that if preferencessatisfy the law of aggregate demand and substi-tutes then the last conclusion of Rothrsquos theoremholds every hospital signs exactly the samenumber of contracts at every point in the corealthough the doctors assigned and the terms ofemployment can vary Finally we show thatany violation of the law of aggregate demandimplies that preferences exist such that theabove conclusion does not hold

Suppose that H h1 h2 and D d1 d2d3 For hospital h1 suppose its choices maxi-mize where d3 d1 d2 d1 d2 A d1 d3 d2 d3 This prefer-ence satisfies substitutes11 Suppose h2 has oneposition with its preferences given by d1 d2 d3 A Finally suppose d1 and d2prefer h1 to h2 while d3 has the reverse prefer-ence Then the matches X (h1 d3) (h2 d1)and X (h1 d1) (h1 d2) (h2 d3) are bothstable but hospital h1 employs a different num-ber of doctors and the set of doctors assigneddiffers between the two matches

This example involves a failure of the law ofaggregate demand because as the set of con-tracts available to h1 expands by the addition of(h1 d3) to the set (h1 d1) (h1 d2) the numberof doctors demanded declines from two to oneWhen the law of aggregate demand holds how-ever we have the following result

THEOREM 8 If hospital preferences satisfysubstitutes and the law of aggregate demandthen for every stable allocation (XD XH) andevery d D and h H Cd(XD) Cd(X D)

and Ch(XH) Ch(X H) That is every doctorand hospital signs the same number of contractsat every stable collection of contracts

The next theorem verifies that the counterex-amples developed above can always be gener-alized whenever any hospitalrsquos preferencesviolate the law of aggregate demand

THEOREM 9 If there exists a hospital h setsX X X such that Ch(X) Ch(X) andat least one other hospital then there existsingleton preferences for the other hospitalsand doctors such that the number of doctorsemployed by h is different for two stablematches

Theorem 9 establishes that the law of aggre-gate demand is not only a sufficient conditionfor the rural hospitals result of Theorem 8 butin a particular sense a necessary one as well

B Truthful Revelation as a DominantStrategy

The main result of this section concerns doc-torsrsquo incentives to report their preferences truth-fully For the doctor-offering algorithm ifhospital preferences satisfy the law of aggregatedemand and the substitutes condition then it isdominant strategy for doctors to reveal truth-fully their preferences over contracts12 We fur-ther show that both preference conditions playessential roles in the conclusion

We will show the positive incentive result forthe doctor-offering algorithm in two stepswhich highlight the different roles of the twopreference assumptions First we show that thesubstitutes condition by itself guarantees thatdoctors cannot benefit by exaggerating the rank-ing of an unattainable contract More preciselyif there exists a preferences list for a doctor dsuch that d obtains contract x by submitting thislist then d can also obtain x by submitting apreference list that includes only contract xSecond we will show that adding the law of

10 A similar example appears in Ruth Martınez et al(2000)

11 These preferences however do not display the ldquosingleimprovement propertyrdquo that Gul and Stacchetti (1999) in-troduce and show is characteristic of substitutes preferencesin models with quasi-linear utility

12 It is of course not a dominant strategy for hospitals totruthfully reveal nor would it be so even if we consideredthe hospital-offering algorithm For further discussion ofthis point see Roth and Sotomayor (1990)

924 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

aggregate demand guarantees that a doctor doesat least as well as reporting truthfully as byreporting any singleton Together these are thedominant strategy result

To understand why submitting unattainedcontracts cannot help a doctor d consider thefollowing Let x be the most-preferred contractthat d can obtain by submitting any preferencelist (holding all other submitted preferencesfixed) Note that all that d accomplishes whenreporting that certain contracts are preferred to xis to make it easier for some coalition to blockoutcomes involving x Thus if x is attainablewith any report it is attainable with the reportPd x that ranks x as the only acceptable con-tract This intuition is captured in the followingtheorem

THEOREM 10 Let hospitalsrsquo preferences sat-isfy the substitutes condition and let the match-ing algorithm produce the doctor-optimalmatch Fixing the preferences of hospitals andof doctors besides d let x be the outcome that dobtains by reporting preferences Pd z1 dz2 d

d zn d x Then the outcome that dobtains by reporting preferences Pd x is also x

Some other doctors may be strictly better offwhen d submits her shorter preference list thereare fewer collections of contracts that d nowobjects to so the core may become larger andthe doctor-optimal point of the enlarged coremakes all doctors weakly better off and maymake some strictly better off

Without the law of aggregate demand how-ever it may still be in a doctorrsquos interest toconceal her preferences for unattainable posi-tions To see this consider the case with twohospitals and three doctors where contracts aresimply elements of D H and let preferences be

(12) Pd1 h1 h2

Ph1 d3 d1 d2 d1 d2

Pd2 h2 h1

Ph2 d1 d2 d3

Pd3 h2 h1

With these preferences the only stable matchis (d1 h2) (d3 h1) which leaves d2 unem-ployed However if d2 were to reverse herranking of the two hospitals then (d1 h1) (d2h1) (d3 h2) would be chosen by the doctor-offering algorithm leaving d2 better off Essen-tially by offering a contract to h2 d2 haschanged the number of positions availableWhen the preferences of the hospitals satisfythe law of aggregate demand however mak-ing more offers to the hospitals (weakly) in-creases the number of contracts the hospitalsaccept

THEOREM 11 Let hospitalsrsquo preferences sat-isfy substitutes and the law of aggregate de-mand and let the matching algorithm producethe doctor-optimal match Then fixing the pref-erences of the other doctors and of all thehospitals let x be the contract that d obtains bysubmitting the set of preferences Pd z1 dz2 d

d zn d x Then the preferences Pd y1 y2 yn x yn131 yN

obtain a contract that is Pd-preferred or indif-ferent to x

According to this theorem when a doctorrsquostrue preferences are Pd the doctor can never dobetter according to these true preferences thanby reporting the preferences truthfully

In fact the law of aggregate demand is ldquoal-mostrdquo a necessary condition as well The excep-tions can arise because certain violations of thelaw of aggregate demand are unobservable fromthe choice data of the algorithm and these can-not affect incentives Thus consider an examplewhere terms t are included in the contract andwhere a hospital h has preferences (d1 ht1) (d1 h t1) (d2 h t2) (d1 h t1) (d2 h t2) Although these preferences violatethe law of aggregate demand the algorithm willnever ldquoseerdquo the violation as either (d1 h t1) d1

(d1 h t1) or (d1 h t1) d1(d1 h t1) Thus

whichever terms that d1 first offers will deter-mine a conditional set of preferences for thehospital that does satisfy the law of aggregatedemand (The hospital will never reject an offerof either (d1 h t1) or (d1 h t1))

The next theorem says that if some hospitalrsquospreferences violate the law of aggregate demandin a way that can even potentially be observed

925VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

from the hospitalrsquos choices then there existpreferences for the other agents such that it isnot a dominant strategy for doctors to reporttruthfully even when the other assumptions wehave used are satisfied

THEOREM 12 Let hospital h have prefer-ences such that Ch(X) Ch(X x) and letthere exist two contracts y z such that yD zD xD yD and y z Rh(X x) Rh(X)Then if another hospital h exists there existsingleton preferences for the hospitals besides hand preferences for the doctors such that it isnot a dominant strategy for all doctors to revealtheir preferences truthfully

Thus to the extent that the law of aggregatedemand for hospital preferences has observableconsequences for the progress of the doctor-offering algorithm it is an indispensable condi-tion to ensure the dominant strategy property fordoctors

IV Classes of Conforming Preferences

Although the class of substitutes valuations isquite limited13 it is broader than the set ofresponsive preferences in useful ways Thesubstitutes valuations accommodate all the af-firmative action and subspecialty constraints de-scribed above and allow a doctorrsquos marginalproduct to depend on which other doctors thehospital attracts

In this section we introduce a parameterizedclass of quasi-linear substitutes valuations forhospitals evaluating sets of new hires The val-uations are based on an endowed assignmentmodel according to which hospitals have a set

of jobs to fill and an existing endowment ofdoctors while doctorsrsquo productivities varyamong jobs A hospital values new doctors ac-cording to the their incremental value in theassignment problem

From a general job assignment perspectivethe key restrictions of endowed assignment val-uations are that each doctor can do one and onlyone job and that the hospitalrsquos output is the sumof outputs of its various jobs A hospital cannotuse one doctor for two jobs nor can it combinethe skills of two doctors in the same job Alsothere is no interaction in the productivity ofdoctors in different jobs Given this mathemat-ical structure if a doctor is lost it will always beoptimal for the hospital to retain all of its otherdoctors although it may choose to reassignsome of the retained doctors to fill vacatedpositions

Another way to describe the set of endowedassignment valuations VEA is to build it upfrom three properties as follows First a sin-gleton valuation is one of the form v(S) maxdSd for some nonnegative vector Sin-gleton valuations represent the possible valua-tions by a hospital with just one opening andVEA includes all singleton valuations Second ifa hospital is composed of two units j 1 2each of which has a valuation vj VEA then thehospitalrsquos maximum value from assigningworkers between its units denoted by (v1 v2)(S) maxRSv1(R) 13 v2(S R) is also inthe set We call this property closure underaggregation Third if a hospitalrsquos value is de-rived from a value in VEA by endowing thehospital with a set of doctors T then the hospi-talrsquos incremental value for extra doctorsv(ST) v(S T) v(T) is also in the set VEAWe call this property closure under endowmentFinally two valuations v1 and v2 are calledequivalent if they differ by an additive con-stant For example for any fixed set of doctorsT v( T) is equivalent to v( T)

THEOREM 13 Let VEA denote the smallestfamily of valuations of sets of doctors that in-cludes all the singleton valuations and is closedunder aggregation and endowment Then foreach v VEA there exists a set of jobs J a setof doctors T and a (D 13 T) J-matrix [ij]such that v is equivalent to the following

13 Hans Reijnierse et al (2002) (see also Yuan-ChuanLien and Jun Yan 2003) have characterized the valuationfunctions that satisfy the substitutes condition as followsLet v(S) be the hospitalrsquos value of doctor set S and letvS(T) v(S T) v(S) denote the incremental value of theset of doctors T Then doctors are substitutes if for every setS and three other doctors d1 d2 and d3 there is no uniquemaximum in vS(d1) 13 vS(d2 d3) vS(d2) 13 vS(d1 d3)vS(d3) 13 vS(d1 d2)

926 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

(13) vSJ T maxz

d S

djzdj subject to

d S

zdj 1 for j J

j J

zdj 1 for d S T0 for d S T

zdj 0 1 for all d j

Conversely for every such J T and v( J T) VEA

We dub this family of valuations the endowedassignment valuations because of the form ofoptimization (13) The family VEA is an exten-sion of the assignment valuations derived byLloyd Shapley (1962) used by Roth (19841985b) in models of matching with wages andexplicit job assignments and emphasized in astudy of package bidding by Lehmann et al(2001) The endowed assignment valuations arequite useful for applications They also fit nicelywith the theory reported in previous sections forthe following reason

THEOREM 14 Every endowed assignmentvaluation v( J T) VEA is a substitutesvaluation

To the best of our knowledge all of thesubstitutes valuations that have been used orproposed for practical applications are includedamong the endowed assignment valuations In-deed the question of whether all substitutesvaluations are endowed assignment valuationsis an open one Here we review some of themost popular valuations to show how they fitinto the class

The most commonly studied class of prefer-ences for matching problems like the Match forwhich employment terms are exogenouslyfixed are the responsive preferences Thesespecify that each hospital h has a fixed numberof openings nh a set of acceptable doctors Dh

A D and a strict ordering h of the acceptabledoctors When a doctor is unacceptable thatmeans that hiring the doctor is always worsethan leaving her position unfilled Given any setof available doctors the hospital hires its nh

most preferred acceptable doctors if that manyare available and otherwise hires all of theacceptable doctors

To map responsive preferences into the as-signment problem framework define a utilityfunction uh D3 to represent h and set theminimum acceptable utility to zero Formally(1) if d d Dh

A then d h dN uh(d) uh(d)and (2) d Dh

AN uh(d) 0 Using this utilitywe specify an assignment problem as followsJ 1 nh and dj uh(d) 13 1 and fix thewage at 1 Using a positive wage is a device toensure that the hospital strictly prefers not tohire a doctor it plans not to assign to any job Itis evident that with this valuation preferencethe hospital most prefers to hire the set of avail-able acceptable doctors with the highest rank-ing according to h

Among the extensions of responsive prefer-ences that have been most important in practiceare ones to accommodate quotas of variouskinds For example one use of quotas is tomanage subspecialties of internal medicine inwhich a certain number of positions are to befilled by doctors planning that subspecialty ifenough acceptable doctors are available Onecan reserve ms jobs for subspecialty s by pro-viding that there are ms jobs in which doctors inthat subspecialty have their productivity in-creased by a large constant M Then if msdoctors in subspecialty s are available at leastthat many will be demanded at the optimalsolution to (13) If that many qualified doctorsare not available the jobs will be filled by otherdoctors according to their productivities

Another use of quotas is for an affirmativeaction policy that absolutely reserves jobs formembers of certain target groups For each af-firmative action group G define a correspond-ing set of jobs JG and let J G JG Specifythat for any doctor d G and job j JG dj uh(d) and otherwise dj 0 One can alsointroduce an unrestricted category of jobs j thatany doctor can fill with productivity dj uh(d) This obviously ensures that a certainnumber of jobs are reserved for each targetgroup

A recent treatment of affirmative action byRoth (1991) extended by Abdulkadiroglu(2003) uses the class of responsive preferenceswith capacity constraints This class requires

927VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

that the set of doctors be partitioned into a finitenumber of affirmative action groups and that foreach group G the hospital has a capacity mG thatlimits the number of doctors who can be hiredfrom that group In addition at most nh doctorsin total can be hired

To represent such preferences using endowedassignment valuations let us specify that thereare mG jobs of type G and yenG mG jobs in totalThe hospital is endowed with nh yenG mGdoctors The endowed doctors have productivityij M in every job where M is a largenumber This ensures that at most nh new doc-tors will be hired at any optimum For thenonendowed doctors we calculate productivi-ties uh(d) in the same fashion as for the respon-sive preferences and set dj uh(d) for jobs j oftype G and dj 0 for all other jobs Thisensures that at most mG doctors will be hiredfrom group G By inspection this specificationrepresents Abdulkadiroglursquos affirmative actionpreferences

Unlike the specifications used for the currentNational Resident Matching Program algo-rithm the endowed assignment valuations per-mit overlapping affirmative action categoriesFor example suppose that a small hospital has atarget of hiring one female and one minoritydoctor In the endowed assignment structurethe hospital may assign a minority female doc-tor to fill either a minority slot or a female slotbut not both This is necessary to retain thesubstitutes demand structure for otherwisemaking a minority female doctor availablecould lead the hospital to hire a nonminoritymale doctor whom it would otherwise reject

Endowed assignment valuations thus providea flexible parameterized way for hospitals torepresent their preferences for matching with orwithout wages using a class of quasi-linear pref-erences that satisfies the substitutes conditionand the law of aggregate demand

V Cumulative Offer Processes and Auctions

The algorithms described by the system (9)with different starting points have the propertythat they can terminate only at a stable set ofcontracts Nevertheless unless preferences sat-isfy the substitutes condition the system is notguaranteed to converge at all even when a fixed

point exists In this section we offer a differentcharacterization of the Gale-Shapley doctor-offering algorithm that will prove especiallywell suited to situations in which contracts maynot be substitutes but in which there is just oneldquohospitalrdquo the auctioneer For now we allowthe possibility that there are several hospitals

The alternative representation is constructedby replacing the system of equations (9) by thefollowing system

(14) XD t X RH XH t 1

XH t XH t 1 CD XD t

We call the algorithm that begins with XD(0) X and XH(0) A and obeys (14) a cumulativeoffer process because the formalism capturesthe idea that hospitals accumulate offers fromdoctors in the set XH(t) and hold their bestchoices CH(XH(t)) from the accumulated setThere is no assumption of consistency imposedon the algorithm so it is possible that severalhospitals are ldquoholdingrdquo contract offers from thesame doctor The corresponding allocation is ofcourse infeasible since each doctor can ulti-mately accept just one contract

At each round t of the cumulative offer pro-cess all doctors make their best offers from theset of not-yet-rejected choices XD(t) but anydoctor d for whom a contract is being heldsimply repeats one of its earlier offers Thusnew offers are made only by doctors who havebeen rejected

To see why this is so let x CH(XH(t)) be acontract that is being held and consider thecorresponding doctor xD d By revealed pref-erence doctor d strictly prefers x to any contractthat she has not yet offered since those con-tracts were available to offer at the time that xwas offered Since drsquos most preferred contractin Xd(t) at the current time must be weaklypreferred to x it must be coincide with one ofdrsquos earlier offers

The second equation of system (14) is the onethat distinguishes the cumulative offer processfrom the system in (9) In the cumulative offerprocess without any assumptions about hospi-talsrsquo preferences XH(t) grows monotonicallyfrom round to round so the sequence of setsconverges In contrast the earlier process was

928 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

guaranteed to converge only when contracts aresubstitutes for the hospitals

When contracts are substitutes the two sys-tems of equations are equivalent

THEOREM 15 Suppose that contracts aresubstitutes for the hospitals and that XD(0) Xand XH(0) A Then the sequences of pairs(XD(t) XH(t)) generated by the two laws ofmotion (9) and (14) are identical

Even with the initial condition XD(0) X andXH(0) A the algorithms described by (9) and(14) may differ when contracts are not substi-tutes In that case by inspection of the system(14) the cumulative offer process still con-verges because XH(t) is bounded by the finiteset X and grows monotonically from round toround What is at issue is whether the hospitalrsquoschoice from its final search set in the cumulativeoffer process is a feasible and stable set ofcontracts

We will find below that when there is a singlehospital the outcome is indeed a feasible andstable set of contracts In that case the cumu-lative offer process coincides with the general-ized proxy auction of Ausubel and Milgrom(2002) Those authors analyze in detail the casewhen a bid consists of a price and a subset of theset of goods that the bidder wishes to buy Ateach round the seller ldquoholdsrdquo the collection ofbids that maximizes its total revenues subject tothe constraint that each good can be sold onlyonce The generalized proxy auction howeveris not limited to the sale of goods and in fact isidentical in scope to our present model ofmatching with contracts In particular the auc-tioneer may impose a variety of constraints onthe feasible collections of bids and may weighnonprice factors either exclusively or in com-bination with prices to decide which collectionof bids to hold Bidders for their part maymake bids that include factors besides price andmay not include price at all

To illustrate the role of general contracts inthis auction setting consider the auction designsuggested by Paul Brewer and Charles Plott(1996) in which bidders seek to buy access to arailroad track In that application a bid specifiesa trainrsquos direction of travel departure and ar-rival times and price offered It is assumed that

trains travel at a uniform speed along the trackIn this setting the contract terms must includethe direction and the two times and the seller isconstrained to hold only combinations of bidssuch that trains maintain safe distances fromone another at all times

A second example of the generalized proxyprocess is a procurement auction in which thebuyer scores suppliers on the basis of suchfactors as quality excess capacity credit ratingand historical reliability as well as price and inwhich the buyer prefers to set aside someamount of its purchase for minority contractorsor to maintain geographic diversity of supply toreduce the chance of supply disruptions In anasset sale the seller may weigh the probabilitythat the sale will be completed for example dueto financing contingencies or because a union orantitrust regulators must approve the sale

The cumulative offer process model withgeneral contracts accommodates all of thesepossibilities The auctioneer in the model cor-responds to a single ldquohospitalrdquomdashhereafter theauctioneermdashwith a choice function CH thatselects her most preferred collection of contractproposals We have the following result (whichis first stated using different notation than in theAusubel-Milgrom paper)

THEOREM 16 When the doctor-offering cu-mulative offer process with a single hospitalterminates at time t with outcome (XD(t) XH(t))the hospitalrsquos choice CH(XH(t)) is a stable col-lection of contracts

Cumulative offer processes connect the the-ory of matching with contracts to the emergingtheory of package auctions and auctions withcomplex constraints

VI Conclusion

We have introduced a general model ofmatching with bilateral contracts that encom-passes and extends two-sided matching modelswith and without money and certain auctionmodels The new formulation allows some con-tract terms to be exogenously fixed and others tobe endogenous in any combinations In thisvery general framework we characterize stable

929VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

collections of contracts in terms of the solutionto a certain system of equations

The key to the analysis is to extend twoconcepts of demand theory to models with orwithout prices The first concept to be extendedis the notion of substitutes Our definition ap-plies essentially the Roth-Sotomayor substitut-able preferences condition to a more generalclass of contracts contracts are substitutes ifwhenever the set of feasible bilateral contractsexpands the set of contracts that the firm rejectsalso expands We show that (a) our definitioncoincides with the usual demand theory condi-tion when both apply (b) when contracts aresubstitutes a stable collection of contracts ex-ists and (c) if any hospital or firm has prefer-ences that are not substitutes then there arepreferences with single openings for each otherfirm such that no stable allocation exists Wefurther show that when the substitute conditionapplies (a) both the doctor-offering and hospi-tal-offering Gale-Shapley algorithms can berepresented as iterated operations of the sameoperator (starting from different initial condi-tions) and (b) starting at a stable allocationfrom which a doctor retires a natural marketdynamic mimics the Gale-Shapley process tofind a new stable allocation

The second relevant demand theory conceptis the law of demand which we extend both toinclude heterogeneous inputs and to encompassmodels with or without prices The law of ag-gregate demand condition holds that when theset of feasible contracts expands the number ofcontracts that the firm chooses to sign weaklyincreases In terms of traditional demand theorythis means that for example when the wages ofsome of a heterogeneous group of workers fallsif the workers are substitutes then the totalnumber of workers employed rises We showthat (a) when inputs are substitutes the choicesof a profit-maximizing firmhospital satisfy thelaw of aggregate demand Moreover when thechoices of every hospitalfirm satisfy the law ofaggregate demand and the substitutes conditionthen (b) the set of workersdoctors employed isthe same at every stable allocation (c) the num-ber employed by each firmhospital is also thesame and (d) truthful reporting is a dominantstrategy for doctors in the doctor-offering algo-rithm Moreover we prove (e) that if the law of

aggregate demand fails in any potentially ob-servable way then the preceding dominantstrategy property does not hold

For these results to be useful for practicalmechanism design one needs to account forhow preferences especially hospital prefer-ences are to be reported to the mechanismThere needs to be a convenient way for hospi-tals to express a rich array of preferences andone needs to know whether the preferences be-ing reported actually satisfy the conditions ofthe various theorems Toward that end we in-troduce a parametric form that we call extendedassignment valuations which strictly general-izes several existing specifications and whichalways satisfies both the substitutes and law ofaggregate demand conditions

Finally we introduce an alternative treatmentof the doctor-offering algorithm the cumulativeoffer process We show that when contracts aresubstitutes the previously characterized doctor-offering algorithm coincides exactly with a cu-mulative offer process When contracts are notsubstitutes but there is just one hospital (theldquoauctioneerrdquo) the cumulative offer process co-incides with the Ausubel-Milgrom ascendingproxy auction This identity clarifies the con-nection between these algorithms and com-bined with the dominant strategy theoremreported above generalizes the Ausubel-Milgromdominant strategy theorem for the proxyauctions

Our new approach reveals deep similaritiesamong several of the most successful auctionand matching designs in current use and amongthe environmental conditions in which theoret-ically the mechanisms should perform at theirbest Understanding these similarities can helpus to understand the limitations of these mech-anisms paving the way for new designs

APPENDIX

PROOF OF THEOREM 1Let (XD XH) X2 be a solution to (3) Then

XD XH XD RD(XD) CD(XD) andsimilarly XH XD XH RH(XH) CH(XH)so XH XD CH(XH) CD(XD)

Next we show that X XH XD is a stableset of contracts Since X CH(XH) CD(XD)it follows by revealed preference that X

930 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

CH(X) CD(X) so condition (i) of the defi-nition of stability is satisfied

Consider any hospital h and set of contractsX CD(X X) naming hospital h Since X CD(XD) revealed preference of the doctorsimplies that X XD CD(XD) and hence thatX RD(XD) X XD RD(XD) CD(XD) RD(XD) A Thus X X RD(XD) XHby (3) So if X Ch(X) then by the revealedpreference of hospital h X h Ch(XH) Ch(X) Hence X Ch(X X) so condition(ii) is satisfied So the set of contracts X isunblocked

For the converse suppose that X is a stablecollection of contracts Then CD(X) X LetXH be the set of contracts that the doctorsweakly prefer to X and XD the set of contractsthat doctors weakly disprefer By constructionX XH X XD X is a partition of X

To obtain (3) observe first that if there issome h such that Ch(XH) Xh then X Ch(XH) violates stability condition (ii) SoCh(XH) Xh for all h that is CH(XH) X Itfollows that X RH(XH) X (XH X) X (X XD) XD and that X RD(XD) X (XD CD(XD)) X (XD X) XH

Hence (XD XH) satisfies (3) and XH XD X

PROOF OF THEOREM 2Let i j ( j wj) C(w) and wi wi Define

Z(w) ( j wj)wj wj Then Z(wi wi) Z(w) If contracts are substitutes then R(Z(wiwi)) R(Z(w)) By (6) since ( j wj) C(w)it follows that ( j wj) C(Z(w)) so ( j wj) R(Z(w)) Hence ( j wj) R(Z(wi wi)) So ( jwj) Z(wi wi) R(Z(wi wi)) C(Z(wiwi)) and thus (j wj) C(wi wi) by assumption(6) Thus C satisfies demand theory substitutes

Conversely suppose contracts are not substi-tutes Then there exists a set X an element (iwi) X and ( j wj) R(X) such that ( j wj) R(X) where X X (i wi) Using (6)wi Wi(X) Let w W(X) and wi Wi(X)Then wi wi and ( j wj) C(w) but ( j wj) C(wi wi) so C does not satisfy the demandtheory substitutes condition

PROOF OF THEOREM 5We may limit attention to the case with

exactly two hospitals by specifying that

the doctors find the other hospitals to beunacceptable

Suppose Rh is not isotone Then there existssome x y X and X X such that for all x X xH h and such that x Rh(X) Rh(X y) By construction since x y Ch(X y) contracts x and y specify different doctorssay d1 xD yD d2 Let x and y denote thecorresponding contracts for doctors d1 and d2 inwhich hospital h is substituted for h

We specify preferences as follows first forhospital h we take x h y h A and allother contracts are unacceptable Second doc-tors in xD(CH(X) CH(X y)) d1 d2prefer their elements of CH(X) CH(X y)to any other contract Third d1 has x d1

x and ranks all other contracts lower Fourthd2 has y d2

y and ranks all other con-tracts lower Finally the remaining doctors findall contracts from hospitals h and h to beunacceptable

Consider a feasible acceptable allocation Xsuch that y X Since h and d2 can have onlyone contract in X x y X Then hrsquos con-tracts in X form a subset of X so x is notincluded and d1 has a contract less preferredthan x Then the deviation by (d1 h) to xblocks X

Consider a feasible acceptable allocation Xsuch that y X Then either x y X or Xis blocked by a coalition including h d1 and d2using the contracts x and y However if x y X then a deviation by (d2 h) to contract yblocks X

Since all feasible allocations are blockedthere exists no stable set of contracts

PROOF OF THEOREM 7Suppose X D H W and let Z(w) ( j

wj)wj wj Then the law of aggregate de-mand is the statement that for any wage vectorsw w satisfying w w such that the choices setsare singletons C(Z(w)) C(Z(w)) The proofis by contradiction Suppose the law of aggre-gate demand does not hold Then there exists awage vector w and a doctor d such that for some(and hence all) 0 C(Z(wd 13 wd)) C(Z(wd wd)) Since hrsquos preferences arequasi-linear changing doctor drsquos wage can af-fect the hiring of other doctors only if it affectsthe hiring of doctor d It follows that there are

931VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

exactly two optimal choices for the hospital atwage vector w these are C(Z(wd wd)) atwhich doctor d is hired and C(Z(wd 13 wd))at which d is not hired but such that two otherdoctors are hired that is there exist doctors dd C(Z(wd 13 wd)) C(Z(wd wd))Let the corresponding payoff for the hospital(when faced with wage vector w) be

Consider the wage vector w (wd wd 2 wdd) For positive and suffi-ciently small the hospitalrsquos payoff at wage vec-tor w is 13 2 if it chooses C(Z(wd 13 wd))and it is 13 if it chooses C(Z(wd wd))and one of these choices must be optimal SoC(w) C(Z(wd 13 wd)) But then raisingthe wage of doctor d from wd 2 to wd whileholding the other wages at wd reduces the de-mand for doctor d from one to zero in violationof the demand theory substitutes condition

PROOF OF THEOREM 8By definition XD X D so by revealed pref-

erence Cd(X D) Cd(XD) Also X H XH soby the law of aggregate demand Ch(X H) Ch(XH) By Theorem 1 CD(XD) CH(XH)and CD(X D) CH(X H) so yendD Cd(XD) yenhH Ch(XH) and yendD Cd(XD) yenhH Ch(XH)Combining these leads to yendD Cd(X D) yendD Cd(XD) yenhH Ch(XH) yenhH Ch(XH) yendD Cd(XD) which begins and ends with the samesum Hence none of the inequalities can bestrict

PROOF OF THEOREM 9Since Ch(X) Ch(X) there exists some

set Y X Y X and contract x such thatCh(Y) Ch(Y x) Since x Ch(Y x)(as otherwise Ch(Y) Ch(Y x) for thepreferences to be rationalizable) there must ex-ist two contracts y z Rh(Y x) Rh(Y)such that y x z y Moreover since y z Ch(Y) yD zD

Denoting by h the second hospital whose exis-tence is hypothesized by the theorem we specifypreferences as follows Let all the doctors with con-tracts in Y have those contracts be their most favoredand let all other doctors find any contract with hunacceptable Let all doctors find any contract notinvolving hospital h or h to be unacceptable

In principle there are three casesIf xD yD then let PxD

y x and PzD z

Then there exist two stable matches Ch(Y x) and Ch(Y) with zD employed in the firstmatch but not in the second

The case xD zD is symmetricFinally if yD xD zD then let x y z

denote contracts with hospital h where the doc-tors (and any other terms) are the same as in xy z respectively Specify the remaining prefer-ences by PxD

x x PyD y y PzD

z z and Ph y x A z Thenthere exist two different stable matches x Ch(Y) and y Ch(Y x) with zD em-ployed in the first match but not in the second

PROOF OF THEOREM 10Let X denote the collection of contracts cho-

sen by the algorithm when doctor d submitspreference Pd If this collection which is stableunder the reported preferences is not stableunder Pd then there exists a blocking coalitionThis blocking coalition must contain d as noother doctorrsquos preferences have changed butthat is impossible since x is drsquos favorite con-tract according to the preferences Pd Since X isstable under Pd the doctor-optimal stable matchunder Pd (the existence of which is guaranteedby Theorem 2) must make every doctor(weakly) better off than at X In particulardoctor d must obtain x

PROOF OF THEOREM 11From Theorem 10 Pd x also obtains x

Hence by the rural hospitals theorem d is em-ployed at every point in the core when Pd x issubmitted So every allocation X at which d isunemployed is blocked by some coalition andset of contracts when d submits Pd Conse-quently if d submits the preferences Pd y1 y2 yn x then every allocation at whichd is unemployed is still blocked by the samecoalition and set of contracts Since the doctor-best stable allocation is one at which d gets aPd-acceptable contract that allocation is weaklyPd-preferred to x Finally the doctor-optimalmatch when Pd is submitted is still the doctor-optimal match when Pd is submitted as drsquospreferences over contracts less preferred than xcannot be used to block a match where shereceives a contract weakly preferred to x

932 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

PROOF OF THEOREM 12Consider contracts x y and z such that

xD xD yD yD zD zD and xH yH zH h Let the preferences of the three identified bePxD

x x PyD y y and PzD

z z andlet those of h be Ph y z x Forthe other contracts x Y Ch(X) let x be xDrsquosmost favored contract For the remaining doctorslet any contract with h or h be unacceptable

With the preceding preferences the only sta-ble allocation includes contracts x and y leav-ing doctor zD unemployed If however zDmisrepresents her preferences and reports PzD

z z then the doctor-optimal stable matchincludes z leaving doctor zD better off

PROOF OF THEOREM 13Setting J 1 and T A it is clear by

inspection that this family includes all singletonvaluations

The family is closed under endowment be-cause given any such valuation v( J T)endowing a set of doctors T simply creates thevaluation v( J T T))

To verify that the family is closed underaggregation consider any two valuations v( J T) and v( J T) Since J and T are justindex sets we may assume without loss ofgenerality that T T J J A DefineT T T and J J J Let

(15) ij ij if i D T j Jij if i D T j J0 otherwise

By inspection of the optimization problems v( J T) v( J T) v( J T)

For the converse consider the valuation v( J T) given by (13) We derive it construc-tively from the singleton valuations aggrega-tion and endowment as follows Let vj be thesingleton valuation associated with row j inmatrix [ij] for j 1 J Since VEA isclosed under aggregation v1 vJ v( J A) VEA Since VEA is also closed underendowment we may endow the doctors in T toobtain v( J T) VEA

PROOF OF THEOREM 14L Shapley (1962) (see also Lehmann et al

2001) had already proved that every assignment

valuation without endowments v( J A) is asubstitutes valuation Ausubel and Milgrom(2002) prove that a valuation v is a substitutesvaluation if and only if the corresponding indi-rect profit function ((p) v(S) yendS pd) issubmodular Let be the indirect profit func-tion corresponding to v( J A) Then theindirect profit function corresponding to v( J T) is (p1 pN) (p1 pN 0 0)Since is the profit function of the substitutesvaluation vh it is submodular and hence issubmodular as well

PROOF OF THEOREM 15Suppose that contracts are substitutes for the

hospitals We proceed by induction The initialcondition specifies that the sequences are iden-tical through time t 0 Denote the sequencecorresponding to the cumulative offer processby a superscript C and denote the alternativeprocess defined by (9) with no superscript As-sume the inductive hypothesis that the se-quences are the same up to round t 1 andsuppress the corresponding superscripts for thevalues at that round Then XD(t) X RH(XH(t 1)) XD

C(t) This also implies that

(16) X XH t 1 XD t

To complete the proof we must show thatXH

C(t) XH(t) or equivalently that XH(t 1) CD(XD(t)) X RD(XD(t))

For t 2 XHC(t 2) XH

C(t 1) by con-struction so by the inductive hypothesis XH(t 2) XH(t 1) Since contracts are substitutesRH is isotone so X RH(XH(t 1)) X RH(XH(t 2)) and hence XD(t) XD(t 1)For t 1 the inclusion XD(t) XD(t 1) isimplied by the initial condition XD(0) X

Recall that by revealed preference RD isisotone It follows that RD(XD(t)) RD(XD(t 1)) and hence using (9) that XH(t 1) X RD(XD(t 1)) X RD(XD(t)) XH(t) ThusXH(t 1) XH(t 1) (X RD(XD(t))) XH(t 1) RD(XD(t)) So XH(t 1) CD(XD(t)) XH(t 1) (XD(t) RD(XD(t))) (XH(t 1) RD(XD(t))) (XD(t) RD(XD(t))) (XH(t 1) XD(t)) RD(XD(t)) X RD(XD(t)) where the last stepequality follows from (16)

933VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

PROOF OF THEOREM 16By construction any contract not in XH(t) is

less preferred by some doctor d than everycorresponding contract in XH(t) (because doctord offers her most preferred contracts in se-quence) So any collection of contracts thatincludes some not in XH(t) must be strictly lesspreferred by one of the doctors Any profitablecoalitional deviation must use only contracts inXH(t)

By construction the one hospitalauctioneermust be part of any deviating coalition andCH(XH(t)) is its strictly most preferred collectionof contracts in XH(t) so there is no profitablecoalitional deviation using just contracts in XH(t)

REFERENCES

Abdulkadiroglu Atila ldquoCollege Admissionswith Affirmative Actionrdquo Unpublished Pa-per 2003

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoBoston Public School MatchingrdquoAmerican Economic Review 2005a (Papersand Proceedings) 95(2) pp 368ndash71

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoThe New York City High SchoolMatchrdquo American Economic Review 2005b(Papers and Proceedings) 95(2) pp 364ndash67

Abdulkadiroglu Atila and Sonmez TayfunldquoSchool Choice A Mechanism Design Ap-proachrdquo American Economic Review 200393(3) pp 729ndash47

Adachi Hiroyuki ldquoOn a Characterization of Sta-ble Matchingsrdquo Economics Letters 200068(1) pp 43ndash49

Alkan Ahmet and Gale David ldquoStable ScheduleMatching under Revealed Preferencerdquo Jour-nal of Economic Theory 2003 112(2) pp289ndash306

Ausubel Lawrence M Cramton Peter and Mil-grom Paul R ldquoThe Clock-Poxy Auction APractical Combinatorial Auction Designrdquo inPeter Cramton Yoav Shoham and RichardSteinberg eds Combinatorial auctionsCambridge MA MIT Press 2005 ch 5

Ausubel Lawrence M and Milgrom Paul RldquoAscending Auctions with Package Bid-dingrdquo Frontiers of Theoretical Economics2002 1(1) Article 1

Blum Yosef Roth Alvin E and Rothblum UrielG ldquoVacancy Chains and Equilibration in Se-nior-Level Labor Marketsrdquo Journal of Eco-nomic Theory 1997 76(2) pp 362ndash411

Brewer Paul J and Plott Charles R ldquoA BinaryConflict Ascending Price (Bicap) Mechanismfor the Decentralized Allocation of the Rightto Use Railroad Tracksrdquo International Jour-nal of Industrial Organization 1996 14(6)pp 857ndash86

Bulow Jeremy and Levin Jonathan ldquoMatchingand Price Competitionrdquo Stanford UniversityStanford Economics Working Paper No1818 2003

Cramton Peter Shoham Yoav and SteinbergRichard Combinatorial auctions Cam-bridge MA MIT Press (forthcoming)

Crawford Vincent P and Knoer Elsie M ldquoJobMatching with Heterogeneous Firms andWorkersrdquo Econometrica 1981 49(2) pp437ndash50

Demange Gabrielle and Gale David ldquoThe Strat-egy Structure of Two-Sided Matching Mar-ketsrdquo Econometrica 1985 53(4) pp 873ndash88

Dubins Lester and Freedman David ldquoMachia-velli and the Gale-Shapley Algorithmrdquo Na-val Research Logistics Quarterly 198188(7) pp 485ndash94

Echenique Federico and Oviedo Jorge ldquoCoreMany-to-One Matchings by Fixed-PointMethodsrdquo Journal of Economic Theory2004 115(2) pp 358ndash76

Fleiner Tamas ldquoA Fixed-Point Approach toStable Matchings and Some ApplicationsrdquoMathematics of Operations Research 200328(1) pp 103ndash26

Gale David and Shapley Lloyd ldquoCollege Ad-missions and the Stability of MarriagerdquoAmerican Mathematical Monthly 196269(1) pp 9ndash15

Gul Faruk and Stacchetti Ennio ldquoWalrasianEquilibrium with Gross Substitutesrdquo Journalof Economic Theory 1999 87(1) pp 95ndash124

Kelso Alexander and Crawford Vincent P ldquoJobMatching Coalition Formation and GrossSubstitutesrdquo Econometrica 1982 50(6) pp1483ndash504

Lehmann Benny Lehmann Daniel and NisanNoam ldquoCombinatorial Auctions with De-

934 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

creasing Marginal Utilityrdquo Games and Eco-nomic Behavior 2005 (forthcoming)

Lien Yuan-Chuan and Yan Jun ldquoOn the GrossSubstitutes Conditionrdquo Unpublished Paper2003 httpwwwstamfordeduyclienTerm_Paper_Lien_Yanpdf

Martınez Ruth Masso Jordi Neme Alejandroand Oviedo Jorge ldquoSingle Agents and the Setof Many-to-One Stable Matchingsrdquo Journalof Economic Theory 2000 91(1) pp 91ndash105

Milgrom Paul R Putting auction theory towork Cambridge Cambridge UniversityPress 2004

Milgrom Paul R ldquoPutting Auction Theory toWork The Simultaneous Ascending Auc-tionrdquo Journal of Political Economy 2000108(2) pp 245ndash72

Porter David Rassenti Stephen RoopnarineAnil and Smith Vernon ldquoCombinatorial Auc-tion Designrdquo Proceedings of the NationalAcademy of Sciences 2003 100(19) pp11153ndash57

Reijnierse Hans van Gellekom Anita and PottersJos A M ldquoVerifying Gross SubstitutabilityrdquoEconomic Theory 2002 20(4) pp 767ndash76

Roth Alvin E ldquoThe Economics of Matching Sta-bility and Incentivesrdquo Mathematics of Opera-tions Research 1982 7(4) pp 617ndash28

Roth Alvin E ldquoStability and Polarization ofInterests in Job Matchingrdquo Econometrica1984 52(1) pp 47ndash57

Roth Alvin E ldquoThe College Admissions Prob-lem Is Not Equivalent to the Marriage Prob-lemrdquo Journal of Economic Theory 1985a36(2) pp 277ndash88

Roth Alvin E ldquoConflict and Coincidence ofInterest in Job Matching Some New Resultsand Open Questionsrdquo Mathematics of Oper-ations Research 1985b 10(3) pp 379ndash89

Roth Alvin E ldquoOn the Allocation of Residentsto Rural Hospitals A General Property ofTwo-Sided Matching Marketsrdquo Economet-rica 1986 54(2) pp 425ndash27

Roth Alvin E ldquoA Natural Experiment in theOrganization of Entry-Level Labor MarketsRegional Markets for New Physicians andSurgeons in the United Kingdomrdquo AmericanEconomic Review 1991 81(3) pp 415ndash40

Roth Alvin E and Peranson Elliott ldquoThe Rede-sign of the Matching Market for AmericanPhysicians Some Engineering Aspects ofEconomic Designrdquo American Economic Re-view 1999 89(4) pp 748ndash80

Roth Alvin E and Sotomayor Marilda Two-sided matching A study in game-theoreticmodeling and analysis Cambridge Cam-bridge University Press 1990

Sen Amartya Collective choice and social wel-fare San Francisco Holden-Day Inc 1970

Shapley Lloyd ldquoComplements and Substitutesin the Optimal Assignment Problemrdquo NavalResearch Logistics Quarterly 1962 9(1) pp45ndash48

935VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

Page 4: Matching with Contracts - Stanford Universityweb.stanford.edu/~milgrom/publishedarticles/Matching with... · 2005. 10. 22. · Gale-Shapley matching algorithm. Hence, the Gale-Shapley

demand verifies that it holds for a profit-maximizing firm when inputs are substitutesand explores its consequences When both thesubstitutes and the law of aggregate demandconditions are satisfied then (a) the set of work-ers employed and the set of jobs filled is thesame at every stable collection of contracts and(b) it is a dominant strategy for doctors (orworkers or students) to report their preferencestruthfully in the doctor-offering version of theextended Gale-Shapley algorithm We alsodemonstrate the necessity of a weaker versionof the law of aggregate demand for theseconclusions

Our conclusion about this dominant strategyproperty substantially extends earlier findingsabout incentives in matching The first suchresults due to Lester Dubins and David Freed-man (1981) and Roth (1982) established thedominant strategy property for the marriageproblem which is a one-to-one matching prob-lem that is a special case of the college admis-sions problem Similarly Gabrielle Demangeand Gale (1985) establish the dominant strategyproperty for the worker-firm matching problemin which each firm has singleton preferencesThese results generalize to the case of respon-sive preferences that is to the case where eachhospital (or college or firm) behaves just thesame as a collection of smaller hospitals withone opening each For the college admissionsproblem Abdulkadiroglu (2003) has shown thatthe dominant strategy property also holds whencolleges have responsive preferences with ca-pacity constraints where the constraints limitthe number of workers of a particular type thatcan be hired All of these models with a domi-nant strategy property satisfy our substitutesand law of aggregate demand conditions so theearlier dominant strategy results are all sub-sumed by our new result

In Section IV we introduce a new parame-terized family of preferencesmdashthe endowed as-signment preferencesmdashand show that theysubsume certain previously identified classesand satisfy both the substitutes and law of ag-gregate demand conditions

Section V introduces cumulative offer pro-cesses as an alternative auctionmatching algo-rithm and shows that when contracts aresubstitutes it coincides with the doctor-offering

algorithm of the previous sections Since theAusubel-Milgrom proxy auction is also a cumu-lative offer process our dominant strategy con-clusion of Section III implies an extension ofthe Ausubel-Milgrom dominant strategy resultWhen contracts are not substitutes the cumula-tive offer process can converge to an infeasibleallocation We show that if there is a singlehospitalauctioneer however the cumulativeoffer process converges to a feasible stableallocation without restrictions on the hospitalrsquospreferences Section VI concludes All proofsare in the Appendix

I Stable Collections of Contracts

The matching model without transfers hasmany applications of which the best knownamong economists is the match of doctors tohospital residency programs in the UnitedStates For the remainder of the paper we de-scribe the match participants as ldquodoctorsrdquo andldquohospitalsrdquo These groups play the same respec-tive roles as students and colleges in the collegeadmissions problem and workers and firms inthe Kelso-Crawford labor market model

A Notation

The sets of doctors and hospitals are denotedby D and H respectively and the set of con-tracts is denoted by X We assume only thateach contract x X is bilateral so that it isassociated with one ldquodoctorrdquo xD D and oneldquohospitalrdquo xH H When all terms of employ-ment are fixed and exogenous the set of con-tracts is just the set of doctor-hospital pairs X D H For the Kelso-Crawford model a con-tract specifies a firm a worker and a wage X D H W

Each doctor d can sign only one contract Herpreferences over possible contracts includingthe null contract A are described by the totalorder d The null contract represents unem-ployment and contracts are acceptable or un-acceptable according to whether they are morepreferred than A When we write preferences asPd x d y d z we mean that Pd names thepreference order of d and that the listed con-tracts (in this case x y and z) are the onlyacceptable ones

916 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

Given a set of contracts X X offered in themarket doctor drsquos chosen set Cd(X) is eitherthe null set if no acceptable contracts are of-fered or the singleton set consisting of the mostpreferred contract We formalize this as follows

(1) Cd X

A if x XxD d x d A Amaxd

x XxD d otherwise

The choices of a hospital h are more compli-cated because it has preferences h over sets ofdoctors Its chosen set is a subset of the con-tracts that name it that is Ch(X) x XxH h In addition a hospital can sign onlyone contract with any given doctor

(2) h H X X x x ChXx

xf xD xD

Let CD(X) dD Cd(X) denote the set ofcontracts chosen by some doctor from set XThe remaining offers in X are in the rejectedset RD(X) X CD(X) Similarly the hos-pitalsrsquo chosen and rejected sets are denoted byCH(X) hH Ch(X) and RH(X) X CH(X)

B Stable Allocations Stable Sets ofContracts

In our model an allocation is a collection ofcontracts as that determines the payoffs to theparticipants We study allocations such thatthere is no alternative allocation that is strictlypreferred by some hospital and weakly pre-ferred by all of the doctors that it hires and suchthat no doctor strictly prefers to reject his con-tract It is a standard observation in matchingtheory that such an allocation is a core alloca-tion in the sense that no coalition of hospitalsand doctors can find another allocation feasiblefor them that all weakly prefer and somestrictly prefer This allocation is also a stableallocation in the sense that there is no coalitionthat can deviate profitably even if the deviatingcoalition assumes that outsiders will remainwilling to accept the same contracts

We formalize the notion of stable allocationsas follows

DEFINITION A set of contracts X X is astable allocation if

(i) CD(X) CH(X) X and(ii) there exists no hospital h and set of con-

tracts X Ch(X) such that

X Ch X X CD X X

If condition (i) fails then some doctor orhospital prefers to reject some contract thatdoctor or hospital then blocks the allocation Ifcondition (ii) fails then there is an alternativeset of contracts that a hospital strictly prefersand that its corresponding doctors weakly prefer

The first theorem states that a set of contractsis stable if any alternative contract would berejected by some doctor or some hospital fromits suitably defined opportunity set In the for-mulas below think of the doctorsrsquo opportunityset as XD and the hospitalsrsquo opportunity set asXH If X is the corresponding stable set then XDmust include in addition to X all contracts thatwould not be rejected by the hospitals and XHmust similarly include X and all contracts thatwould not be rejected by the doctors If X isstable then every alternative contract is rejectedby somebody so X XH XD This logic issummarized in the first theorem

THEOREM 1 If (XD XH) X2 is a solution tothe system of equations

(3) XD X RH XH

and

XH X RD XD

then XH XD is a stable set of contracts andXH XD CD(XD) CH(XH) Conversely forany stable collection of contracts X there ex-ists some pair (XD XH) satisfying (3) such thatX XH XD

Theorem 1 is formulated to apply to generalsets of contracts It is the basis of our analysis of

917VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

stable sets of contracts in the entire set of mod-els treated in this paper

II Substitutes

In this section we introduce our first restric-tion on hospital preferences which is the re-striction that contracts are substitutes We usethe restriction to prove the existence of a stableset of contracts and to study an algorithm thatidentifies those contracts

Our substitutes condition generalizes theRoth-Sotomayor substitutable preferences con-dition to preferences over contracts In wordsthe substitutable preferences condition statesthat if a contract is chosen by a hospital fromsome set of available contracts then that con-tract will still be chosen from any smaller setthat includes it Our substitutes condition issimilarly defined as follows

DEFINITION Elements of X are substitutesfor hospital h if for all subsets X X X wehave Rh(X) Rh(X)4

In the language of lattice theory which weuse below elements of X are substitutes forhospital h exactly when the function Rh isisotone

In demand theory substitutes is defined by acomparative static that uses prices It says thatlimiting attention to the domain of wage vectorsat which there is a unique optimum for thehospital the hospitalrsquos demand for any doctor dis nondecreasing in the wage of each otherdoctor d

Our next result verifies that for resource al-location problems involving prices our defini-tion of substitutes coincides with the standarddemand theory definition For simplicity wefocus on a single hospital and suppress its iden-tifier h from our notation Thus imagine that ahospital chooses doctorsrsquo contracts from a sub-set of X D W where D is a finite set of

doctors and W w w is a finite set ofpossible wages Assume that the set of wages Wis such that the hospitalsrsquo preferences are al-ways strict Suppose that w max W is aprohibitively high wage so that no hospital everhires a doctor at wage w

In demand theory it is standard to representthe hospitalrsquos market opportunities by a vectorw WD that specifies a wage wd at whicheach doctor can be hired We can extend thedomain of the choice function C to allow marketopportunities to be expressed by wage vectorsas follows

(4) w WDf Cw Cd wdd D

Formula (4) associates with any wage vector wthe set of contracts (d wd)d D and definesC(w) to be the choice from that set

With the choice function extended this waywe can now describe the traditional demandtheory substitutes condition The condition as-serts that increasing the wage of doctor d fromwd to wd (weakly) increases demand for anyother doctor d

DEFINITION C satisfies the demand-theorysubstitutes condition if (i) d d (ii) (dwd) C(w) and (iii) wd wd imply that (dwd) C(wd wd)

To compare the two conditions we need tobe able to assign a vector of wages to each setof contracts X It is possible that in X somedoctor is unavailable at any wage or is available atseveral different wages For a profit-maximizinghospital the doctorrsquos relevant wage is the low-est wage if any at which she is availableMoreover such a hospital does not distinguishbetween a doctor who is unavailable and onewho is available only at a prohibitively highwage Thus from the perspective of a profit-maximizing hospital having contracts X avail-able is equivalent to facing a wage vector W(X)specified as follows

(5) Wd X minss w or d s X

In view of the preceding discussion a profit-maximizing hospitalrsquos choices must obey thefollowing identity

4 This condition is identical in form to the ldquoconditionalphardquo used in the study of social choice for example byAmartya Sen (1970) but the meanings of the choice sets aredifferent In Senrsquos model the choice set is a collection ofmutually exclusive choices whereas in the matching prob-lems the set describes the choice itself

918 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

(6) CX CWX

THEOREM 2 Suppose that X D W is afinite set of doctor-wage pairs and that (6)holds Then C satisfies the demand theory sub-stitutes condition if and only if its contracts aresubstitutes

In particular this shows that the Kelso-Crawford ldquogross substitutesrdquo condition is sub-sumed by our substitutes condition

A A Generalized Gale-Shapley Algorithm

We now introduce a monotonic algorithmthat will be shown to coincide with the Gale-Shapley algorithm on its original domain Todescribe the monotonicity that is found in thealgorithm let us define an order on X X asfollows

(7) XD XH XD XH

N XD XD and XH XH

With this definition (X X ) is a finitelattice

The generalized Gale-Shapley algorithm isdefined as the iterated applications of a certainfunction F X X3 X X as defined below

(8) F1 X X RH X

F2 X X RD X

FXD XH F1 XH F2 F1 XH

As we have previously observed since the doc-torsrsquo choices are singletons a revealed prefer-ence argument establishes that the function RD X3 X is isotone If the contracts are substitutesfor the hospitals then the function RH X 3 Xis isotone as well When both are isotone thefunction F (X X ) 3 (X X ) isalso isotone that is it satisfies ((XD XH) (XD XH)) f (F(XD XH) F(XD XH))

Thus F X X 3 X X is an isotonefunction from a finite lattice into itself Usingfixed point theory for finite lattices the set offixed points is a nonempty lattice and iterated

applications of F starting from the minimumand maximum points of X X converge mono-tonically to a fixed point of F5 We summarizethe particular application here with the follow-ing theorem6

THEOREM 3 Suppose contracts are substi-tutes for the hospitals Then

(a) The set of fixed points of F on X X is anonempty finite lattice and in particularincludes a smallest element (X D X H) and alargest element (X D X H)

(b) Starting at (XD XH) (X A) the general-ized Gale-Shapley algorithm convergesmonotonically to the highest fixed point

X D X H

supX XFX X X X and

(c) Starting at (XD XH) (A X) the general-ized Gale-Shapley algorithm convergesmonotonically to the lowest fixed point

X D X H

infX XFX X X X

The facts that (X D X H) is the highest fixedpoint of F and that (X D X H) is the lowest in thespecified order mean that for any other fixedpoint (XD XH) X D XD X D and X H XH X H Because doctors are better off when theycan choose from a larger set of contracts it

5 This special case of Tarskirsquos fixed point theorem can besimply proved as follows Let Z be a finite lattice withmaximum point z Let z0 z z1 F(z0) zn F(zn1)Plainly z1 z0 and since F is isotone z2 F(z1) F(z0) z1 and similarly zn131 zn for all n So thedecreasing sequence zn converges in a finite number ofsteps to a point z with F( z) z Moreover for any fixedpoint z since z z z Fn( z) Fn(z) z for n large soz is the maximum fixed point A similar argument appliesfor the minimum fixed point

6 Hiroyuki Adachi (2000) and Federico Echenique andJorge Oviedo (2004) have also characterized the Gale-Shapley algorithm for the marriage problem and the collegeadmissions problem respectively as iterated applications ofa certain operator on a lattice See also Tamas Fleiner(2003)

919VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

follows that the doctors unanimously weaklyprefer CD(X D) to CD(XD) to CD(X D) and simi-larly that the hospitals unanimously preferCH(X H) to CH(XH) to CH(X H) Notice byTheorem 1 that CD(X D) CH(X H) X D X H and CD(X D) CH(X H) X D X H sowe have the following welfare conclusion

THEOREM 4 Suppose contracts are substi-tutes for the hospitals Then the stable set ofcontracts X D X H is the unanimously mostpreferred stable set for the doctors and theunanimously least preferred stable set for thehospitals Similarly the stable set X D X H isthe unanimously most preferred stable set forthe hospitals and the unanimously least pre-ferred stable set for the doctors

Theorems 3 and 4 duplicate and extend fa-miliar conclusions about stable matches in theGale-Shapley matching problem and a similarconclusion about equilibrium prices in theKelso-Crawford labor market model Thesenew theorems encompass both these older mod-els and additional ones with general contractterms

To see how the Gale-Shapley algorithm isencompassed consider the doctor-offering al-gorithm As in the original formulation we sup-pose that hospitals have a ranking of doctorsthat is independent of the other doctors they willhire so hospital h just chooses its nh mostpreferred doctors (from among those who areacceptable and have proposed to hospital h)

Let XH(t) be the cumulative set of contractsoffered by the doctors to the hospitals throughiteration t and let XD(t) be the set of contractsthat have not yet been rejected by the hospitalsthrough iteration t Then the contracts ldquoheldrdquo atthe end of the iteration are precisely those thathave been offered but not rejected which arethose in XD(t) XH(t) The process initiateswith no offers having been made or rejected soXD(0) X and XH(0) A

Iterated applications of the operator F de-scribed above define a monotonic process inwhich the set of doctors makes an ever-larger(accumulated) set of offers and the set of unre-jected offers grows smaller round by roundUsing the specification of F and starting fromthe extreme point (X A) we have

(9) XD t X RH XH t 1

XH t X RD XD t

After offers have been made in iteration t 1the hospitalrsquos cumulative set of offers is XH(t 1) Each hospital h holds onto the nh best offersit has received at any iteration provided thatmany acceptable offers have been made other-wise it holds all acceptable offers that havebeen made Thus the accumulated set of re-jected offers is RH(XH(t 1)) and the unre-jected offers are those in X RH(XH(t 1)) XD(t) At round t if a doctorrsquos contract is beingheld then the last offer the doctor made was itsbest contract in XD(t) If a doctorrsquos last offerwas rejected then its new offer is its best con-tract in XD(t) The contracts that doctors havenot offered at this round or any earlier one aretherefore those in RD(XD(t)) So the accumu-lated set of offers doctors have made are thosein X RD(XD(t)) XH(t) Once a fixed point ofthis process is found we have by Theorem 1 astable set of contracts XH(t) XD(t)

To illustrate the algorithm consider a simpleexample with two doctors and two hospitalswhere X D H and agents have the follow-ing preferences

(10) Pd1 h1 h2

Ph1 d1 d2 A

Pd2 h1 h2

Ph2 d1 d2 d1 d2 A

The algorithm is initialized with XD(0) X (d1 h1) (d1 h2) (d2 h1) (d2 h2) andXH(0) A Table 1 applies the operator givenin (9) to illustrate the algorithm

For t 1 starting from XD(1) X bothdoctors choose to work for the hospital h1 sothey reject their contracts with hospital h2 thusRD(XD(1)) (d1 h2) (d2 h2) Next XH(1) iscalculated as the complement of RD(XD(1)) soXH(1) (d1 h1) (d2 h1) From XH(1) thehospitals choose (d1 h1) and reject (d2 h1)completing the row for t 1

920 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

For t 2 we first compute XD(2) as thecomplement of RH(XH(1)) The doctors choose(d1 h1) (d2 h2) so they reject (d1 h2) Thehospitals must then choose from the comple-ment XH(2) X (d1 h2) The hospitalschoose (d1 h1) and (d2 h2) and reject (d2 h1) Inthe third round XD(3) XD(2) and the processhas reached a fixed point

The example illustrates the monotonicity ofthe algorithm XH(t) grows larger step by stepwhile XD(t) grows smaller At termination of thealgorithm the intersection of the choice sets isthe stable set of contracts XH(3) XD(3) (d1 h1) (d2 h2) Moreover when XD(t) andXH(t) are interpreted as suggested above theprocess XD(t) XH(t) described by (9) with theinitial conditions XD(0) X and XH(0) Acoincides with the doctor-offering Gale-Shapley algorithm

For the hospital-offering algorithm a similaranalysis applies but with a different interpreta-tion of the sets and a different initial conditionLet XD(t) be the cumulative set of contractsoffered by the hospitals to the doctors beforeiteration t and let XH(t) be the set of contractsthat have not yet been rejected by the hospitalsup to and including iteration t Then the con-tracts ldquoheldrdquo at the end of iteration t are pre-cisely those that have been offered but notrejected which are those in XD(t 13 1) XH(t)With this interpretation the analysis is identicalto the one above The Gale-Shapley hospitaloffering algorithm is characterized by (9) andthe initial conditions XD(0) A and XH(0) X

The same logic applies to the Kelso-Crawfordmodel provided one extends their original treat-ment to include a version in which the workersmake offers in addition to the treatment inwhich firms make offers The words of thepreceding paragraphs apply exactly but a con-tract offer now includes a wage so for exam-ple a hospital whose contract offer is rejected

by a doctor may find that its next most preferredcontract to the same doctor is at a higher wage

B When Contracts Are Not Substitutes

It is clear from the preceding analysis thatthat definition of substitutes is just sufficient toallow our mathematical tools to be applied Inthis section we establish more We show thatunless contracts are substitutes for every hospi-tal the very existence of a stable set of contractscannot be guaranteed7

THEOREM 5 Suppose H contains at least twohospitals which we denote by h and h Furthersuppose that Rh is not isotone that is contractsare not substitutes for h Then there exist pref-erence orderings for the doctors in set D apreference ordering for a hospital h with asingle job opening such that regardless of thepreferences of the other hospitals no stable setof contracts exists

Together Theorems 3 and 5 characterize theset of preferences that can be allowed as inputsinto a matching algorithm if we wish to guar-antee that the outcome of the algorithm is astable set of contracts with respect to the re-ported preferences According to Theorem 3we can allow all preferences that satisfy substi-tutes and still reach an outcome that is a stablecollection of contracts According to Theorem5 if we allow any preference that does notsatisfy the substitutes condition then there issome profile of singleton preferences for theother parties such that no stable collection ofcontracts exists

7 Kelso and Crawford (1982) provide a particular exam-ple in which preferences do not satisfy substitutes and theredoes not exist a stable allocation

TABLE 1mdashILLUSTRATION OF THE ALGORITHM

XD(t) RD(XD(t)) XH(t) RH(XH(t))t 0 X (d1 h2) (d2 h2) A At 1 X (d1 h2) (d2 h2) (d1 h1) (d2 h1) (d2 h1)t 2 (d1 h1) (d1 h2) (d2 h2) (d1 h2) (d1 h1) (d2 h1) (d2 h2) (d2 h1)t 3 (d1 h1) (d1 h2) (d2 h2) (d1 h2) (d1 h1) (d2 h1) (d2 h2) (d2 h1)

921VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

This theory also reaffirms and extends theclose connection between the substitutes condi-tion and other concepts that has been estab-lished in the recent auctions literature withquasi-linear preferences Milgrom (2000) stud-ies an auction model with discrete goods inwhich the set of possible bidder values is re-quired to include all the additive functions8 Heshows that if goods are substitutes then a com-petitive equilibrium exists If however thereare at least three bidders and if there is anyallowed value such that the goods are not allsubstitutes then there is some profile of valuessuch that no competitive equilibrium existsFaruk Gul and Ennio Stacchetti (1999) establishthe same positive existence result They alsoshow that if preferences include all values inwhich a bidder wants only one particular goodas well as any one for which goods are not allsubstitutes and if the number of bidders issufficiently large then there is some profile ofpreferences for which no competitive equilib-rium exists Ausubel and Milgrom (2002) estab-lish that if (a) there is some bidder for whompreferences are not demand theory substitutes(b) values may be any additive function and (c)there are at least three bidders in total thenthere is some profile of preferences such that theVickrey outcome is not stable and the coreimputations do not form a lattice Conversely ifall bidders have preferences that are demandtheory substitutes then the Vickrey outcome isin the core and the core imputations do form alattice Taken together these results establish aclose connection between the substitutes condi-tion the cooperative concept of the core thenoncooperative concepts of Vickrey outcomesand competitive equilibrium

C ldquoVacancy Chainrdquo Dynamics

Suppose that a labor market has reached equi-librium with all interested doctors placed

at hospitals in a stable match Then suppose onedoctor retires Imagine a process in which ahospital seeks to replace its retired doctor byraiding other hospitals to hire additional doc-tors If the hospital makes an offer that wouldsucceed in hiring a doctor away from anotherhospital the affected hospital has three optionsit may make an offer to another doctor (orseveral) improve the terms for its current doc-tor or leave the position vacant Suppose itmakes whatever contract offer would best serveits purposes

In models with a fixed number of positionsand no contracts this process in which doctorsand vacancies move from one hospital to an-other has been called vacancy chain dynamics(Blum et al 1997) Kelso and Crawford (1982)consider similar dynamics in the context of theirmodel

The formal results for our extended model aresimilar to those of the older theories Startingwith a stable collection of contracts X let XHbe the set of contracts that some doctor weaklyprefers to her current contract in X and letXD X (X XH) As in the proof ofTheorem 1 we have F(XD XH) (XD XH) andX XD XH

To study the dynamic adjustment that resultsfrom the retirement of doctor d we suppose theprocess starts from the initial state (XD(0)XH(0)) (XD XH) This means that the employ-ees start by considering only offers that are atleast as good as their current positions and thathospitals remember which employees have re-jected them in the past The doctorsrsquo rejectionfunction is changed by the retirement of doctord to RD where RD(X) RD(X) x XxD d that is in addition to the old rejec-tions all contract offers addressed to the retireddoctor are rejected

To synchronize the timing with our earliernotation let us imagine that hospitals makeoffers at round t 1 and doctors accept or rejectthem at round t Hospitals consider as poten-tially available the doctors in XH(t 1) X RD(XD(t 1)) and the doctors then reject all butthe best offers so the cumulative set of offersreceived is XD(t) X RH(XH(t 1)) Define

(11) FXD XH X RHXH X RDXD

8 A valuation function is additive if the value of any setof items is the sum of the separate values of the elementsSuch a function v is also described as ldquomodularrdquo Additivityis equivalent to the requirement that for all sets A and Bv(A B) 13 v(A B) v(A) 13 v(B)

922 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

If contracts are substitutes for the hospitalsthen F is isotone and since F(XD XH) (XDXH) it follows that F(XD XH) (XD XH)Then since (XD(0) XH(0)) (XD XH) we have(XD(1) XH(1)) F(XD(0) XH(0)) (XD(0)XH(0)) Iterating (XD(n) XH(n)) F(XD(n 1) XH(n 1)) (XD(n 1) XH(n 1)) thedoctors accumulate offers and the contracts thatare potentially available to the hospitals shrinkA fixed point is reached and by Theorem 1 itcorresponds to a stable collection of contracts

THEOREM 6 Suppose that contracts are sub-stitutes and that (XD XH) is a stable set ofcontracts Suppose that a doctor retires and thatthe ensuing adjustment process is described by(XD(0) XH(0)) (XD XH) and (XD(t) XH(t)) F(XD(t 1) XH(t 1)) Then the sequence(XD(t) XH(t)) converges to a stable collectionof contracts at which all the unretired doctorsare weakly better off and all the hospitals areweakly worse off than at the initial state (XDXH)9

The sequence of contract offers and jobmoves described by iterated applications of Fincludes possibly complex adjustments Hospi-tals that lose a doctor may seek several replace-ments Hospitals whose doctors receive contractoffers may retain those doctors by offering bet-ter terms or may hire a different doctor and laterrehire the original doctor at a new contract Allalong the way the doctors find themselveschoosing from more and better options and thehospitals find themselves marching down theirpreference lists by offering costlier terms pay-ing higher wages or making offers to otherdoctors whom they had earlier rejected

III Law of Aggregate Demand

We now introduce a second restriction onpreferences that allows us to prove the next tworesults about the structure of the set of stablematches We call this restriction the law ofaggregate demand Roughly this law states that

as the price falls agents should demand more ofa good Here price falls correspond to morecontracts being available and more demandcorresponds to taking on (weakly) more con-tracts We formalize this intuition with the fol-lowing definition

DEFINITION The preferences of hospital h H satisfy the law of aggregate demand if for allX X Ch(X) Ch(X)

According to this definition if the set ofpossible contracts expands (analogous to a de-crease in some doctorsrsquo wages) then the totalnumber of contracts chosen by hospital h eitherrises or stays the same The corresponding prop-erty for doctor preferences is implied by re-vealed preference because each doctor choosesat most one contract Just as for the substitutescondition when wages are endogenous we in-terpret the definition as applying to the domainof wage vectors for which the hospitalrsquos opti-mum is unique

The next theorem shows the important rela-tionship between profit maximization substi-tutes and the law of aggregate demand

THEOREM 7 If hospital hrsquos preferences arequasi-linear and satisfy the substitutes condi-tion then they satisfy the law of aggregatedemand

Below we use the law of aggregate demandto characterize both necessary and sufficientconditions for the rural hospitalsrsquo property andensure that truthful revelation is a dominantstrategy for the doctors Previously in matchingmodels without money the dominant strategyresult was known only for responsive prefer-ences with capacity constraints (Abdulkadiro-glu 2003) We subsume that result with ourtheorem

A Rural Hospitals Theorem

In the match between doctors and hospitalscertain rural hospitals often had trouble fillingall their positions raising the question ofwhether there are other core matches at whichthe rural hospitals might do better Roth (1986)analyzed this question for the case of X D

9 The theorem does not claim and it is not generally truethat this new point must be the new doctor-best stable set ofcontracts

923VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

H and responsive preferences and found thatthe answer is no every hospital that has unfilledpositions at some stable match is assigned ex-actly the same doctors at every stable match Inparticular every hospital hires the same numberof doctors at every stable match

In this section we show by an example thatthis last conclusion does not generalize to thefull set of environments in which contracts aresubstitutes10 We then prove that if preferencessatisfy the law of aggregate demand and substi-tutes then the last conclusion of Rothrsquos theoremholds every hospital signs exactly the samenumber of contracts at every point in the corealthough the doctors assigned and the terms ofemployment can vary Finally we show thatany violation of the law of aggregate demandimplies that preferences exist such that theabove conclusion does not hold

Suppose that H h1 h2 and D d1 d2d3 For hospital h1 suppose its choices maxi-mize where d3 d1 d2 d1 d2 A d1 d3 d2 d3 This prefer-ence satisfies substitutes11 Suppose h2 has oneposition with its preferences given by d1 d2 d3 A Finally suppose d1 and d2prefer h1 to h2 while d3 has the reverse prefer-ence Then the matches X (h1 d3) (h2 d1)and X (h1 d1) (h1 d2) (h2 d3) are bothstable but hospital h1 employs a different num-ber of doctors and the set of doctors assigneddiffers between the two matches

This example involves a failure of the law ofaggregate demand because as the set of con-tracts available to h1 expands by the addition of(h1 d3) to the set (h1 d1) (h1 d2) the numberof doctors demanded declines from two to oneWhen the law of aggregate demand holds how-ever we have the following result

THEOREM 8 If hospital preferences satisfysubstitutes and the law of aggregate demandthen for every stable allocation (XD XH) andevery d D and h H Cd(XD) Cd(X D)

and Ch(XH) Ch(X H) That is every doctorand hospital signs the same number of contractsat every stable collection of contracts

The next theorem verifies that the counterex-amples developed above can always be gener-alized whenever any hospitalrsquos preferencesviolate the law of aggregate demand

THEOREM 9 If there exists a hospital h setsX X X such that Ch(X) Ch(X) andat least one other hospital then there existsingleton preferences for the other hospitalsand doctors such that the number of doctorsemployed by h is different for two stablematches

Theorem 9 establishes that the law of aggre-gate demand is not only a sufficient conditionfor the rural hospitals result of Theorem 8 butin a particular sense a necessary one as well

B Truthful Revelation as a DominantStrategy

The main result of this section concerns doc-torsrsquo incentives to report their preferences truth-fully For the doctor-offering algorithm ifhospital preferences satisfy the law of aggregatedemand and the substitutes condition then it isdominant strategy for doctors to reveal truth-fully their preferences over contracts12 We fur-ther show that both preference conditions playessential roles in the conclusion

We will show the positive incentive result forthe doctor-offering algorithm in two stepswhich highlight the different roles of the twopreference assumptions First we show that thesubstitutes condition by itself guarantees thatdoctors cannot benefit by exaggerating the rank-ing of an unattainable contract More preciselyif there exists a preferences list for a doctor dsuch that d obtains contract x by submitting thislist then d can also obtain x by submitting apreference list that includes only contract xSecond we will show that adding the law of

10 A similar example appears in Ruth Martınez et al(2000)

11 These preferences however do not display the ldquosingleimprovement propertyrdquo that Gul and Stacchetti (1999) in-troduce and show is characteristic of substitutes preferencesin models with quasi-linear utility

12 It is of course not a dominant strategy for hospitals totruthfully reveal nor would it be so even if we consideredthe hospital-offering algorithm For further discussion ofthis point see Roth and Sotomayor (1990)

924 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

aggregate demand guarantees that a doctor doesat least as well as reporting truthfully as byreporting any singleton Together these are thedominant strategy result

To understand why submitting unattainedcontracts cannot help a doctor d consider thefollowing Let x be the most-preferred contractthat d can obtain by submitting any preferencelist (holding all other submitted preferencesfixed) Note that all that d accomplishes whenreporting that certain contracts are preferred to xis to make it easier for some coalition to blockoutcomes involving x Thus if x is attainablewith any report it is attainable with the reportPd x that ranks x as the only acceptable con-tract This intuition is captured in the followingtheorem

THEOREM 10 Let hospitalsrsquo preferences sat-isfy the substitutes condition and let the match-ing algorithm produce the doctor-optimalmatch Fixing the preferences of hospitals andof doctors besides d let x be the outcome that dobtains by reporting preferences Pd z1 dz2 d

d zn d x Then the outcome that dobtains by reporting preferences Pd x is also x

Some other doctors may be strictly better offwhen d submits her shorter preference list thereare fewer collections of contracts that d nowobjects to so the core may become larger andthe doctor-optimal point of the enlarged coremakes all doctors weakly better off and maymake some strictly better off

Without the law of aggregate demand how-ever it may still be in a doctorrsquos interest toconceal her preferences for unattainable posi-tions To see this consider the case with twohospitals and three doctors where contracts aresimply elements of D H and let preferences be

(12) Pd1 h1 h2

Ph1 d3 d1 d2 d1 d2

Pd2 h2 h1

Ph2 d1 d2 d3

Pd3 h2 h1

With these preferences the only stable matchis (d1 h2) (d3 h1) which leaves d2 unem-ployed However if d2 were to reverse herranking of the two hospitals then (d1 h1) (d2h1) (d3 h2) would be chosen by the doctor-offering algorithm leaving d2 better off Essen-tially by offering a contract to h2 d2 haschanged the number of positions availableWhen the preferences of the hospitals satisfythe law of aggregate demand however mak-ing more offers to the hospitals (weakly) in-creases the number of contracts the hospitalsaccept

THEOREM 11 Let hospitalsrsquo preferences sat-isfy substitutes and the law of aggregate de-mand and let the matching algorithm producethe doctor-optimal match Then fixing the pref-erences of the other doctors and of all thehospitals let x be the contract that d obtains bysubmitting the set of preferences Pd z1 dz2 d

d zn d x Then the preferences Pd y1 y2 yn x yn131 yN

obtain a contract that is Pd-preferred or indif-ferent to x

According to this theorem when a doctorrsquostrue preferences are Pd the doctor can never dobetter according to these true preferences thanby reporting the preferences truthfully

In fact the law of aggregate demand is ldquoal-mostrdquo a necessary condition as well The excep-tions can arise because certain violations of thelaw of aggregate demand are unobservable fromthe choice data of the algorithm and these can-not affect incentives Thus consider an examplewhere terms t are included in the contract andwhere a hospital h has preferences (d1 ht1) (d1 h t1) (d2 h t2) (d1 h t1) (d2 h t2) Although these preferences violatethe law of aggregate demand the algorithm willnever ldquoseerdquo the violation as either (d1 h t1) d1

(d1 h t1) or (d1 h t1) d1(d1 h t1) Thus

whichever terms that d1 first offers will deter-mine a conditional set of preferences for thehospital that does satisfy the law of aggregatedemand (The hospital will never reject an offerof either (d1 h t1) or (d1 h t1))

The next theorem says that if some hospitalrsquospreferences violate the law of aggregate demandin a way that can even potentially be observed

925VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

from the hospitalrsquos choices then there existpreferences for the other agents such that it isnot a dominant strategy for doctors to reporttruthfully even when the other assumptions wehave used are satisfied

THEOREM 12 Let hospital h have prefer-ences such that Ch(X) Ch(X x) and letthere exist two contracts y z such that yD zD xD yD and y z Rh(X x) Rh(X)Then if another hospital h exists there existsingleton preferences for the hospitals besides hand preferences for the doctors such that it isnot a dominant strategy for all doctors to revealtheir preferences truthfully

Thus to the extent that the law of aggregatedemand for hospital preferences has observableconsequences for the progress of the doctor-offering algorithm it is an indispensable condi-tion to ensure the dominant strategy property fordoctors

IV Classes of Conforming Preferences

Although the class of substitutes valuations isquite limited13 it is broader than the set ofresponsive preferences in useful ways Thesubstitutes valuations accommodate all the af-firmative action and subspecialty constraints de-scribed above and allow a doctorrsquos marginalproduct to depend on which other doctors thehospital attracts

In this section we introduce a parameterizedclass of quasi-linear substitutes valuations forhospitals evaluating sets of new hires The val-uations are based on an endowed assignmentmodel according to which hospitals have a set

of jobs to fill and an existing endowment ofdoctors while doctorsrsquo productivities varyamong jobs A hospital values new doctors ac-cording to the their incremental value in theassignment problem

From a general job assignment perspectivethe key restrictions of endowed assignment val-uations are that each doctor can do one and onlyone job and that the hospitalrsquos output is the sumof outputs of its various jobs A hospital cannotuse one doctor for two jobs nor can it combinethe skills of two doctors in the same job Alsothere is no interaction in the productivity ofdoctors in different jobs Given this mathemat-ical structure if a doctor is lost it will always beoptimal for the hospital to retain all of its otherdoctors although it may choose to reassignsome of the retained doctors to fill vacatedpositions

Another way to describe the set of endowedassignment valuations VEA is to build it upfrom three properties as follows First a sin-gleton valuation is one of the form v(S) maxdSd for some nonnegative vector Sin-gleton valuations represent the possible valua-tions by a hospital with just one opening andVEA includes all singleton valuations Second ifa hospital is composed of two units j 1 2each of which has a valuation vj VEA then thehospitalrsquos maximum value from assigningworkers between its units denoted by (v1 v2)(S) maxRSv1(R) 13 v2(S R) is also inthe set We call this property closure underaggregation Third if a hospitalrsquos value is de-rived from a value in VEA by endowing thehospital with a set of doctors T then the hospi-talrsquos incremental value for extra doctorsv(ST) v(S T) v(T) is also in the set VEAWe call this property closure under endowmentFinally two valuations v1 and v2 are calledequivalent if they differ by an additive con-stant For example for any fixed set of doctorsT v( T) is equivalent to v( T)

THEOREM 13 Let VEA denote the smallestfamily of valuations of sets of doctors that in-cludes all the singleton valuations and is closedunder aggregation and endowment Then foreach v VEA there exists a set of jobs J a setof doctors T and a (D 13 T) J-matrix [ij]such that v is equivalent to the following

13 Hans Reijnierse et al (2002) (see also Yuan-ChuanLien and Jun Yan 2003) have characterized the valuationfunctions that satisfy the substitutes condition as followsLet v(S) be the hospitalrsquos value of doctor set S and letvS(T) v(S T) v(S) denote the incremental value of theset of doctors T Then doctors are substitutes if for every setS and three other doctors d1 d2 and d3 there is no uniquemaximum in vS(d1) 13 vS(d2 d3) vS(d2) 13 vS(d1 d3)vS(d3) 13 vS(d1 d2)

926 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

(13) vSJ T maxz

d S

djzdj subject to

d S

zdj 1 for j J

j J

zdj 1 for d S T0 for d S T

zdj 0 1 for all d j

Conversely for every such J T and v( J T) VEA

We dub this family of valuations the endowedassignment valuations because of the form ofoptimization (13) The family VEA is an exten-sion of the assignment valuations derived byLloyd Shapley (1962) used by Roth (19841985b) in models of matching with wages andexplicit job assignments and emphasized in astudy of package bidding by Lehmann et al(2001) The endowed assignment valuations arequite useful for applications They also fit nicelywith the theory reported in previous sections forthe following reason

THEOREM 14 Every endowed assignmentvaluation v( J T) VEA is a substitutesvaluation

To the best of our knowledge all of thesubstitutes valuations that have been used orproposed for practical applications are includedamong the endowed assignment valuations In-deed the question of whether all substitutesvaluations are endowed assignment valuationsis an open one Here we review some of themost popular valuations to show how they fitinto the class

The most commonly studied class of prefer-ences for matching problems like the Match forwhich employment terms are exogenouslyfixed are the responsive preferences Thesespecify that each hospital h has a fixed numberof openings nh a set of acceptable doctors Dh

A D and a strict ordering h of the acceptabledoctors When a doctor is unacceptable thatmeans that hiring the doctor is always worsethan leaving her position unfilled Given any setof available doctors the hospital hires its nh

most preferred acceptable doctors if that manyare available and otherwise hires all of theacceptable doctors

To map responsive preferences into the as-signment problem framework define a utilityfunction uh D3 to represent h and set theminimum acceptable utility to zero Formally(1) if d d Dh

A then d h dN uh(d) uh(d)and (2) d Dh

AN uh(d) 0 Using this utilitywe specify an assignment problem as followsJ 1 nh and dj uh(d) 13 1 and fix thewage at 1 Using a positive wage is a device toensure that the hospital strictly prefers not tohire a doctor it plans not to assign to any job Itis evident that with this valuation preferencethe hospital most prefers to hire the set of avail-able acceptable doctors with the highest rank-ing according to h

Among the extensions of responsive prefer-ences that have been most important in practiceare ones to accommodate quotas of variouskinds For example one use of quotas is tomanage subspecialties of internal medicine inwhich a certain number of positions are to befilled by doctors planning that subspecialty ifenough acceptable doctors are available Onecan reserve ms jobs for subspecialty s by pro-viding that there are ms jobs in which doctors inthat subspecialty have their productivity in-creased by a large constant M Then if msdoctors in subspecialty s are available at leastthat many will be demanded at the optimalsolution to (13) If that many qualified doctorsare not available the jobs will be filled by otherdoctors according to their productivities

Another use of quotas is for an affirmativeaction policy that absolutely reserves jobs formembers of certain target groups For each af-firmative action group G define a correspond-ing set of jobs JG and let J G JG Specifythat for any doctor d G and job j JG dj uh(d) and otherwise dj 0 One can alsointroduce an unrestricted category of jobs j thatany doctor can fill with productivity dj uh(d) This obviously ensures that a certainnumber of jobs are reserved for each targetgroup

A recent treatment of affirmative action byRoth (1991) extended by Abdulkadiroglu(2003) uses the class of responsive preferenceswith capacity constraints This class requires

927VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

that the set of doctors be partitioned into a finitenumber of affirmative action groups and that foreach group G the hospital has a capacity mG thatlimits the number of doctors who can be hiredfrom that group In addition at most nh doctorsin total can be hired

To represent such preferences using endowedassignment valuations let us specify that thereare mG jobs of type G and yenG mG jobs in totalThe hospital is endowed with nh yenG mGdoctors The endowed doctors have productivityij M in every job where M is a largenumber This ensures that at most nh new doc-tors will be hired at any optimum For thenonendowed doctors we calculate productivi-ties uh(d) in the same fashion as for the respon-sive preferences and set dj uh(d) for jobs j oftype G and dj 0 for all other jobs Thisensures that at most mG doctors will be hiredfrom group G By inspection this specificationrepresents Abdulkadiroglursquos affirmative actionpreferences

Unlike the specifications used for the currentNational Resident Matching Program algo-rithm the endowed assignment valuations per-mit overlapping affirmative action categoriesFor example suppose that a small hospital has atarget of hiring one female and one minoritydoctor In the endowed assignment structurethe hospital may assign a minority female doc-tor to fill either a minority slot or a female slotbut not both This is necessary to retain thesubstitutes demand structure for otherwisemaking a minority female doctor availablecould lead the hospital to hire a nonminoritymale doctor whom it would otherwise reject

Endowed assignment valuations thus providea flexible parameterized way for hospitals torepresent their preferences for matching with orwithout wages using a class of quasi-linear pref-erences that satisfies the substitutes conditionand the law of aggregate demand

V Cumulative Offer Processes and Auctions

The algorithms described by the system (9)with different starting points have the propertythat they can terminate only at a stable set ofcontracts Nevertheless unless preferences sat-isfy the substitutes condition the system is notguaranteed to converge at all even when a fixed

point exists In this section we offer a differentcharacterization of the Gale-Shapley doctor-offering algorithm that will prove especiallywell suited to situations in which contracts maynot be substitutes but in which there is just oneldquohospitalrdquo the auctioneer For now we allowthe possibility that there are several hospitals

The alternative representation is constructedby replacing the system of equations (9) by thefollowing system

(14) XD t X RH XH t 1

XH t XH t 1 CD XD t

We call the algorithm that begins with XD(0) X and XH(0) A and obeys (14) a cumulativeoffer process because the formalism capturesthe idea that hospitals accumulate offers fromdoctors in the set XH(t) and hold their bestchoices CH(XH(t)) from the accumulated setThere is no assumption of consistency imposedon the algorithm so it is possible that severalhospitals are ldquoholdingrdquo contract offers from thesame doctor The corresponding allocation is ofcourse infeasible since each doctor can ulti-mately accept just one contract

At each round t of the cumulative offer pro-cess all doctors make their best offers from theset of not-yet-rejected choices XD(t) but anydoctor d for whom a contract is being heldsimply repeats one of its earlier offers Thusnew offers are made only by doctors who havebeen rejected

To see why this is so let x CH(XH(t)) be acontract that is being held and consider thecorresponding doctor xD d By revealed pref-erence doctor d strictly prefers x to any contractthat she has not yet offered since those con-tracts were available to offer at the time that xwas offered Since drsquos most preferred contractin Xd(t) at the current time must be weaklypreferred to x it must be coincide with one ofdrsquos earlier offers

The second equation of system (14) is the onethat distinguishes the cumulative offer processfrom the system in (9) In the cumulative offerprocess without any assumptions about hospi-talsrsquo preferences XH(t) grows monotonicallyfrom round to round so the sequence of setsconverges In contrast the earlier process was

928 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

guaranteed to converge only when contracts aresubstitutes for the hospitals

When contracts are substitutes the two sys-tems of equations are equivalent

THEOREM 15 Suppose that contracts aresubstitutes for the hospitals and that XD(0) Xand XH(0) A Then the sequences of pairs(XD(t) XH(t)) generated by the two laws ofmotion (9) and (14) are identical

Even with the initial condition XD(0) X andXH(0) A the algorithms described by (9) and(14) may differ when contracts are not substi-tutes In that case by inspection of the system(14) the cumulative offer process still con-verges because XH(t) is bounded by the finiteset X and grows monotonically from round toround What is at issue is whether the hospitalrsquoschoice from its final search set in the cumulativeoffer process is a feasible and stable set ofcontracts

We will find below that when there is a singlehospital the outcome is indeed a feasible andstable set of contracts In that case the cumu-lative offer process coincides with the general-ized proxy auction of Ausubel and Milgrom(2002) Those authors analyze in detail the casewhen a bid consists of a price and a subset of theset of goods that the bidder wishes to buy Ateach round the seller ldquoholdsrdquo the collection ofbids that maximizes its total revenues subject tothe constraint that each good can be sold onlyonce The generalized proxy auction howeveris not limited to the sale of goods and in fact isidentical in scope to our present model ofmatching with contracts In particular the auc-tioneer may impose a variety of constraints onthe feasible collections of bids and may weighnonprice factors either exclusively or in com-bination with prices to decide which collectionof bids to hold Bidders for their part maymake bids that include factors besides price andmay not include price at all

To illustrate the role of general contracts inthis auction setting consider the auction designsuggested by Paul Brewer and Charles Plott(1996) in which bidders seek to buy access to arailroad track In that application a bid specifiesa trainrsquos direction of travel departure and ar-rival times and price offered It is assumed that

trains travel at a uniform speed along the trackIn this setting the contract terms must includethe direction and the two times and the seller isconstrained to hold only combinations of bidssuch that trains maintain safe distances fromone another at all times

A second example of the generalized proxyprocess is a procurement auction in which thebuyer scores suppliers on the basis of suchfactors as quality excess capacity credit ratingand historical reliability as well as price and inwhich the buyer prefers to set aside someamount of its purchase for minority contractorsor to maintain geographic diversity of supply toreduce the chance of supply disruptions In anasset sale the seller may weigh the probabilitythat the sale will be completed for example dueto financing contingencies or because a union orantitrust regulators must approve the sale

The cumulative offer process model withgeneral contracts accommodates all of thesepossibilities The auctioneer in the model cor-responds to a single ldquohospitalrdquomdashhereafter theauctioneermdashwith a choice function CH thatselects her most preferred collection of contractproposals We have the following result (whichis first stated using different notation than in theAusubel-Milgrom paper)

THEOREM 16 When the doctor-offering cu-mulative offer process with a single hospitalterminates at time t with outcome (XD(t) XH(t))the hospitalrsquos choice CH(XH(t)) is a stable col-lection of contracts

Cumulative offer processes connect the the-ory of matching with contracts to the emergingtheory of package auctions and auctions withcomplex constraints

VI Conclusion

We have introduced a general model ofmatching with bilateral contracts that encom-passes and extends two-sided matching modelswith and without money and certain auctionmodels The new formulation allows some con-tract terms to be exogenously fixed and others tobe endogenous in any combinations In thisvery general framework we characterize stable

929VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

collections of contracts in terms of the solutionto a certain system of equations

The key to the analysis is to extend twoconcepts of demand theory to models with orwithout prices The first concept to be extendedis the notion of substitutes Our definition ap-plies essentially the Roth-Sotomayor substitut-able preferences condition to a more generalclass of contracts contracts are substitutes ifwhenever the set of feasible bilateral contractsexpands the set of contracts that the firm rejectsalso expands We show that (a) our definitioncoincides with the usual demand theory condi-tion when both apply (b) when contracts aresubstitutes a stable collection of contracts ex-ists and (c) if any hospital or firm has prefer-ences that are not substitutes then there arepreferences with single openings for each otherfirm such that no stable allocation exists Wefurther show that when the substitute conditionapplies (a) both the doctor-offering and hospi-tal-offering Gale-Shapley algorithms can berepresented as iterated operations of the sameoperator (starting from different initial condi-tions) and (b) starting at a stable allocationfrom which a doctor retires a natural marketdynamic mimics the Gale-Shapley process tofind a new stable allocation

The second relevant demand theory conceptis the law of demand which we extend both toinclude heterogeneous inputs and to encompassmodels with or without prices The law of ag-gregate demand condition holds that when theset of feasible contracts expands the number ofcontracts that the firm chooses to sign weaklyincreases In terms of traditional demand theorythis means that for example when the wages ofsome of a heterogeneous group of workers fallsif the workers are substitutes then the totalnumber of workers employed rises We showthat (a) when inputs are substitutes the choicesof a profit-maximizing firmhospital satisfy thelaw of aggregate demand Moreover when thechoices of every hospitalfirm satisfy the law ofaggregate demand and the substitutes conditionthen (b) the set of workersdoctors employed isthe same at every stable allocation (c) the num-ber employed by each firmhospital is also thesame and (d) truthful reporting is a dominantstrategy for doctors in the doctor-offering algo-rithm Moreover we prove (e) that if the law of

aggregate demand fails in any potentially ob-servable way then the preceding dominantstrategy property does not hold

For these results to be useful for practicalmechanism design one needs to account forhow preferences especially hospital prefer-ences are to be reported to the mechanismThere needs to be a convenient way for hospi-tals to express a rich array of preferences andone needs to know whether the preferences be-ing reported actually satisfy the conditions ofthe various theorems Toward that end we in-troduce a parametric form that we call extendedassignment valuations which strictly general-izes several existing specifications and whichalways satisfies both the substitutes and law ofaggregate demand conditions

Finally we introduce an alternative treatmentof the doctor-offering algorithm the cumulativeoffer process We show that when contracts aresubstitutes the previously characterized doctor-offering algorithm coincides exactly with a cu-mulative offer process When contracts are notsubstitutes but there is just one hospital (theldquoauctioneerrdquo) the cumulative offer process co-incides with the Ausubel-Milgrom ascendingproxy auction This identity clarifies the con-nection between these algorithms and com-bined with the dominant strategy theoremreported above generalizes the Ausubel-Milgromdominant strategy theorem for the proxyauctions

Our new approach reveals deep similaritiesamong several of the most successful auctionand matching designs in current use and amongthe environmental conditions in which theoret-ically the mechanisms should perform at theirbest Understanding these similarities can helpus to understand the limitations of these mech-anisms paving the way for new designs

APPENDIX

PROOF OF THEOREM 1Let (XD XH) X2 be a solution to (3) Then

XD XH XD RD(XD) CD(XD) andsimilarly XH XD XH RH(XH) CH(XH)so XH XD CH(XH) CD(XD)

Next we show that X XH XD is a stableset of contracts Since X CH(XH) CD(XD)it follows by revealed preference that X

930 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

CH(X) CD(X) so condition (i) of the defi-nition of stability is satisfied

Consider any hospital h and set of contractsX CD(X X) naming hospital h Since X CD(XD) revealed preference of the doctorsimplies that X XD CD(XD) and hence thatX RD(XD) X XD RD(XD) CD(XD) RD(XD) A Thus X X RD(XD) XHby (3) So if X Ch(X) then by the revealedpreference of hospital h X h Ch(XH) Ch(X) Hence X Ch(X X) so condition(ii) is satisfied So the set of contracts X isunblocked

For the converse suppose that X is a stablecollection of contracts Then CD(X) X LetXH be the set of contracts that the doctorsweakly prefer to X and XD the set of contractsthat doctors weakly disprefer By constructionX XH X XD X is a partition of X

To obtain (3) observe first that if there issome h such that Ch(XH) Xh then X Ch(XH) violates stability condition (ii) SoCh(XH) Xh for all h that is CH(XH) X Itfollows that X RH(XH) X (XH X) X (X XD) XD and that X RD(XD) X (XD CD(XD)) X (XD X) XH

Hence (XD XH) satisfies (3) and XH XD X

PROOF OF THEOREM 2Let i j ( j wj) C(w) and wi wi Define

Z(w) ( j wj)wj wj Then Z(wi wi) Z(w) If contracts are substitutes then R(Z(wiwi)) R(Z(w)) By (6) since ( j wj) C(w)it follows that ( j wj) C(Z(w)) so ( j wj) R(Z(w)) Hence ( j wj) R(Z(wi wi)) So ( jwj) Z(wi wi) R(Z(wi wi)) C(Z(wiwi)) and thus (j wj) C(wi wi) by assumption(6) Thus C satisfies demand theory substitutes

Conversely suppose contracts are not substi-tutes Then there exists a set X an element (iwi) X and ( j wj) R(X) such that ( j wj) R(X) where X X (i wi) Using (6)wi Wi(X) Let w W(X) and wi Wi(X)Then wi wi and ( j wj) C(w) but ( j wj) C(wi wi) so C does not satisfy the demandtheory substitutes condition

PROOF OF THEOREM 5We may limit attention to the case with

exactly two hospitals by specifying that

the doctors find the other hospitals to beunacceptable

Suppose Rh is not isotone Then there existssome x y X and X X such that for all x X xH h and such that x Rh(X) Rh(X y) By construction since x y Ch(X y) contracts x and y specify different doctorssay d1 xD yD d2 Let x and y denote thecorresponding contracts for doctors d1 and d2 inwhich hospital h is substituted for h

We specify preferences as follows first forhospital h we take x h y h A and allother contracts are unacceptable Second doc-tors in xD(CH(X) CH(X y)) d1 d2prefer their elements of CH(X) CH(X y)to any other contract Third d1 has x d1

x and ranks all other contracts lower Fourthd2 has y d2

y and ranks all other con-tracts lower Finally the remaining doctors findall contracts from hospitals h and h to beunacceptable

Consider a feasible acceptable allocation Xsuch that y X Since h and d2 can have onlyone contract in X x y X Then hrsquos con-tracts in X form a subset of X so x is notincluded and d1 has a contract less preferredthan x Then the deviation by (d1 h) to xblocks X

Consider a feasible acceptable allocation Xsuch that y X Then either x y X or Xis blocked by a coalition including h d1 and d2using the contracts x and y However if x y X then a deviation by (d2 h) to contract yblocks X

Since all feasible allocations are blockedthere exists no stable set of contracts

PROOF OF THEOREM 7Suppose X D H W and let Z(w) ( j

wj)wj wj Then the law of aggregate de-mand is the statement that for any wage vectorsw w satisfying w w such that the choices setsare singletons C(Z(w)) C(Z(w)) The proofis by contradiction Suppose the law of aggre-gate demand does not hold Then there exists awage vector w and a doctor d such that for some(and hence all) 0 C(Z(wd 13 wd)) C(Z(wd wd)) Since hrsquos preferences arequasi-linear changing doctor drsquos wage can af-fect the hiring of other doctors only if it affectsthe hiring of doctor d It follows that there are

931VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

exactly two optimal choices for the hospital atwage vector w these are C(Z(wd wd)) atwhich doctor d is hired and C(Z(wd 13 wd))at which d is not hired but such that two otherdoctors are hired that is there exist doctors dd C(Z(wd 13 wd)) C(Z(wd wd))Let the corresponding payoff for the hospital(when faced with wage vector w) be

Consider the wage vector w (wd wd 2 wdd) For positive and suffi-ciently small the hospitalrsquos payoff at wage vec-tor w is 13 2 if it chooses C(Z(wd 13 wd))and it is 13 if it chooses C(Z(wd wd))and one of these choices must be optimal SoC(w) C(Z(wd 13 wd)) But then raisingthe wage of doctor d from wd 2 to wd whileholding the other wages at wd reduces the de-mand for doctor d from one to zero in violationof the demand theory substitutes condition

PROOF OF THEOREM 8By definition XD X D so by revealed pref-

erence Cd(X D) Cd(XD) Also X H XH soby the law of aggregate demand Ch(X H) Ch(XH) By Theorem 1 CD(XD) CH(XH)and CD(X D) CH(X H) so yendD Cd(XD) yenhH Ch(XH) and yendD Cd(XD) yenhH Ch(XH)Combining these leads to yendD Cd(X D) yendD Cd(XD) yenhH Ch(XH) yenhH Ch(XH) yendD Cd(XD) which begins and ends with the samesum Hence none of the inequalities can bestrict

PROOF OF THEOREM 9Since Ch(X) Ch(X) there exists some

set Y X Y X and contract x such thatCh(Y) Ch(Y x) Since x Ch(Y x)(as otherwise Ch(Y) Ch(Y x) for thepreferences to be rationalizable) there must ex-ist two contracts y z Rh(Y x) Rh(Y)such that y x z y Moreover since y z Ch(Y) yD zD

Denoting by h the second hospital whose exis-tence is hypothesized by the theorem we specifypreferences as follows Let all the doctors with con-tracts in Y have those contracts be their most favoredand let all other doctors find any contract with hunacceptable Let all doctors find any contract notinvolving hospital h or h to be unacceptable

In principle there are three casesIf xD yD then let PxD

y x and PzD z

Then there exist two stable matches Ch(Y x) and Ch(Y) with zD employed in the firstmatch but not in the second

The case xD zD is symmetricFinally if yD xD zD then let x y z

denote contracts with hospital h where the doc-tors (and any other terms) are the same as in xy z respectively Specify the remaining prefer-ences by PxD

x x PyD y y PzD

z z and Ph y x A z Thenthere exist two different stable matches x Ch(Y) and y Ch(Y x) with zD em-ployed in the first match but not in the second

PROOF OF THEOREM 10Let X denote the collection of contracts cho-

sen by the algorithm when doctor d submitspreference Pd If this collection which is stableunder the reported preferences is not stableunder Pd then there exists a blocking coalitionThis blocking coalition must contain d as noother doctorrsquos preferences have changed butthat is impossible since x is drsquos favorite con-tract according to the preferences Pd Since X isstable under Pd the doctor-optimal stable matchunder Pd (the existence of which is guaranteedby Theorem 2) must make every doctor(weakly) better off than at X In particulardoctor d must obtain x

PROOF OF THEOREM 11From Theorem 10 Pd x also obtains x

Hence by the rural hospitals theorem d is em-ployed at every point in the core when Pd x issubmitted So every allocation X at which d isunemployed is blocked by some coalition andset of contracts when d submits Pd Conse-quently if d submits the preferences Pd y1 y2 yn x then every allocation at whichd is unemployed is still blocked by the samecoalition and set of contracts Since the doctor-best stable allocation is one at which d gets aPd-acceptable contract that allocation is weaklyPd-preferred to x Finally the doctor-optimalmatch when Pd is submitted is still the doctor-optimal match when Pd is submitted as drsquospreferences over contracts less preferred than xcannot be used to block a match where shereceives a contract weakly preferred to x

932 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

PROOF OF THEOREM 12Consider contracts x y and z such that

xD xD yD yD zD zD and xH yH zH h Let the preferences of the three identified bePxD

x x PyD y y and PzD

z z andlet those of h be Ph y z x Forthe other contracts x Y Ch(X) let x be xDrsquosmost favored contract For the remaining doctorslet any contract with h or h be unacceptable

With the preceding preferences the only sta-ble allocation includes contracts x and y leav-ing doctor zD unemployed If however zDmisrepresents her preferences and reports PzD

z z then the doctor-optimal stable matchincludes z leaving doctor zD better off

PROOF OF THEOREM 13Setting J 1 and T A it is clear by

inspection that this family includes all singletonvaluations

The family is closed under endowment be-cause given any such valuation v( J T)endowing a set of doctors T simply creates thevaluation v( J T T))

To verify that the family is closed underaggregation consider any two valuations v( J T) and v( J T) Since J and T are justindex sets we may assume without loss ofgenerality that T T J J A DefineT T T and J J J Let

(15) ij ij if i D T j Jij if i D T j J0 otherwise

By inspection of the optimization problems v( J T) v( J T) v( J T)

For the converse consider the valuation v( J T) given by (13) We derive it construc-tively from the singleton valuations aggrega-tion and endowment as follows Let vj be thesingleton valuation associated with row j inmatrix [ij] for j 1 J Since VEA isclosed under aggregation v1 vJ v( J A) VEA Since VEA is also closed underendowment we may endow the doctors in T toobtain v( J T) VEA

PROOF OF THEOREM 14L Shapley (1962) (see also Lehmann et al

2001) had already proved that every assignment

valuation without endowments v( J A) is asubstitutes valuation Ausubel and Milgrom(2002) prove that a valuation v is a substitutesvaluation if and only if the corresponding indi-rect profit function ((p) v(S) yendS pd) issubmodular Let be the indirect profit func-tion corresponding to v( J A) Then theindirect profit function corresponding to v( J T) is (p1 pN) (p1 pN 0 0)Since is the profit function of the substitutesvaluation vh it is submodular and hence issubmodular as well

PROOF OF THEOREM 15Suppose that contracts are substitutes for the

hospitals We proceed by induction The initialcondition specifies that the sequences are iden-tical through time t 0 Denote the sequencecorresponding to the cumulative offer processby a superscript C and denote the alternativeprocess defined by (9) with no superscript As-sume the inductive hypothesis that the se-quences are the same up to round t 1 andsuppress the corresponding superscripts for thevalues at that round Then XD(t) X RH(XH(t 1)) XD

C(t) This also implies that

(16) X XH t 1 XD t

To complete the proof we must show thatXH

C(t) XH(t) or equivalently that XH(t 1) CD(XD(t)) X RD(XD(t))

For t 2 XHC(t 2) XH

C(t 1) by con-struction so by the inductive hypothesis XH(t 2) XH(t 1) Since contracts are substitutesRH is isotone so X RH(XH(t 1)) X RH(XH(t 2)) and hence XD(t) XD(t 1)For t 1 the inclusion XD(t) XD(t 1) isimplied by the initial condition XD(0) X

Recall that by revealed preference RD isisotone It follows that RD(XD(t)) RD(XD(t 1)) and hence using (9) that XH(t 1) X RD(XD(t 1)) X RD(XD(t)) XH(t) ThusXH(t 1) XH(t 1) (X RD(XD(t))) XH(t 1) RD(XD(t)) So XH(t 1) CD(XD(t)) XH(t 1) (XD(t) RD(XD(t))) (XH(t 1) RD(XD(t))) (XD(t) RD(XD(t))) (XH(t 1) XD(t)) RD(XD(t)) X RD(XD(t)) where the last stepequality follows from (16)

933VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

PROOF OF THEOREM 16By construction any contract not in XH(t) is

less preferred by some doctor d than everycorresponding contract in XH(t) (because doctord offers her most preferred contracts in se-quence) So any collection of contracts thatincludes some not in XH(t) must be strictly lesspreferred by one of the doctors Any profitablecoalitional deviation must use only contracts inXH(t)

By construction the one hospitalauctioneermust be part of any deviating coalition andCH(XH(t)) is its strictly most preferred collectionof contracts in XH(t) so there is no profitablecoalitional deviation using just contracts in XH(t)

REFERENCES

Abdulkadiroglu Atila ldquoCollege Admissionswith Affirmative Actionrdquo Unpublished Pa-per 2003

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoBoston Public School MatchingrdquoAmerican Economic Review 2005a (Papersand Proceedings) 95(2) pp 368ndash71

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoThe New York City High SchoolMatchrdquo American Economic Review 2005b(Papers and Proceedings) 95(2) pp 364ndash67

Abdulkadiroglu Atila and Sonmez TayfunldquoSchool Choice A Mechanism Design Ap-proachrdquo American Economic Review 200393(3) pp 729ndash47

Adachi Hiroyuki ldquoOn a Characterization of Sta-ble Matchingsrdquo Economics Letters 200068(1) pp 43ndash49

Alkan Ahmet and Gale David ldquoStable ScheduleMatching under Revealed Preferencerdquo Jour-nal of Economic Theory 2003 112(2) pp289ndash306

Ausubel Lawrence M Cramton Peter and Mil-grom Paul R ldquoThe Clock-Poxy Auction APractical Combinatorial Auction Designrdquo inPeter Cramton Yoav Shoham and RichardSteinberg eds Combinatorial auctionsCambridge MA MIT Press 2005 ch 5

Ausubel Lawrence M and Milgrom Paul RldquoAscending Auctions with Package Bid-dingrdquo Frontiers of Theoretical Economics2002 1(1) Article 1

Blum Yosef Roth Alvin E and Rothblum UrielG ldquoVacancy Chains and Equilibration in Se-nior-Level Labor Marketsrdquo Journal of Eco-nomic Theory 1997 76(2) pp 362ndash411

Brewer Paul J and Plott Charles R ldquoA BinaryConflict Ascending Price (Bicap) Mechanismfor the Decentralized Allocation of the Rightto Use Railroad Tracksrdquo International Jour-nal of Industrial Organization 1996 14(6)pp 857ndash86

Bulow Jeremy and Levin Jonathan ldquoMatchingand Price Competitionrdquo Stanford UniversityStanford Economics Working Paper No1818 2003

Cramton Peter Shoham Yoav and SteinbergRichard Combinatorial auctions Cam-bridge MA MIT Press (forthcoming)

Crawford Vincent P and Knoer Elsie M ldquoJobMatching with Heterogeneous Firms andWorkersrdquo Econometrica 1981 49(2) pp437ndash50

Demange Gabrielle and Gale David ldquoThe Strat-egy Structure of Two-Sided Matching Mar-ketsrdquo Econometrica 1985 53(4) pp 873ndash88

Dubins Lester and Freedman David ldquoMachia-velli and the Gale-Shapley Algorithmrdquo Na-val Research Logistics Quarterly 198188(7) pp 485ndash94

Echenique Federico and Oviedo Jorge ldquoCoreMany-to-One Matchings by Fixed-PointMethodsrdquo Journal of Economic Theory2004 115(2) pp 358ndash76

Fleiner Tamas ldquoA Fixed-Point Approach toStable Matchings and Some ApplicationsrdquoMathematics of Operations Research 200328(1) pp 103ndash26

Gale David and Shapley Lloyd ldquoCollege Ad-missions and the Stability of MarriagerdquoAmerican Mathematical Monthly 196269(1) pp 9ndash15

Gul Faruk and Stacchetti Ennio ldquoWalrasianEquilibrium with Gross Substitutesrdquo Journalof Economic Theory 1999 87(1) pp 95ndash124

Kelso Alexander and Crawford Vincent P ldquoJobMatching Coalition Formation and GrossSubstitutesrdquo Econometrica 1982 50(6) pp1483ndash504

Lehmann Benny Lehmann Daniel and NisanNoam ldquoCombinatorial Auctions with De-

934 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

creasing Marginal Utilityrdquo Games and Eco-nomic Behavior 2005 (forthcoming)

Lien Yuan-Chuan and Yan Jun ldquoOn the GrossSubstitutes Conditionrdquo Unpublished Paper2003 httpwwwstamfordeduyclienTerm_Paper_Lien_Yanpdf

Martınez Ruth Masso Jordi Neme Alejandroand Oviedo Jorge ldquoSingle Agents and the Setof Many-to-One Stable Matchingsrdquo Journalof Economic Theory 2000 91(1) pp 91ndash105

Milgrom Paul R Putting auction theory towork Cambridge Cambridge UniversityPress 2004

Milgrom Paul R ldquoPutting Auction Theory toWork The Simultaneous Ascending Auc-tionrdquo Journal of Political Economy 2000108(2) pp 245ndash72

Porter David Rassenti Stephen RoopnarineAnil and Smith Vernon ldquoCombinatorial Auc-tion Designrdquo Proceedings of the NationalAcademy of Sciences 2003 100(19) pp11153ndash57

Reijnierse Hans van Gellekom Anita and PottersJos A M ldquoVerifying Gross SubstitutabilityrdquoEconomic Theory 2002 20(4) pp 767ndash76

Roth Alvin E ldquoThe Economics of Matching Sta-bility and Incentivesrdquo Mathematics of Opera-tions Research 1982 7(4) pp 617ndash28

Roth Alvin E ldquoStability and Polarization ofInterests in Job Matchingrdquo Econometrica1984 52(1) pp 47ndash57

Roth Alvin E ldquoThe College Admissions Prob-lem Is Not Equivalent to the Marriage Prob-lemrdquo Journal of Economic Theory 1985a36(2) pp 277ndash88

Roth Alvin E ldquoConflict and Coincidence ofInterest in Job Matching Some New Resultsand Open Questionsrdquo Mathematics of Oper-ations Research 1985b 10(3) pp 379ndash89

Roth Alvin E ldquoOn the Allocation of Residentsto Rural Hospitals A General Property ofTwo-Sided Matching Marketsrdquo Economet-rica 1986 54(2) pp 425ndash27

Roth Alvin E ldquoA Natural Experiment in theOrganization of Entry-Level Labor MarketsRegional Markets for New Physicians andSurgeons in the United Kingdomrdquo AmericanEconomic Review 1991 81(3) pp 415ndash40

Roth Alvin E and Peranson Elliott ldquoThe Rede-sign of the Matching Market for AmericanPhysicians Some Engineering Aspects ofEconomic Designrdquo American Economic Re-view 1999 89(4) pp 748ndash80

Roth Alvin E and Sotomayor Marilda Two-sided matching A study in game-theoreticmodeling and analysis Cambridge Cam-bridge University Press 1990

Sen Amartya Collective choice and social wel-fare San Francisco Holden-Day Inc 1970

Shapley Lloyd ldquoComplements and Substitutesin the Optimal Assignment Problemrdquo NavalResearch Logistics Quarterly 1962 9(1) pp45ndash48

935VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

Page 5: Matching with Contracts - Stanford Universityweb.stanford.edu/~milgrom/publishedarticles/Matching with... · 2005. 10. 22. · Gale-Shapley matching algorithm. Hence, the Gale-Shapley

Given a set of contracts X X offered in themarket doctor drsquos chosen set Cd(X) is eitherthe null set if no acceptable contracts are of-fered or the singleton set consisting of the mostpreferred contract We formalize this as follows

(1) Cd X

A if x XxD d x d A Amaxd

x XxD d otherwise

The choices of a hospital h are more compli-cated because it has preferences h over sets ofdoctors Its chosen set is a subset of the con-tracts that name it that is Ch(X) x XxH h In addition a hospital can sign onlyone contract with any given doctor

(2) h H X X x x ChXx

xf xD xD

Let CD(X) dD Cd(X) denote the set ofcontracts chosen by some doctor from set XThe remaining offers in X are in the rejectedset RD(X) X CD(X) Similarly the hos-pitalsrsquo chosen and rejected sets are denoted byCH(X) hH Ch(X) and RH(X) X CH(X)

B Stable Allocations Stable Sets ofContracts

In our model an allocation is a collection ofcontracts as that determines the payoffs to theparticipants We study allocations such thatthere is no alternative allocation that is strictlypreferred by some hospital and weakly pre-ferred by all of the doctors that it hires and suchthat no doctor strictly prefers to reject his con-tract It is a standard observation in matchingtheory that such an allocation is a core alloca-tion in the sense that no coalition of hospitalsand doctors can find another allocation feasiblefor them that all weakly prefer and somestrictly prefer This allocation is also a stableallocation in the sense that there is no coalitionthat can deviate profitably even if the deviatingcoalition assumes that outsiders will remainwilling to accept the same contracts

We formalize the notion of stable allocationsas follows

DEFINITION A set of contracts X X is astable allocation if

(i) CD(X) CH(X) X and(ii) there exists no hospital h and set of con-

tracts X Ch(X) such that

X Ch X X CD X X

If condition (i) fails then some doctor orhospital prefers to reject some contract thatdoctor or hospital then blocks the allocation Ifcondition (ii) fails then there is an alternativeset of contracts that a hospital strictly prefersand that its corresponding doctors weakly prefer

The first theorem states that a set of contractsis stable if any alternative contract would berejected by some doctor or some hospital fromits suitably defined opportunity set In the for-mulas below think of the doctorsrsquo opportunityset as XD and the hospitalsrsquo opportunity set asXH If X is the corresponding stable set then XDmust include in addition to X all contracts thatwould not be rejected by the hospitals and XHmust similarly include X and all contracts thatwould not be rejected by the doctors If X isstable then every alternative contract is rejectedby somebody so X XH XD This logic issummarized in the first theorem

THEOREM 1 If (XD XH) X2 is a solution tothe system of equations

(3) XD X RH XH

and

XH X RD XD

then XH XD is a stable set of contracts andXH XD CD(XD) CH(XH) Conversely forany stable collection of contracts X there ex-ists some pair (XD XH) satisfying (3) such thatX XH XD

Theorem 1 is formulated to apply to generalsets of contracts It is the basis of our analysis of

917VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

stable sets of contracts in the entire set of mod-els treated in this paper

II Substitutes

In this section we introduce our first restric-tion on hospital preferences which is the re-striction that contracts are substitutes We usethe restriction to prove the existence of a stableset of contracts and to study an algorithm thatidentifies those contracts

Our substitutes condition generalizes theRoth-Sotomayor substitutable preferences con-dition to preferences over contracts In wordsthe substitutable preferences condition statesthat if a contract is chosen by a hospital fromsome set of available contracts then that con-tract will still be chosen from any smaller setthat includes it Our substitutes condition issimilarly defined as follows

DEFINITION Elements of X are substitutesfor hospital h if for all subsets X X X wehave Rh(X) Rh(X)4

In the language of lattice theory which weuse below elements of X are substitutes forhospital h exactly when the function Rh isisotone

In demand theory substitutes is defined by acomparative static that uses prices It says thatlimiting attention to the domain of wage vectorsat which there is a unique optimum for thehospital the hospitalrsquos demand for any doctor dis nondecreasing in the wage of each otherdoctor d

Our next result verifies that for resource al-location problems involving prices our defini-tion of substitutes coincides with the standarddemand theory definition For simplicity wefocus on a single hospital and suppress its iden-tifier h from our notation Thus imagine that ahospital chooses doctorsrsquo contracts from a sub-set of X D W where D is a finite set of

doctors and W w w is a finite set ofpossible wages Assume that the set of wages Wis such that the hospitalsrsquo preferences are al-ways strict Suppose that w max W is aprohibitively high wage so that no hospital everhires a doctor at wage w

In demand theory it is standard to representthe hospitalrsquos market opportunities by a vectorw WD that specifies a wage wd at whicheach doctor can be hired We can extend thedomain of the choice function C to allow marketopportunities to be expressed by wage vectorsas follows

(4) w WDf Cw Cd wdd D

Formula (4) associates with any wage vector wthe set of contracts (d wd)d D and definesC(w) to be the choice from that set

With the choice function extended this waywe can now describe the traditional demandtheory substitutes condition The condition as-serts that increasing the wage of doctor d fromwd to wd (weakly) increases demand for anyother doctor d

DEFINITION C satisfies the demand-theorysubstitutes condition if (i) d d (ii) (dwd) C(w) and (iii) wd wd imply that (dwd) C(wd wd)

To compare the two conditions we need tobe able to assign a vector of wages to each setof contracts X It is possible that in X somedoctor is unavailable at any wage or is available atseveral different wages For a profit-maximizinghospital the doctorrsquos relevant wage is the low-est wage if any at which she is availableMoreover such a hospital does not distinguishbetween a doctor who is unavailable and onewho is available only at a prohibitively highwage Thus from the perspective of a profit-maximizing hospital having contracts X avail-able is equivalent to facing a wage vector W(X)specified as follows

(5) Wd X minss w or d s X

In view of the preceding discussion a profit-maximizing hospitalrsquos choices must obey thefollowing identity

4 This condition is identical in form to the ldquoconditionalphardquo used in the study of social choice for example byAmartya Sen (1970) but the meanings of the choice sets aredifferent In Senrsquos model the choice set is a collection ofmutually exclusive choices whereas in the matching prob-lems the set describes the choice itself

918 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

(6) CX CWX

THEOREM 2 Suppose that X D W is afinite set of doctor-wage pairs and that (6)holds Then C satisfies the demand theory sub-stitutes condition if and only if its contracts aresubstitutes

In particular this shows that the Kelso-Crawford ldquogross substitutesrdquo condition is sub-sumed by our substitutes condition

A A Generalized Gale-Shapley Algorithm

We now introduce a monotonic algorithmthat will be shown to coincide with the Gale-Shapley algorithm on its original domain Todescribe the monotonicity that is found in thealgorithm let us define an order on X X asfollows

(7) XD XH XD XH

N XD XD and XH XH

With this definition (X X ) is a finitelattice

The generalized Gale-Shapley algorithm isdefined as the iterated applications of a certainfunction F X X3 X X as defined below

(8) F1 X X RH X

F2 X X RD X

FXD XH F1 XH F2 F1 XH

As we have previously observed since the doc-torsrsquo choices are singletons a revealed prefer-ence argument establishes that the function RD X3 X is isotone If the contracts are substitutesfor the hospitals then the function RH X 3 Xis isotone as well When both are isotone thefunction F (X X ) 3 (X X ) isalso isotone that is it satisfies ((XD XH) (XD XH)) f (F(XD XH) F(XD XH))

Thus F X X 3 X X is an isotonefunction from a finite lattice into itself Usingfixed point theory for finite lattices the set offixed points is a nonempty lattice and iterated

applications of F starting from the minimumand maximum points of X X converge mono-tonically to a fixed point of F5 We summarizethe particular application here with the follow-ing theorem6

THEOREM 3 Suppose contracts are substi-tutes for the hospitals Then

(a) The set of fixed points of F on X X is anonempty finite lattice and in particularincludes a smallest element (X D X H) and alargest element (X D X H)

(b) Starting at (XD XH) (X A) the general-ized Gale-Shapley algorithm convergesmonotonically to the highest fixed point

X D X H

supX XFX X X X and

(c) Starting at (XD XH) (A X) the general-ized Gale-Shapley algorithm convergesmonotonically to the lowest fixed point

X D X H

infX XFX X X X

The facts that (X D X H) is the highest fixedpoint of F and that (X D X H) is the lowest in thespecified order mean that for any other fixedpoint (XD XH) X D XD X D and X H XH X H Because doctors are better off when theycan choose from a larger set of contracts it

5 This special case of Tarskirsquos fixed point theorem can besimply proved as follows Let Z be a finite lattice withmaximum point z Let z0 z z1 F(z0) zn F(zn1)Plainly z1 z0 and since F is isotone z2 F(z1) F(z0) z1 and similarly zn131 zn for all n So thedecreasing sequence zn converges in a finite number ofsteps to a point z with F( z) z Moreover for any fixedpoint z since z z z Fn( z) Fn(z) z for n large soz is the maximum fixed point A similar argument appliesfor the minimum fixed point

6 Hiroyuki Adachi (2000) and Federico Echenique andJorge Oviedo (2004) have also characterized the Gale-Shapley algorithm for the marriage problem and the collegeadmissions problem respectively as iterated applications ofa certain operator on a lattice See also Tamas Fleiner(2003)

919VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

follows that the doctors unanimously weaklyprefer CD(X D) to CD(XD) to CD(X D) and simi-larly that the hospitals unanimously preferCH(X H) to CH(XH) to CH(X H) Notice byTheorem 1 that CD(X D) CH(X H) X D X H and CD(X D) CH(X H) X D X H sowe have the following welfare conclusion

THEOREM 4 Suppose contracts are substi-tutes for the hospitals Then the stable set ofcontracts X D X H is the unanimously mostpreferred stable set for the doctors and theunanimously least preferred stable set for thehospitals Similarly the stable set X D X H isthe unanimously most preferred stable set forthe hospitals and the unanimously least pre-ferred stable set for the doctors

Theorems 3 and 4 duplicate and extend fa-miliar conclusions about stable matches in theGale-Shapley matching problem and a similarconclusion about equilibrium prices in theKelso-Crawford labor market model Thesenew theorems encompass both these older mod-els and additional ones with general contractterms

To see how the Gale-Shapley algorithm isencompassed consider the doctor-offering al-gorithm As in the original formulation we sup-pose that hospitals have a ranking of doctorsthat is independent of the other doctors they willhire so hospital h just chooses its nh mostpreferred doctors (from among those who areacceptable and have proposed to hospital h)

Let XH(t) be the cumulative set of contractsoffered by the doctors to the hospitals throughiteration t and let XD(t) be the set of contractsthat have not yet been rejected by the hospitalsthrough iteration t Then the contracts ldquoheldrdquo atthe end of the iteration are precisely those thathave been offered but not rejected which arethose in XD(t) XH(t) The process initiateswith no offers having been made or rejected soXD(0) X and XH(0) A

Iterated applications of the operator F de-scribed above define a monotonic process inwhich the set of doctors makes an ever-larger(accumulated) set of offers and the set of unre-jected offers grows smaller round by roundUsing the specification of F and starting fromthe extreme point (X A) we have

(9) XD t X RH XH t 1

XH t X RD XD t

After offers have been made in iteration t 1the hospitalrsquos cumulative set of offers is XH(t 1) Each hospital h holds onto the nh best offersit has received at any iteration provided thatmany acceptable offers have been made other-wise it holds all acceptable offers that havebeen made Thus the accumulated set of re-jected offers is RH(XH(t 1)) and the unre-jected offers are those in X RH(XH(t 1)) XD(t) At round t if a doctorrsquos contract is beingheld then the last offer the doctor made was itsbest contract in XD(t) If a doctorrsquos last offerwas rejected then its new offer is its best con-tract in XD(t) The contracts that doctors havenot offered at this round or any earlier one aretherefore those in RD(XD(t)) So the accumu-lated set of offers doctors have made are thosein X RD(XD(t)) XH(t) Once a fixed point ofthis process is found we have by Theorem 1 astable set of contracts XH(t) XD(t)

To illustrate the algorithm consider a simpleexample with two doctors and two hospitalswhere X D H and agents have the follow-ing preferences

(10) Pd1 h1 h2

Ph1 d1 d2 A

Pd2 h1 h2

Ph2 d1 d2 d1 d2 A

The algorithm is initialized with XD(0) X (d1 h1) (d1 h2) (d2 h1) (d2 h2) andXH(0) A Table 1 applies the operator givenin (9) to illustrate the algorithm

For t 1 starting from XD(1) X bothdoctors choose to work for the hospital h1 sothey reject their contracts with hospital h2 thusRD(XD(1)) (d1 h2) (d2 h2) Next XH(1) iscalculated as the complement of RD(XD(1)) soXH(1) (d1 h1) (d2 h1) From XH(1) thehospitals choose (d1 h1) and reject (d2 h1)completing the row for t 1

920 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

For t 2 we first compute XD(2) as thecomplement of RH(XH(1)) The doctors choose(d1 h1) (d2 h2) so they reject (d1 h2) Thehospitals must then choose from the comple-ment XH(2) X (d1 h2) The hospitalschoose (d1 h1) and (d2 h2) and reject (d2 h1) Inthe third round XD(3) XD(2) and the processhas reached a fixed point

The example illustrates the monotonicity ofthe algorithm XH(t) grows larger step by stepwhile XD(t) grows smaller At termination of thealgorithm the intersection of the choice sets isthe stable set of contracts XH(3) XD(3) (d1 h1) (d2 h2) Moreover when XD(t) andXH(t) are interpreted as suggested above theprocess XD(t) XH(t) described by (9) with theinitial conditions XD(0) X and XH(0) Acoincides with the doctor-offering Gale-Shapley algorithm

For the hospital-offering algorithm a similaranalysis applies but with a different interpreta-tion of the sets and a different initial conditionLet XD(t) be the cumulative set of contractsoffered by the hospitals to the doctors beforeiteration t and let XH(t) be the set of contractsthat have not yet been rejected by the hospitalsup to and including iteration t Then the con-tracts ldquoheldrdquo at the end of iteration t are pre-cisely those that have been offered but notrejected which are those in XD(t 13 1) XH(t)With this interpretation the analysis is identicalto the one above The Gale-Shapley hospitaloffering algorithm is characterized by (9) andthe initial conditions XD(0) A and XH(0) X

The same logic applies to the Kelso-Crawfordmodel provided one extends their original treat-ment to include a version in which the workersmake offers in addition to the treatment inwhich firms make offers The words of thepreceding paragraphs apply exactly but a con-tract offer now includes a wage so for exam-ple a hospital whose contract offer is rejected

by a doctor may find that its next most preferredcontract to the same doctor is at a higher wage

B When Contracts Are Not Substitutes

It is clear from the preceding analysis thatthat definition of substitutes is just sufficient toallow our mathematical tools to be applied Inthis section we establish more We show thatunless contracts are substitutes for every hospi-tal the very existence of a stable set of contractscannot be guaranteed7

THEOREM 5 Suppose H contains at least twohospitals which we denote by h and h Furthersuppose that Rh is not isotone that is contractsare not substitutes for h Then there exist pref-erence orderings for the doctors in set D apreference ordering for a hospital h with asingle job opening such that regardless of thepreferences of the other hospitals no stable setof contracts exists

Together Theorems 3 and 5 characterize theset of preferences that can be allowed as inputsinto a matching algorithm if we wish to guar-antee that the outcome of the algorithm is astable set of contracts with respect to the re-ported preferences According to Theorem 3we can allow all preferences that satisfy substi-tutes and still reach an outcome that is a stablecollection of contracts According to Theorem5 if we allow any preference that does notsatisfy the substitutes condition then there issome profile of singleton preferences for theother parties such that no stable collection ofcontracts exists

7 Kelso and Crawford (1982) provide a particular exam-ple in which preferences do not satisfy substitutes and theredoes not exist a stable allocation

TABLE 1mdashILLUSTRATION OF THE ALGORITHM

XD(t) RD(XD(t)) XH(t) RH(XH(t))t 0 X (d1 h2) (d2 h2) A At 1 X (d1 h2) (d2 h2) (d1 h1) (d2 h1) (d2 h1)t 2 (d1 h1) (d1 h2) (d2 h2) (d1 h2) (d1 h1) (d2 h1) (d2 h2) (d2 h1)t 3 (d1 h1) (d1 h2) (d2 h2) (d1 h2) (d1 h1) (d2 h1) (d2 h2) (d2 h1)

921VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

This theory also reaffirms and extends theclose connection between the substitutes condi-tion and other concepts that has been estab-lished in the recent auctions literature withquasi-linear preferences Milgrom (2000) stud-ies an auction model with discrete goods inwhich the set of possible bidder values is re-quired to include all the additive functions8 Heshows that if goods are substitutes then a com-petitive equilibrium exists If however thereare at least three bidders and if there is anyallowed value such that the goods are not allsubstitutes then there is some profile of valuessuch that no competitive equilibrium existsFaruk Gul and Ennio Stacchetti (1999) establishthe same positive existence result They alsoshow that if preferences include all values inwhich a bidder wants only one particular goodas well as any one for which goods are not allsubstitutes and if the number of bidders issufficiently large then there is some profile ofpreferences for which no competitive equilib-rium exists Ausubel and Milgrom (2002) estab-lish that if (a) there is some bidder for whompreferences are not demand theory substitutes(b) values may be any additive function and (c)there are at least three bidders in total thenthere is some profile of preferences such that theVickrey outcome is not stable and the coreimputations do not form a lattice Conversely ifall bidders have preferences that are demandtheory substitutes then the Vickrey outcome isin the core and the core imputations do form alattice Taken together these results establish aclose connection between the substitutes condi-tion the cooperative concept of the core thenoncooperative concepts of Vickrey outcomesand competitive equilibrium

C ldquoVacancy Chainrdquo Dynamics

Suppose that a labor market has reached equi-librium with all interested doctors placed

at hospitals in a stable match Then suppose onedoctor retires Imagine a process in which ahospital seeks to replace its retired doctor byraiding other hospitals to hire additional doc-tors If the hospital makes an offer that wouldsucceed in hiring a doctor away from anotherhospital the affected hospital has three optionsit may make an offer to another doctor (orseveral) improve the terms for its current doc-tor or leave the position vacant Suppose itmakes whatever contract offer would best serveits purposes

In models with a fixed number of positionsand no contracts this process in which doctorsand vacancies move from one hospital to an-other has been called vacancy chain dynamics(Blum et al 1997) Kelso and Crawford (1982)consider similar dynamics in the context of theirmodel

The formal results for our extended model aresimilar to those of the older theories Startingwith a stable collection of contracts X let XHbe the set of contracts that some doctor weaklyprefers to her current contract in X and letXD X (X XH) As in the proof ofTheorem 1 we have F(XD XH) (XD XH) andX XD XH

To study the dynamic adjustment that resultsfrom the retirement of doctor d we suppose theprocess starts from the initial state (XD(0)XH(0)) (XD XH) This means that the employ-ees start by considering only offers that are atleast as good as their current positions and thathospitals remember which employees have re-jected them in the past The doctorsrsquo rejectionfunction is changed by the retirement of doctord to RD where RD(X) RD(X) x XxD d that is in addition to the old rejec-tions all contract offers addressed to the retireddoctor are rejected

To synchronize the timing with our earliernotation let us imagine that hospitals makeoffers at round t 1 and doctors accept or rejectthem at round t Hospitals consider as poten-tially available the doctors in XH(t 1) X RD(XD(t 1)) and the doctors then reject all butthe best offers so the cumulative set of offersreceived is XD(t) X RH(XH(t 1)) Define

(11) FXD XH X RHXH X RDXD

8 A valuation function is additive if the value of any setof items is the sum of the separate values of the elementsSuch a function v is also described as ldquomodularrdquo Additivityis equivalent to the requirement that for all sets A and Bv(A B) 13 v(A B) v(A) 13 v(B)

922 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

If contracts are substitutes for the hospitalsthen F is isotone and since F(XD XH) (XDXH) it follows that F(XD XH) (XD XH)Then since (XD(0) XH(0)) (XD XH) we have(XD(1) XH(1)) F(XD(0) XH(0)) (XD(0)XH(0)) Iterating (XD(n) XH(n)) F(XD(n 1) XH(n 1)) (XD(n 1) XH(n 1)) thedoctors accumulate offers and the contracts thatare potentially available to the hospitals shrinkA fixed point is reached and by Theorem 1 itcorresponds to a stable collection of contracts

THEOREM 6 Suppose that contracts are sub-stitutes and that (XD XH) is a stable set ofcontracts Suppose that a doctor retires and thatthe ensuing adjustment process is described by(XD(0) XH(0)) (XD XH) and (XD(t) XH(t)) F(XD(t 1) XH(t 1)) Then the sequence(XD(t) XH(t)) converges to a stable collectionof contracts at which all the unretired doctorsare weakly better off and all the hospitals areweakly worse off than at the initial state (XDXH)9

The sequence of contract offers and jobmoves described by iterated applications of Fincludes possibly complex adjustments Hospi-tals that lose a doctor may seek several replace-ments Hospitals whose doctors receive contractoffers may retain those doctors by offering bet-ter terms or may hire a different doctor and laterrehire the original doctor at a new contract Allalong the way the doctors find themselveschoosing from more and better options and thehospitals find themselves marching down theirpreference lists by offering costlier terms pay-ing higher wages or making offers to otherdoctors whom they had earlier rejected

III Law of Aggregate Demand

We now introduce a second restriction onpreferences that allows us to prove the next tworesults about the structure of the set of stablematches We call this restriction the law ofaggregate demand Roughly this law states that

as the price falls agents should demand more ofa good Here price falls correspond to morecontracts being available and more demandcorresponds to taking on (weakly) more con-tracts We formalize this intuition with the fol-lowing definition

DEFINITION The preferences of hospital h H satisfy the law of aggregate demand if for allX X Ch(X) Ch(X)

According to this definition if the set ofpossible contracts expands (analogous to a de-crease in some doctorsrsquo wages) then the totalnumber of contracts chosen by hospital h eitherrises or stays the same The corresponding prop-erty for doctor preferences is implied by re-vealed preference because each doctor choosesat most one contract Just as for the substitutescondition when wages are endogenous we in-terpret the definition as applying to the domainof wage vectors for which the hospitalrsquos opti-mum is unique

The next theorem shows the important rela-tionship between profit maximization substi-tutes and the law of aggregate demand

THEOREM 7 If hospital hrsquos preferences arequasi-linear and satisfy the substitutes condi-tion then they satisfy the law of aggregatedemand

Below we use the law of aggregate demandto characterize both necessary and sufficientconditions for the rural hospitalsrsquo property andensure that truthful revelation is a dominantstrategy for the doctors Previously in matchingmodels without money the dominant strategyresult was known only for responsive prefer-ences with capacity constraints (Abdulkadiro-glu 2003) We subsume that result with ourtheorem

A Rural Hospitals Theorem

In the match between doctors and hospitalscertain rural hospitals often had trouble fillingall their positions raising the question ofwhether there are other core matches at whichthe rural hospitals might do better Roth (1986)analyzed this question for the case of X D

9 The theorem does not claim and it is not generally truethat this new point must be the new doctor-best stable set ofcontracts

923VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

H and responsive preferences and found thatthe answer is no every hospital that has unfilledpositions at some stable match is assigned ex-actly the same doctors at every stable match Inparticular every hospital hires the same numberof doctors at every stable match

In this section we show by an example thatthis last conclusion does not generalize to thefull set of environments in which contracts aresubstitutes10 We then prove that if preferencessatisfy the law of aggregate demand and substi-tutes then the last conclusion of Rothrsquos theoremholds every hospital signs exactly the samenumber of contracts at every point in the corealthough the doctors assigned and the terms ofemployment can vary Finally we show thatany violation of the law of aggregate demandimplies that preferences exist such that theabove conclusion does not hold

Suppose that H h1 h2 and D d1 d2d3 For hospital h1 suppose its choices maxi-mize where d3 d1 d2 d1 d2 A d1 d3 d2 d3 This prefer-ence satisfies substitutes11 Suppose h2 has oneposition with its preferences given by d1 d2 d3 A Finally suppose d1 and d2prefer h1 to h2 while d3 has the reverse prefer-ence Then the matches X (h1 d3) (h2 d1)and X (h1 d1) (h1 d2) (h2 d3) are bothstable but hospital h1 employs a different num-ber of doctors and the set of doctors assigneddiffers between the two matches

This example involves a failure of the law ofaggregate demand because as the set of con-tracts available to h1 expands by the addition of(h1 d3) to the set (h1 d1) (h1 d2) the numberof doctors demanded declines from two to oneWhen the law of aggregate demand holds how-ever we have the following result

THEOREM 8 If hospital preferences satisfysubstitutes and the law of aggregate demandthen for every stable allocation (XD XH) andevery d D and h H Cd(XD) Cd(X D)

and Ch(XH) Ch(X H) That is every doctorand hospital signs the same number of contractsat every stable collection of contracts

The next theorem verifies that the counterex-amples developed above can always be gener-alized whenever any hospitalrsquos preferencesviolate the law of aggregate demand

THEOREM 9 If there exists a hospital h setsX X X such that Ch(X) Ch(X) andat least one other hospital then there existsingleton preferences for the other hospitalsand doctors such that the number of doctorsemployed by h is different for two stablematches

Theorem 9 establishes that the law of aggre-gate demand is not only a sufficient conditionfor the rural hospitals result of Theorem 8 butin a particular sense a necessary one as well

B Truthful Revelation as a DominantStrategy

The main result of this section concerns doc-torsrsquo incentives to report their preferences truth-fully For the doctor-offering algorithm ifhospital preferences satisfy the law of aggregatedemand and the substitutes condition then it isdominant strategy for doctors to reveal truth-fully their preferences over contracts12 We fur-ther show that both preference conditions playessential roles in the conclusion

We will show the positive incentive result forthe doctor-offering algorithm in two stepswhich highlight the different roles of the twopreference assumptions First we show that thesubstitutes condition by itself guarantees thatdoctors cannot benefit by exaggerating the rank-ing of an unattainable contract More preciselyif there exists a preferences list for a doctor dsuch that d obtains contract x by submitting thislist then d can also obtain x by submitting apreference list that includes only contract xSecond we will show that adding the law of

10 A similar example appears in Ruth Martınez et al(2000)

11 These preferences however do not display the ldquosingleimprovement propertyrdquo that Gul and Stacchetti (1999) in-troduce and show is characteristic of substitutes preferencesin models with quasi-linear utility

12 It is of course not a dominant strategy for hospitals totruthfully reveal nor would it be so even if we consideredthe hospital-offering algorithm For further discussion ofthis point see Roth and Sotomayor (1990)

924 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

aggregate demand guarantees that a doctor doesat least as well as reporting truthfully as byreporting any singleton Together these are thedominant strategy result

To understand why submitting unattainedcontracts cannot help a doctor d consider thefollowing Let x be the most-preferred contractthat d can obtain by submitting any preferencelist (holding all other submitted preferencesfixed) Note that all that d accomplishes whenreporting that certain contracts are preferred to xis to make it easier for some coalition to blockoutcomes involving x Thus if x is attainablewith any report it is attainable with the reportPd x that ranks x as the only acceptable con-tract This intuition is captured in the followingtheorem

THEOREM 10 Let hospitalsrsquo preferences sat-isfy the substitutes condition and let the match-ing algorithm produce the doctor-optimalmatch Fixing the preferences of hospitals andof doctors besides d let x be the outcome that dobtains by reporting preferences Pd z1 dz2 d

d zn d x Then the outcome that dobtains by reporting preferences Pd x is also x

Some other doctors may be strictly better offwhen d submits her shorter preference list thereare fewer collections of contracts that d nowobjects to so the core may become larger andthe doctor-optimal point of the enlarged coremakes all doctors weakly better off and maymake some strictly better off

Without the law of aggregate demand how-ever it may still be in a doctorrsquos interest toconceal her preferences for unattainable posi-tions To see this consider the case with twohospitals and three doctors where contracts aresimply elements of D H and let preferences be

(12) Pd1 h1 h2

Ph1 d3 d1 d2 d1 d2

Pd2 h2 h1

Ph2 d1 d2 d3

Pd3 h2 h1

With these preferences the only stable matchis (d1 h2) (d3 h1) which leaves d2 unem-ployed However if d2 were to reverse herranking of the two hospitals then (d1 h1) (d2h1) (d3 h2) would be chosen by the doctor-offering algorithm leaving d2 better off Essen-tially by offering a contract to h2 d2 haschanged the number of positions availableWhen the preferences of the hospitals satisfythe law of aggregate demand however mak-ing more offers to the hospitals (weakly) in-creases the number of contracts the hospitalsaccept

THEOREM 11 Let hospitalsrsquo preferences sat-isfy substitutes and the law of aggregate de-mand and let the matching algorithm producethe doctor-optimal match Then fixing the pref-erences of the other doctors and of all thehospitals let x be the contract that d obtains bysubmitting the set of preferences Pd z1 dz2 d

d zn d x Then the preferences Pd y1 y2 yn x yn131 yN

obtain a contract that is Pd-preferred or indif-ferent to x

According to this theorem when a doctorrsquostrue preferences are Pd the doctor can never dobetter according to these true preferences thanby reporting the preferences truthfully

In fact the law of aggregate demand is ldquoal-mostrdquo a necessary condition as well The excep-tions can arise because certain violations of thelaw of aggregate demand are unobservable fromthe choice data of the algorithm and these can-not affect incentives Thus consider an examplewhere terms t are included in the contract andwhere a hospital h has preferences (d1 ht1) (d1 h t1) (d2 h t2) (d1 h t1) (d2 h t2) Although these preferences violatethe law of aggregate demand the algorithm willnever ldquoseerdquo the violation as either (d1 h t1) d1

(d1 h t1) or (d1 h t1) d1(d1 h t1) Thus

whichever terms that d1 first offers will deter-mine a conditional set of preferences for thehospital that does satisfy the law of aggregatedemand (The hospital will never reject an offerof either (d1 h t1) or (d1 h t1))

The next theorem says that if some hospitalrsquospreferences violate the law of aggregate demandin a way that can even potentially be observed

925VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

from the hospitalrsquos choices then there existpreferences for the other agents such that it isnot a dominant strategy for doctors to reporttruthfully even when the other assumptions wehave used are satisfied

THEOREM 12 Let hospital h have prefer-ences such that Ch(X) Ch(X x) and letthere exist two contracts y z such that yD zD xD yD and y z Rh(X x) Rh(X)Then if another hospital h exists there existsingleton preferences for the hospitals besides hand preferences for the doctors such that it isnot a dominant strategy for all doctors to revealtheir preferences truthfully

Thus to the extent that the law of aggregatedemand for hospital preferences has observableconsequences for the progress of the doctor-offering algorithm it is an indispensable condi-tion to ensure the dominant strategy property fordoctors

IV Classes of Conforming Preferences

Although the class of substitutes valuations isquite limited13 it is broader than the set ofresponsive preferences in useful ways Thesubstitutes valuations accommodate all the af-firmative action and subspecialty constraints de-scribed above and allow a doctorrsquos marginalproduct to depend on which other doctors thehospital attracts

In this section we introduce a parameterizedclass of quasi-linear substitutes valuations forhospitals evaluating sets of new hires The val-uations are based on an endowed assignmentmodel according to which hospitals have a set

of jobs to fill and an existing endowment ofdoctors while doctorsrsquo productivities varyamong jobs A hospital values new doctors ac-cording to the their incremental value in theassignment problem

From a general job assignment perspectivethe key restrictions of endowed assignment val-uations are that each doctor can do one and onlyone job and that the hospitalrsquos output is the sumof outputs of its various jobs A hospital cannotuse one doctor for two jobs nor can it combinethe skills of two doctors in the same job Alsothere is no interaction in the productivity ofdoctors in different jobs Given this mathemat-ical structure if a doctor is lost it will always beoptimal for the hospital to retain all of its otherdoctors although it may choose to reassignsome of the retained doctors to fill vacatedpositions

Another way to describe the set of endowedassignment valuations VEA is to build it upfrom three properties as follows First a sin-gleton valuation is one of the form v(S) maxdSd for some nonnegative vector Sin-gleton valuations represent the possible valua-tions by a hospital with just one opening andVEA includes all singleton valuations Second ifa hospital is composed of two units j 1 2each of which has a valuation vj VEA then thehospitalrsquos maximum value from assigningworkers between its units denoted by (v1 v2)(S) maxRSv1(R) 13 v2(S R) is also inthe set We call this property closure underaggregation Third if a hospitalrsquos value is de-rived from a value in VEA by endowing thehospital with a set of doctors T then the hospi-talrsquos incremental value for extra doctorsv(ST) v(S T) v(T) is also in the set VEAWe call this property closure under endowmentFinally two valuations v1 and v2 are calledequivalent if they differ by an additive con-stant For example for any fixed set of doctorsT v( T) is equivalent to v( T)

THEOREM 13 Let VEA denote the smallestfamily of valuations of sets of doctors that in-cludes all the singleton valuations and is closedunder aggregation and endowment Then foreach v VEA there exists a set of jobs J a setof doctors T and a (D 13 T) J-matrix [ij]such that v is equivalent to the following

13 Hans Reijnierse et al (2002) (see also Yuan-ChuanLien and Jun Yan 2003) have characterized the valuationfunctions that satisfy the substitutes condition as followsLet v(S) be the hospitalrsquos value of doctor set S and letvS(T) v(S T) v(S) denote the incremental value of theset of doctors T Then doctors are substitutes if for every setS and three other doctors d1 d2 and d3 there is no uniquemaximum in vS(d1) 13 vS(d2 d3) vS(d2) 13 vS(d1 d3)vS(d3) 13 vS(d1 d2)

926 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

(13) vSJ T maxz

d S

djzdj subject to

d S

zdj 1 for j J

j J

zdj 1 for d S T0 for d S T

zdj 0 1 for all d j

Conversely for every such J T and v( J T) VEA

We dub this family of valuations the endowedassignment valuations because of the form ofoptimization (13) The family VEA is an exten-sion of the assignment valuations derived byLloyd Shapley (1962) used by Roth (19841985b) in models of matching with wages andexplicit job assignments and emphasized in astudy of package bidding by Lehmann et al(2001) The endowed assignment valuations arequite useful for applications They also fit nicelywith the theory reported in previous sections forthe following reason

THEOREM 14 Every endowed assignmentvaluation v( J T) VEA is a substitutesvaluation

To the best of our knowledge all of thesubstitutes valuations that have been used orproposed for practical applications are includedamong the endowed assignment valuations In-deed the question of whether all substitutesvaluations are endowed assignment valuationsis an open one Here we review some of themost popular valuations to show how they fitinto the class

The most commonly studied class of prefer-ences for matching problems like the Match forwhich employment terms are exogenouslyfixed are the responsive preferences Thesespecify that each hospital h has a fixed numberof openings nh a set of acceptable doctors Dh

A D and a strict ordering h of the acceptabledoctors When a doctor is unacceptable thatmeans that hiring the doctor is always worsethan leaving her position unfilled Given any setof available doctors the hospital hires its nh

most preferred acceptable doctors if that manyare available and otherwise hires all of theacceptable doctors

To map responsive preferences into the as-signment problem framework define a utilityfunction uh D3 to represent h and set theminimum acceptable utility to zero Formally(1) if d d Dh

A then d h dN uh(d) uh(d)and (2) d Dh

AN uh(d) 0 Using this utilitywe specify an assignment problem as followsJ 1 nh and dj uh(d) 13 1 and fix thewage at 1 Using a positive wage is a device toensure that the hospital strictly prefers not tohire a doctor it plans not to assign to any job Itis evident that with this valuation preferencethe hospital most prefers to hire the set of avail-able acceptable doctors with the highest rank-ing according to h

Among the extensions of responsive prefer-ences that have been most important in practiceare ones to accommodate quotas of variouskinds For example one use of quotas is tomanage subspecialties of internal medicine inwhich a certain number of positions are to befilled by doctors planning that subspecialty ifenough acceptable doctors are available Onecan reserve ms jobs for subspecialty s by pro-viding that there are ms jobs in which doctors inthat subspecialty have their productivity in-creased by a large constant M Then if msdoctors in subspecialty s are available at leastthat many will be demanded at the optimalsolution to (13) If that many qualified doctorsare not available the jobs will be filled by otherdoctors according to their productivities

Another use of quotas is for an affirmativeaction policy that absolutely reserves jobs formembers of certain target groups For each af-firmative action group G define a correspond-ing set of jobs JG and let J G JG Specifythat for any doctor d G and job j JG dj uh(d) and otherwise dj 0 One can alsointroduce an unrestricted category of jobs j thatany doctor can fill with productivity dj uh(d) This obviously ensures that a certainnumber of jobs are reserved for each targetgroup

A recent treatment of affirmative action byRoth (1991) extended by Abdulkadiroglu(2003) uses the class of responsive preferenceswith capacity constraints This class requires

927VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

that the set of doctors be partitioned into a finitenumber of affirmative action groups and that foreach group G the hospital has a capacity mG thatlimits the number of doctors who can be hiredfrom that group In addition at most nh doctorsin total can be hired

To represent such preferences using endowedassignment valuations let us specify that thereare mG jobs of type G and yenG mG jobs in totalThe hospital is endowed with nh yenG mGdoctors The endowed doctors have productivityij M in every job where M is a largenumber This ensures that at most nh new doc-tors will be hired at any optimum For thenonendowed doctors we calculate productivi-ties uh(d) in the same fashion as for the respon-sive preferences and set dj uh(d) for jobs j oftype G and dj 0 for all other jobs Thisensures that at most mG doctors will be hiredfrom group G By inspection this specificationrepresents Abdulkadiroglursquos affirmative actionpreferences

Unlike the specifications used for the currentNational Resident Matching Program algo-rithm the endowed assignment valuations per-mit overlapping affirmative action categoriesFor example suppose that a small hospital has atarget of hiring one female and one minoritydoctor In the endowed assignment structurethe hospital may assign a minority female doc-tor to fill either a minority slot or a female slotbut not both This is necessary to retain thesubstitutes demand structure for otherwisemaking a minority female doctor availablecould lead the hospital to hire a nonminoritymale doctor whom it would otherwise reject

Endowed assignment valuations thus providea flexible parameterized way for hospitals torepresent their preferences for matching with orwithout wages using a class of quasi-linear pref-erences that satisfies the substitutes conditionand the law of aggregate demand

V Cumulative Offer Processes and Auctions

The algorithms described by the system (9)with different starting points have the propertythat they can terminate only at a stable set ofcontracts Nevertheless unless preferences sat-isfy the substitutes condition the system is notguaranteed to converge at all even when a fixed

point exists In this section we offer a differentcharacterization of the Gale-Shapley doctor-offering algorithm that will prove especiallywell suited to situations in which contracts maynot be substitutes but in which there is just oneldquohospitalrdquo the auctioneer For now we allowthe possibility that there are several hospitals

The alternative representation is constructedby replacing the system of equations (9) by thefollowing system

(14) XD t X RH XH t 1

XH t XH t 1 CD XD t

We call the algorithm that begins with XD(0) X and XH(0) A and obeys (14) a cumulativeoffer process because the formalism capturesthe idea that hospitals accumulate offers fromdoctors in the set XH(t) and hold their bestchoices CH(XH(t)) from the accumulated setThere is no assumption of consistency imposedon the algorithm so it is possible that severalhospitals are ldquoholdingrdquo contract offers from thesame doctor The corresponding allocation is ofcourse infeasible since each doctor can ulti-mately accept just one contract

At each round t of the cumulative offer pro-cess all doctors make their best offers from theset of not-yet-rejected choices XD(t) but anydoctor d for whom a contract is being heldsimply repeats one of its earlier offers Thusnew offers are made only by doctors who havebeen rejected

To see why this is so let x CH(XH(t)) be acontract that is being held and consider thecorresponding doctor xD d By revealed pref-erence doctor d strictly prefers x to any contractthat she has not yet offered since those con-tracts were available to offer at the time that xwas offered Since drsquos most preferred contractin Xd(t) at the current time must be weaklypreferred to x it must be coincide with one ofdrsquos earlier offers

The second equation of system (14) is the onethat distinguishes the cumulative offer processfrom the system in (9) In the cumulative offerprocess without any assumptions about hospi-talsrsquo preferences XH(t) grows monotonicallyfrom round to round so the sequence of setsconverges In contrast the earlier process was

928 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

guaranteed to converge only when contracts aresubstitutes for the hospitals

When contracts are substitutes the two sys-tems of equations are equivalent

THEOREM 15 Suppose that contracts aresubstitutes for the hospitals and that XD(0) Xand XH(0) A Then the sequences of pairs(XD(t) XH(t)) generated by the two laws ofmotion (9) and (14) are identical

Even with the initial condition XD(0) X andXH(0) A the algorithms described by (9) and(14) may differ when contracts are not substi-tutes In that case by inspection of the system(14) the cumulative offer process still con-verges because XH(t) is bounded by the finiteset X and grows monotonically from round toround What is at issue is whether the hospitalrsquoschoice from its final search set in the cumulativeoffer process is a feasible and stable set ofcontracts

We will find below that when there is a singlehospital the outcome is indeed a feasible andstable set of contracts In that case the cumu-lative offer process coincides with the general-ized proxy auction of Ausubel and Milgrom(2002) Those authors analyze in detail the casewhen a bid consists of a price and a subset of theset of goods that the bidder wishes to buy Ateach round the seller ldquoholdsrdquo the collection ofbids that maximizes its total revenues subject tothe constraint that each good can be sold onlyonce The generalized proxy auction howeveris not limited to the sale of goods and in fact isidentical in scope to our present model ofmatching with contracts In particular the auc-tioneer may impose a variety of constraints onthe feasible collections of bids and may weighnonprice factors either exclusively or in com-bination with prices to decide which collectionof bids to hold Bidders for their part maymake bids that include factors besides price andmay not include price at all

To illustrate the role of general contracts inthis auction setting consider the auction designsuggested by Paul Brewer and Charles Plott(1996) in which bidders seek to buy access to arailroad track In that application a bid specifiesa trainrsquos direction of travel departure and ar-rival times and price offered It is assumed that

trains travel at a uniform speed along the trackIn this setting the contract terms must includethe direction and the two times and the seller isconstrained to hold only combinations of bidssuch that trains maintain safe distances fromone another at all times

A second example of the generalized proxyprocess is a procurement auction in which thebuyer scores suppliers on the basis of suchfactors as quality excess capacity credit ratingand historical reliability as well as price and inwhich the buyer prefers to set aside someamount of its purchase for minority contractorsor to maintain geographic diversity of supply toreduce the chance of supply disruptions In anasset sale the seller may weigh the probabilitythat the sale will be completed for example dueto financing contingencies or because a union orantitrust regulators must approve the sale

The cumulative offer process model withgeneral contracts accommodates all of thesepossibilities The auctioneer in the model cor-responds to a single ldquohospitalrdquomdashhereafter theauctioneermdashwith a choice function CH thatselects her most preferred collection of contractproposals We have the following result (whichis first stated using different notation than in theAusubel-Milgrom paper)

THEOREM 16 When the doctor-offering cu-mulative offer process with a single hospitalterminates at time t with outcome (XD(t) XH(t))the hospitalrsquos choice CH(XH(t)) is a stable col-lection of contracts

Cumulative offer processes connect the the-ory of matching with contracts to the emergingtheory of package auctions and auctions withcomplex constraints

VI Conclusion

We have introduced a general model ofmatching with bilateral contracts that encom-passes and extends two-sided matching modelswith and without money and certain auctionmodels The new formulation allows some con-tract terms to be exogenously fixed and others tobe endogenous in any combinations In thisvery general framework we characterize stable

929VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

collections of contracts in terms of the solutionto a certain system of equations

The key to the analysis is to extend twoconcepts of demand theory to models with orwithout prices The first concept to be extendedis the notion of substitutes Our definition ap-plies essentially the Roth-Sotomayor substitut-able preferences condition to a more generalclass of contracts contracts are substitutes ifwhenever the set of feasible bilateral contractsexpands the set of contracts that the firm rejectsalso expands We show that (a) our definitioncoincides with the usual demand theory condi-tion when both apply (b) when contracts aresubstitutes a stable collection of contracts ex-ists and (c) if any hospital or firm has prefer-ences that are not substitutes then there arepreferences with single openings for each otherfirm such that no stable allocation exists Wefurther show that when the substitute conditionapplies (a) both the doctor-offering and hospi-tal-offering Gale-Shapley algorithms can berepresented as iterated operations of the sameoperator (starting from different initial condi-tions) and (b) starting at a stable allocationfrom which a doctor retires a natural marketdynamic mimics the Gale-Shapley process tofind a new stable allocation

The second relevant demand theory conceptis the law of demand which we extend both toinclude heterogeneous inputs and to encompassmodels with or without prices The law of ag-gregate demand condition holds that when theset of feasible contracts expands the number ofcontracts that the firm chooses to sign weaklyincreases In terms of traditional demand theorythis means that for example when the wages ofsome of a heterogeneous group of workers fallsif the workers are substitutes then the totalnumber of workers employed rises We showthat (a) when inputs are substitutes the choicesof a profit-maximizing firmhospital satisfy thelaw of aggregate demand Moreover when thechoices of every hospitalfirm satisfy the law ofaggregate demand and the substitutes conditionthen (b) the set of workersdoctors employed isthe same at every stable allocation (c) the num-ber employed by each firmhospital is also thesame and (d) truthful reporting is a dominantstrategy for doctors in the doctor-offering algo-rithm Moreover we prove (e) that if the law of

aggregate demand fails in any potentially ob-servable way then the preceding dominantstrategy property does not hold

For these results to be useful for practicalmechanism design one needs to account forhow preferences especially hospital prefer-ences are to be reported to the mechanismThere needs to be a convenient way for hospi-tals to express a rich array of preferences andone needs to know whether the preferences be-ing reported actually satisfy the conditions ofthe various theorems Toward that end we in-troduce a parametric form that we call extendedassignment valuations which strictly general-izes several existing specifications and whichalways satisfies both the substitutes and law ofaggregate demand conditions

Finally we introduce an alternative treatmentof the doctor-offering algorithm the cumulativeoffer process We show that when contracts aresubstitutes the previously characterized doctor-offering algorithm coincides exactly with a cu-mulative offer process When contracts are notsubstitutes but there is just one hospital (theldquoauctioneerrdquo) the cumulative offer process co-incides with the Ausubel-Milgrom ascendingproxy auction This identity clarifies the con-nection between these algorithms and com-bined with the dominant strategy theoremreported above generalizes the Ausubel-Milgromdominant strategy theorem for the proxyauctions

Our new approach reveals deep similaritiesamong several of the most successful auctionand matching designs in current use and amongthe environmental conditions in which theoret-ically the mechanisms should perform at theirbest Understanding these similarities can helpus to understand the limitations of these mech-anisms paving the way for new designs

APPENDIX

PROOF OF THEOREM 1Let (XD XH) X2 be a solution to (3) Then

XD XH XD RD(XD) CD(XD) andsimilarly XH XD XH RH(XH) CH(XH)so XH XD CH(XH) CD(XD)

Next we show that X XH XD is a stableset of contracts Since X CH(XH) CD(XD)it follows by revealed preference that X

930 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

CH(X) CD(X) so condition (i) of the defi-nition of stability is satisfied

Consider any hospital h and set of contractsX CD(X X) naming hospital h Since X CD(XD) revealed preference of the doctorsimplies that X XD CD(XD) and hence thatX RD(XD) X XD RD(XD) CD(XD) RD(XD) A Thus X X RD(XD) XHby (3) So if X Ch(X) then by the revealedpreference of hospital h X h Ch(XH) Ch(X) Hence X Ch(X X) so condition(ii) is satisfied So the set of contracts X isunblocked

For the converse suppose that X is a stablecollection of contracts Then CD(X) X LetXH be the set of contracts that the doctorsweakly prefer to X and XD the set of contractsthat doctors weakly disprefer By constructionX XH X XD X is a partition of X

To obtain (3) observe first that if there issome h such that Ch(XH) Xh then X Ch(XH) violates stability condition (ii) SoCh(XH) Xh for all h that is CH(XH) X Itfollows that X RH(XH) X (XH X) X (X XD) XD and that X RD(XD) X (XD CD(XD)) X (XD X) XH

Hence (XD XH) satisfies (3) and XH XD X

PROOF OF THEOREM 2Let i j ( j wj) C(w) and wi wi Define

Z(w) ( j wj)wj wj Then Z(wi wi) Z(w) If contracts are substitutes then R(Z(wiwi)) R(Z(w)) By (6) since ( j wj) C(w)it follows that ( j wj) C(Z(w)) so ( j wj) R(Z(w)) Hence ( j wj) R(Z(wi wi)) So ( jwj) Z(wi wi) R(Z(wi wi)) C(Z(wiwi)) and thus (j wj) C(wi wi) by assumption(6) Thus C satisfies demand theory substitutes

Conversely suppose contracts are not substi-tutes Then there exists a set X an element (iwi) X and ( j wj) R(X) such that ( j wj) R(X) where X X (i wi) Using (6)wi Wi(X) Let w W(X) and wi Wi(X)Then wi wi and ( j wj) C(w) but ( j wj) C(wi wi) so C does not satisfy the demandtheory substitutes condition

PROOF OF THEOREM 5We may limit attention to the case with

exactly two hospitals by specifying that

the doctors find the other hospitals to beunacceptable

Suppose Rh is not isotone Then there existssome x y X and X X such that for all x X xH h and such that x Rh(X) Rh(X y) By construction since x y Ch(X y) contracts x and y specify different doctorssay d1 xD yD d2 Let x and y denote thecorresponding contracts for doctors d1 and d2 inwhich hospital h is substituted for h

We specify preferences as follows first forhospital h we take x h y h A and allother contracts are unacceptable Second doc-tors in xD(CH(X) CH(X y)) d1 d2prefer their elements of CH(X) CH(X y)to any other contract Third d1 has x d1

x and ranks all other contracts lower Fourthd2 has y d2

y and ranks all other con-tracts lower Finally the remaining doctors findall contracts from hospitals h and h to beunacceptable

Consider a feasible acceptable allocation Xsuch that y X Since h and d2 can have onlyone contract in X x y X Then hrsquos con-tracts in X form a subset of X so x is notincluded and d1 has a contract less preferredthan x Then the deviation by (d1 h) to xblocks X

Consider a feasible acceptable allocation Xsuch that y X Then either x y X or Xis blocked by a coalition including h d1 and d2using the contracts x and y However if x y X then a deviation by (d2 h) to contract yblocks X

Since all feasible allocations are blockedthere exists no stable set of contracts

PROOF OF THEOREM 7Suppose X D H W and let Z(w) ( j

wj)wj wj Then the law of aggregate de-mand is the statement that for any wage vectorsw w satisfying w w such that the choices setsare singletons C(Z(w)) C(Z(w)) The proofis by contradiction Suppose the law of aggre-gate demand does not hold Then there exists awage vector w and a doctor d such that for some(and hence all) 0 C(Z(wd 13 wd)) C(Z(wd wd)) Since hrsquos preferences arequasi-linear changing doctor drsquos wage can af-fect the hiring of other doctors only if it affectsthe hiring of doctor d It follows that there are

931VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

exactly two optimal choices for the hospital atwage vector w these are C(Z(wd wd)) atwhich doctor d is hired and C(Z(wd 13 wd))at which d is not hired but such that two otherdoctors are hired that is there exist doctors dd C(Z(wd 13 wd)) C(Z(wd wd))Let the corresponding payoff for the hospital(when faced with wage vector w) be

Consider the wage vector w (wd wd 2 wdd) For positive and suffi-ciently small the hospitalrsquos payoff at wage vec-tor w is 13 2 if it chooses C(Z(wd 13 wd))and it is 13 if it chooses C(Z(wd wd))and one of these choices must be optimal SoC(w) C(Z(wd 13 wd)) But then raisingthe wage of doctor d from wd 2 to wd whileholding the other wages at wd reduces the de-mand for doctor d from one to zero in violationof the demand theory substitutes condition

PROOF OF THEOREM 8By definition XD X D so by revealed pref-

erence Cd(X D) Cd(XD) Also X H XH soby the law of aggregate demand Ch(X H) Ch(XH) By Theorem 1 CD(XD) CH(XH)and CD(X D) CH(X H) so yendD Cd(XD) yenhH Ch(XH) and yendD Cd(XD) yenhH Ch(XH)Combining these leads to yendD Cd(X D) yendD Cd(XD) yenhH Ch(XH) yenhH Ch(XH) yendD Cd(XD) which begins and ends with the samesum Hence none of the inequalities can bestrict

PROOF OF THEOREM 9Since Ch(X) Ch(X) there exists some

set Y X Y X and contract x such thatCh(Y) Ch(Y x) Since x Ch(Y x)(as otherwise Ch(Y) Ch(Y x) for thepreferences to be rationalizable) there must ex-ist two contracts y z Rh(Y x) Rh(Y)such that y x z y Moreover since y z Ch(Y) yD zD

Denoting by h the second hospital whose exis-tence is hypothesized by the theorem we specifypreferences as follows Let all the doctors with con-tracts in Y have those contracts be their most favoredand let all other doctors find any contract with hunacceptable Let all doctors find any contract notinvolving hospital h or h to be unacceptable

In principle there are three casesIf xD yD then let PxD

y x and PzD z

Then there exist two stable matches Ch(Y x) and Ch(Y) with zD employed in the firstmatch but not in the second

The case xD zD is symmetricFinally if yD xD zD then let x y z

denote contracts with hospital h where the doc-tors (and any other terms) are the same as in xy z respectively Specify the remaining prefer-ences by PxD

x x PyD y y PzD

z z and Ph y x A z Thenthere exist two different stable matches x Ch(Y) and y Ch(Y x) with zD em-ployed in the first match but not in the second

PROOF OF THEOREM 10Let X denote the collection of contracts cho-

sen by the algorithm when doctor d submitspreference Pd If this collection which is stableunder the reported preferences is not stableunder Pd then there exists a blocking coalitionThis blocking coalition must contain d as noother doctorrsquos preferences have changed butthat is impossible since x is drsquos favorite con-tract according to the preferences Pd Since X isstable under Pd the doctor-optimal stable matchunder Pd (the existence of which is guaranteedby Theorem 2) must make every doctor(weakly) better off than at X In particulardoctor d must obtain x

PROOF OF THEOREM 11From Theorem 10 Pd x also obtains x

Hence by the rural hospitals theorem d is em-ployed at every point in the core when Pd x issubmitted So every allocation X at which d isunemployed is blocked by some coalition andset of contracts when d submits Pd Conse-quently if d submits the preferences Pd y1 y2 yn x then every allocation at whichd is unemployed is still blocked by the samecoalition and set of contracts Since the doctor-best stable allocation is one at which d gets aPd-acceptable contract that allocation is weaklyPd-preferred to x Finally the doctor-optimalmatch when Pd is submitted is still the doctor-optimal match when Pd is submitted as drsquospreferences over contracts less preferred than xcannot be used to block a match where shereceives a contract weakly preferred to x

932 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

PROOF OF THEOREM 12Consider contracts x y and z such that

xD xD yD yD zD zD and xH yH zH h Let the preferences of the three identified bePxD

x x PyD y y and PzD

z z andlet those of h be Ph y z x Forthe other contracts x Y Ch(X) let x be xDrsquosmost favored contract For the remaining doctorslet any contract with h or h be unacceptable

With the preceding preferences the only sta-ble allocation includes contracts x and y leav-ing doctor zD unemployed If however zDmisrepresents her preferences and reports PzD

z z then the doctor-optimal stable matchincludes z leaving doctor zD better off

PROOF OF THEOREM 13Setting J 1 and T A it is clear by

inspection that this family includes all singletonvaluations

The family is closed under endowment be-cause given any such valuation v( J T)endowing a set of doctors T simply creates thevaluation v( J T T))

To verify that the family is closed underaggregation consider any two valuations v( J T) and v( J T) Since J and T are justindex sets we may assume without loss ofgenerality that T T J J A DefineT T T and J J J Let

(15) ij ij if i D T j Jij if i D T j J0 otherwise

By inspection of the optimization problems v( J T) v( J T) v( J T)

For the converse consider the valuation v( J T) given by (13) We derive it construc-tively from the singleton valuations aggrega-tion and endowment as follows Let vj be thesingleton valuation associated with row j inmatrix [ij] for j 1 J Since VEA isclosed under aggregation v1 vJ v( J A) VEA Since VEA is also closed underendowment we may endow the doctors in T toobtain v( J T) VEA

PROOF OF THEOREM 14L Shapley (1962) (see also Lehmann et al

2001) had already proved that every assignment

valuation without endowments v( J A) is asubstitutes valuation Ausubel and Milgrom(2002) prove that a valuation v is a substitutesvaluation if and only if the corresponding indi-rect profit function ((p) v(S) yendS pd) issubmodular Let be the indirect profit func-tion corresponding to v( J A) Then theindirect profit function corresponding to v( J T) is (p1 pN) (p1 pN 0 0)Since is the profit function of the substitutesvaluation vh it is submodular and hence issubmodular as well

PROOF OF THEOREM 15Suppose that contracts are substitutes for the

hospitals We proceed by induction The initialcondition specifies that the sequences are iden-tical through time t 0 Denote the sequencecorresponding to the cumulative offer processby a superscript C and denote the alternativeprocess defined by (9) with no superscript As-sume the inductive hypothesis that the se-quences are the same up to round t 1 andsuppress the corresponding superscripts for thevalues at that round Then XD(t) X RH(XH(t 1)) XD

C(t) This also implies that

(16) X XH t 1 XD t

To complete the proof we must show thatXH

C(t) XH(t) or equivalently that XH(t 1) CD(XD(t)) X RD(XD(t))

For t 2 XHC(t 2) XH

C(t 1) by con-struction so by the inductive hypothesis XH(t 2) XH(t 1) Since contracts are substitutesRH is isotone so X RH(XH(t 1)) X RH(XH(t 2)) and hence XD(t) XD(t 1)For t 1 the inclusion XD(t) XD(t 1) isimplied by the initial condition XD(0) X

Recall that by revealed preference RD isisotone It follows that RD(XD(t)) RD(XD(t 1)) and hence using (9) that XH(t 1) X RD(XD(t 1)) X RD(XD(t)) XH(t) ThusXH(t 1) XH(t 1) (X RD(XD(t))) XH(t 1) RD(XD(t)) So XH(t 1) CD(XD(t)) XH(t 1) (XD(t) RD(XD(t))) (XH(t 1) RD(XD(t))) (XD(t) RD(XD(t))) (XH(t 1) XD(t)) RD(XD(t)) X RD(XD(t)) where the last stepequality follows from (16)

933VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

PROOF OF THEOREM 16By construction any contract not in XH(t) is

less preferred by some doctor d than everycorresponding contract in XH(t) (because doctord offers her most preferred contracts in se-quence) So any collection of contracts thatincludes some not in XH(t) must be strictly lesspreferred by one of the doctors Any profitablecoalitional deviation must use only contracts inXH(t)

By construction the one hospitalauctioneermust be part of any deviating coalition andCH(XH(t)) is its strictly most preferred collectionof contracts in XH(t) so there is no profitablecoalitional deviation using just contracts in XH(t)

REFERENCES

Abdulkadiroglu Atila ldquoCollege Admissionswith Affirmative Actionrdquo Unpublished Pa-per 2003

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoBoston Public School MatchingrdquoAmerican Economic Review 2005a (Papersand Proceedings) 95(2) pp 368ndash71

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoThe New York City High SchoolMatchrdquo American Economic Review 2005b(Papers and Proceedings) 95(2) pp 364ndash67

Abdulkadiroglu Atila and Sonmez TayfunldquoSchool Choice A Mechanism Design Ap-proachrdquo American Economic Review 200393(3) pp 729ndash47

Adachi Hiroyuki ldquoOn a Characterization of Sta-ble Matchingsrdquo Economics Letters 200068(1) pp 43ndash49

Alkan Ahmet and Gale David ldquoStable ScheduleMatching under Revealed Preferencerdquo Jour-nal of Economic Theory 2003 112(2) pp289ndash306

Ausubel Lawrence M Cramton Peter and Mil-grom Paul R ldquoThe Clock-Poxy Auction APractical Combinatorial Auction Designrdquo inPeter Cramton Yoav Shoham and RichardSteinberg eds Combinatorial auctionsCambridge MA MIT Press 2005 ch 5

Ausubel Lawrence M and Milgrom Paul RldquoAscending Auctions with Package Bid-dingrdquo Frontiers of Theoretical Economics2002 1(1) Article 1

Blum Yosef Roth Alvin E and Rothblum UrielG ldquoVacancy Chains and Equilibration in Se-nior-Level Labor Marketsrdquo Journal of Eco-nomic Theory 1997 76(2) pp 362ndash411

Brewer Paul J and Plott Charles R ldquoA BinaryConflict Ascending Price (Bicap) Mechanismfor the Decentralized Allocation of the Rightto Use Railroad Tracksrdquo International Jour-nal of Industrial Organization 1996 14(6)pp 857ndash86

Bulow Jeremy and Levin Jonathan ldquoMatchingand Price Competitionrdquo Stanford UniversityStanford Economics Working Paper No1818 2003

Cramton Peter Shoham Yoav and SteinbergRichard Combinatorial auctions Cam-bridge MA MIT Press (forthcoming)

Crawford Vincent P and Knoer Elsie M ldquoJobMatching with Heterogeneous Firms andWorkersrdquo Econometrica 1981 49(2) pp437ndash50

Demange Gabrielle and Gale David ldquoThe Strat-egy Structure of Two-Sided Matching Mar-ketsrdquo Econometrica 1985 53(4) pp 873ndash88

Dubins Lester and Freedman David ldquoMachia-velli and the Gale-Shapley Algorithmrdquo Na-val Research Logistics Quarterly 198188(7) pp 485ndash94

Echenique Federico and Oviedo Jorge ldquoCoreMany-to-One Matchings by Fixed-PointMethodsrdquo Journal of Economic Theory2004 115(2) pp 358ndash76

Fleiner Tamas ldquoA Fixed-Point Approach toStable Matchings and Some ApplicationsrdquoMathematics of Operations Research 200328(1) pp 103ndash26

Gale David and Shapley Lloyd ldquoCollege Ad-missions and the Stability of MarriagerdquoAmerican Mathematical Monthly 196269(1) pp 9ndash15

Gul Faruk and Stacchetti Ennio ldquoWalrasianEquilibrium with Gross Substitutesrdquo Journalof Economic Theory 1999 87(1) pp 95ndash124

Kelso Alexander and Crawford Vincent P ldquoJobMatching Coalition Formation and GrossSubstitutesrdquo Econometrica 1982 50(6) pp1483ndash504

Lehmann Benny Lehmann Daniel and NisanNoam ldquoCombinatorial Auctions with De-

934 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

creasing Marginal Utilityrdquo Games and Eco-nomic Behavior 2005 (forthcoming)

Lien Yuan-Chuan and Yan Jun ldquoOn the GrossSubstitutes Conditionrdquo Unpublished Paper2003 httpwwwstamfordeduyclienTerm_Paper_Lien_Yanpdf

Martınez Ruth Masso Jordi Neme Alejandroand Oviedo Jorge ldquoSingle Agents and the Setof Many-to-One Stable Matchingsrdquo Journalof Economic Theory 2000 91(1) pp 91ndash105

Milgrom Paul R Putting auction theory towork Cambridge Cambridge UniversityPress 2004

Milgrom Paul R ldquoPutting Auction Theory toWork The Simultaneous Ascending Auc-tionrdquo Journal of Political Economy 2000108(2) pp 245ndash72

Porter David Rassenti Stephen RoopnarineAnil and Smith Vernon ldquoCombinatorial Auc-tion Designrdquo Proceedings of the NationalAcademy of Sciences 2003 100(19) pp11153ndash57

Reijnierse Hans van Gellekom Anita and PottersJos A M ldquoVerifying Gross SubstitutabilityrdquoEconomic Theory 2002 20(4) pp 767ndash76

Roth Alvin E ldquoThe Economics of Matching Sta-bility and Incentivesrdquo Mathematics of Opera-tions Research 1982 7(4) pp 617ndash28

Roth Alvin E ldquoStability and Polarization ofInterests in Job Matchingrdquo Econometrica1984 52(1) pp 47ndash57

Roth Alvin E ldquoThe College Admissions Prob-lem Is Not Equivalent to the Marriage Prob-lemrdquo Journal of Economic Theory 1985a36(2) pp 277ndash88

Roth Alvin E ldquoConflict and Coincidence ofInterest in Job Matching Some New Resultsand Open Questionsrdquo Mathematics of Oper-ations Research 1985b 10(3) pp 379ndash89

Roth Alvin E ldquoOn the Allocation of Residentsto Rural Hospitals A General Property ofTwo-Sided Matching Marketsrdquo Economet-rica 1986 54(2) pp 425ndash27

Roth Alvin E ldquoA Natural Experiment in theOrganization of Entry-Level Labor MarketsRegional Markets for New Physicians andSurgeons in the United Kingdomrdquo AmericanEconomic Review 1991 81(3) pp 415ndash40

Roth Alvin E and Peranson Elliott ldquoThe Rede-sign of the Matching Market for AmericanPhysicians Some Engineering Aspects ofEconomic Designrdquo American Economic Re-view 1999 89(4) pp 748ndash80

Roth Alvin E and Sotomayor Marilda Two-sided matching A study in game-theoreticmodeling and analysis Cambridge Cam-bridge University Press 1990

Sen Amartya Collective choice and social wel-fare San Francisco Holden-Day Inc 1970

Shapley Lloyd ldquoComplements and Substitutesin the Optimal Assignment Problemrdquo NavalResearch Logistics Quarterly 1962 9(1) pp45ndash48

935VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

Page 6: Matching with Contracts - Stanford Universityweb.stanford.edu/~milgrom/publishedarticles/Matching with... · 2005. 10. 22. · Gale-Shapley matching algorithm. Hence, the Gale-Shapley

stable sets of contracts in the entire set of mod-els treated in this paper

II Substitutes

In this section we introduce our first restric-tion on hospital preferences which is the re-striction that contracts are substitutes We usethe restriction to prove the existence of a stableset of contracts and to study an algorithm thatidentifies those contracts

Our substitutes condition generalizes theRoth-Sotomayor substitutable preferences con-dition to preferences over contracts In wordsthe substitutable preferences condition statesthat if a contract is chosen by a hospital fromsome set of available contracts then that con-tract will still be chosen from any smaller setthat includes it Our substitutes condition issimilarly defined as follows

DEFINITION Elements of X are substitutesfor hospital h if for all subsets X X X wehave Rh(X) Rh(X)4

In the language of lattice theory which weuse below elements of X are substitutes forhospital h exactly when the function Rh isisotone

In demand theory substitutes is defined by acomparative static that uses prices It says thatlimiting attention to the domain of wage vectorsat which there is a unique optimum for thehospital the hospitalrsquos demand for any doctor dis nondecreasing in the wage of each otherdoctor d

Our next result verifies that for resource al-location problems involving prices our defini-tion of substitutes coincides with the standarddemand theory definition For simplicity wefocus on a single hospital and suppress its iden-tifier h from our notation Thus imagine that ahospital chooses doctorsrsquo contracts from a sub-set of X D W where D is a finite set of

doctors and W w w is a finite set ofpossible wages Assume that the set of wages Wis such that the hospitalsrsquo preferences are al-ways strict Suppose that w max W is aprohibitively high wage so that no hospital everhires a doctor at wage w

In demand theory it is standard to representthe hospitalrsquos market opportunities by a vectorw WD that specifies a wage wd at whicheach doctor can be hired We can extend thedomain of the choice function C to allow marketopportunities to be expressed by wage vectorsas follows

(4) w WDf Cw Cd wdd D

Formula (4) associates with any wage vector wthe set of contracts (d wd)d D and definesC(w) to be the choice from that set

With the choice function extended this waywe can now describe the traditional demandtheory substitutes condition The condition as-serts that increasing the wage of doctor d fromwd to wd (weakly) increases demand for anyother doctor d

DEFINITION C satisfies the demand-theorysubstitutes condition if (i) d d (ii) (dwd) C(w) and (iii) wd wd imply that (dwd) C(wd wd)

To compare the two conditions we need tobe able to assign a vector of wages to each setof contracts X It is possible that in X somedoctor is unavailable at any wage or is available atseveral different wages For a profit-maximizinghospital the doctorrsquos relevant wage is the low-est wage if any at which she is availableMoreover such a hospital does not distinguishbetween a doctor who is unavailable and onewho is available only at a prohibitively highwage Thus from the perspective of a profit-maximizing hospital having contracts X avail-able is equivalent to facing a wage vector W(X)specified as follows

(5) Wd X minss w or d s X

In view of the preceding discussion a profit-maximizing hospitalrsquos choices must obey thefollowing identity

4 This condition is identical in form to the ldquoconditionalphardquo used in the study of social choice for example byAmartya Sen (1970) but the meanings of the choice sets aredifferent In Senrsquos model the choice set is a collection ofmutually exclusive choices whereas in the matching prob-lems the set describes the choice itself

918 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

(6) CX CWX

THEOREM 2 Suppose that X D W is afinite set of doctor-wage pairs and that (6)holds Then C satisfies the demand theory sub-stitutes condition if and only if its contracts aresubstitutes

In particular this shows that the Kelso-Crawford ldquogross substitutesrdquo condition is sub-sumed by our substitutes condition

A A Generalized Gale-Shapley Algorithm

We now introduce a monotonic algorithmthat will be shown to coincide with the Gale-Shapley algorithm on its original domain Todescribe the monotonicity that is found in thealgorithm let us define an order on X X asfollows

(7) XD XH XD XH

N XD XD and XH XH

With this definition (X X ) is a finitelattice

The generalized Gale-Shapley algorithm isdefined as the iterated applications of a certainfunction F X X3 X X as defined below

(8) F1 X X RH X

F2 X X RD X

FXD XH F1 XH F2 F1 XH

As we have previously observed since the doc-torsrsquo choices are singletons a revealed prefer-ence argument establishes that the function RD X3 X is isotone If the contracts are substitutesfor the hospitals then the function RH X 3 Xis isotone as well When both are isotone thefunction F (X X ) 3 (X X ) isalso isotone that is it satisfies ((XD XH) (XD XH)) f (F(XD XH) F(XD XH))

Thus F X X 3 X X is an isotonefunction from a finite lattice into itself Usingfixed point theory for finite lattices the set offixed points is a nonempty lattice and iterated

applications of F starting from the minimumand maximum points of X X converge mono-tonically to a fixed point of F5 We summarizethe particular application here with the follow-ing theorem6

THEOREM 3 Suppose contracts are substi-tutes for the hospitals Then

(a) The set of fixed points of F on X X is anonempty finite lattice and in particularincludes a smallest element (X D X H) and alargest element (X D X H)

(b) Starting at (XD XH) (X A) the general-ized Gale-Shapley algorithm convergesmonotonically to the highest fixed point

X D X H

supX XFX X X X and

(c) Starting at (XD XH) (A X) the general-ized Gale-Shapley algorithm convergesmonotonically to the lowest fixed point

X D X H

infX XFX X X X

The facts that (X D X H) is the highest fixedpoint of F and that (X D X H) is the lowest in thespecified order mean that for any other fixedpoint (XD XH) X D XD X D and X H XH X H Because doctors are better off when theycan choose from a larger set of contracts it

5 This special case of Tarskirsquos fixed point theorem can besimply proved as follows Let Z be a finite lattice withmaximum point z Let z0 z z1 F(z0) zn F(zn1)Plainly z1 z0 and since F is isotone z2 F(z1) F(z0) z1 and similarly zn131 zn for all n So thedecreasing sequence zn converges in a finite number ofsteps to a point z with F( z) z Moreover for any fixedpoint z since z z z Fn( z) Fn(z) z for n large soz is the maximum fixed point A similar argument appliesfor the minimum fixed point

6 Hiroyuki Adachi (2000) and Federico Echenique andJorge Oviedo (2004) have also characterized the Gale-Shapley algorithm for the marriage problem and the collegeadmissions problem respectively as iterated applications ofa certain operator on a lattice See also Tamas Fleiner(2003)

919VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

follows that the doctors unanimously weaklyprefer CD(X D) to CD(XD) to CD(X D) and simi-larly that the hospitals unanimously preferCH(X H) to CH(XH) to CH(X H) Notice byTheorem 1 that CD(X D) CH(X H) X D X H and CD(X D) CH(X H) X D X H sowe have the following welfare conclusion

THEOREM 4 Suppose contracts are substi-tutes for the hospitals Then the stable set ofcontracts X D X H is the unanimously mostpreferred stable set for the doctors and theunanimously least preferred stable set for thehospitals Similarly the stable set X D X H isthe unanimously most preferred stable set forthe hospitals and the unanimously least pre-ferred stable set for the doctors

Theorems 3 and 4 duplicate and extend fa-miliar conclusions about stable matches in theGale-Shapley matching problem and a similarconclusion about equilibrium prices in theKelso-Crawford labor market model Thesenew theorems encompass both these older mod-els and additional ones with general contractterms

To see how the Gale-Shapley algorithm isencompassed consider the doctor-offering al-gorithm As in the original formulation we sup-pose that hospitals have a ranking of doctorsthat is independent of the other doctors they willhire so hospital h just chooses its nh mostpreferred doctors (from among those who areacceptable and have proposed to hospital h)

Let XH(t) be the cumulative set of contractsoffered by the doctors to the hospitals throughiteration t and let XD(t) be the set of contractsthat have not yet been rejected by the hospitalsthrough iteration t Then the contracts ldquoheldrdquo atthe end of the iteration are precisely those thathave been offered but not rejected which arethose in XD(t) XH(t) The process initiateswith no offers having been made or rejected soXD(0) X and XH(0) A

Iterated applications of the operator F de-scribed above define a monotonic process inwhich the set of doctors makes an ever-larger(accumulated) set of offers and the set of unre-jected offers grows smaller round by roundUsing the specification of F and starting fromthe extreme point (X A) we have

(9) XD t X RH XH t 1

XH t X RD XD t

After offers have been made in iteration t 1the hospitalrsquos cumulative set of offers is XH(t 1) Each hospital h holds onto the nh best offersit has received at any iteration provided thatmany acceptable offers have been made other-wise it holds all acceptable offers that havebeen made Thus the accumulated set of re-jected offers is RH(XH(t 1)) and the unre-jected offers are those in X RH(XH(t 1)) XD(t) At round t if a doctorrsquos contract is beingheld then the last offer the doctor made was itsbest contract in XD(t) If a doctorrsquos last offerwas rejected then its new offer is its best con-tract in XD(t) The contracts that doctors havenot offered at this round or any earlier one aretherefore those in RD(XD(t)) So the accumu-lated set of offers doctors have made are thosein X RD(XD(t)) XH(t) Once a fixed point ofthis process is found we have by Theorem 1 astable set of contracts XH(t) XD(t)

To illustrate the algorithm consider a simpleexample with two doctors and two hospitalswhere X D H and agents have the follow-ing preferences

(10) Pd1 h1 h2

Ph1 d1 d2 A

Pd2 h1 h2

Ph2 d1 d2 d1 d2 A

The algorithm is initialized with XD(0) X (d1 h1) (d1 h2) (d2 h1) (d2 h2) andXH(0) A Table 1 applies the operator givenin (9) to illustrate the algorithm

For t 1 starting from XD(1) X bothdoctors choose to work for the hospital h1 sothey reject their contracts with hospital h2 thusRD(XD(1)) (d1 h2) (d2 h2) Next XH(1) iscalculated as the complement of RD(XD(1)) soXH(1) (d1 h1) (d2 h1) From XH(1) thehospitals choose (d1 h1) and reject (d2 h1)completing the row for t 1

920 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

For t 2 we first compute XD(2) as thecomplement of RH(XH(1)) The doctors choose(d1 h1) (d2 h2) so they reject (d1 h2) Thehospitals must then choose from the comple-ment XH(2) X (d1 h2) The hospitalschoose (d1 h1) and (d2 h2) and reject (d2 h1) Inthe third round XD(3) XD(2) and the processhas reached a fixed point

The example illustrates the monotonicity ofthe algorithm XH(t) grows larger step by stepwhile XD(t) grows smaller At termination of thealgorithm the intersection of the choice sets isthe stable set of contracts XH(3) XD(3) (d1 h1) (d2 h2) Moreover when XD(t) andXH(t) are interpreted as suggested above theprocess XD(t) XH(t) described by (9) with theinitial conditions XD(0) X and XH(0) Acoincides with the doctor-offering Gale-Shapley algorithm

For the hospital-offering algorithm a similaranalysis applies but with a different interpreta-tion of the sets and a different initial conditionLet XD(t) be the cumulative set of contractsoffered by the hospitals to the doctors beforeiteration t and let XH(t) be the set of contractsthat have not yet been rejected by the hospitalsup to and including iteration t Then the con-tracts ldquoheldrdquo at the end of iteration t are pre-cisely those that have been offered but notrejected which are those in XD(t 13 1) XH(t)With this interpretation the analysis is identicalto the one above The Gale-Shapley hospitaloffering algorithm is characterized by (9) andthe initial conditions XD(0) A and XH(0) X

The same logic applies to the Kelso-Crawfordmodel provided one extends their original treat-ment to include a version in which the workersmake offers in addition to the treatment inwhich firms make offers The words of thepreceding paragraphs apply exactly but a con-tract offer now includes a wage so for exam-ple a hospital whose contract offer is rejected

by a doctor may find that its next most preferredcontract to the same doctor is at a higher wage

B When Contracts Are Not Substitutes

It is clear from the preceding analysis thatthat definition of substitutes is just sufficient toallow our mathematical tools to be applied Inthis section we establish more We show thatunless contracts are substitutes for every hospi-tal the very existence of a stable set of contractscannot be guaranteed7

THEOREM 5 Suppose H contains at least twohospitals which we denote by h and h Furthersuppose that Rh is not isotone that is contractsare not substitutes for h Then there exist pref-erence orderings for the doctors in set D apreference ordering for a hospital h with asingle job opening such that regardless of thepreferences of the other hospitals no stable setof contracts exists

Together Theorems 3 and 5 characterize theset of preferences that can be allowed as inputsinto a matching algorithm if we wish to guar-antee that the outcome of the algorithm is astable set of contracts with respect to the re-ported preferences According to Theorem 3we can allow all preferences that satisfy substi-tutes and still reach an outcome that is a stablecollection of contracts According to Theorem5 if we allow any preference that does notsatisfy the substitutes condition then there issome profile of singleton preferences for theother parties such that no stable collection ofcontracts exists

7 Kelso and Crawford (1982) provide a particular exam-ple in which preferences do not satisfy substitutes and theredoes not exist a stable allocation

TABLE 1mdashILLUSTRATION OF THE ALGORITHM

XD(t) RD(XD(t)) XH(t) RH(XH(t))t 0 X (d1 h2) (d2 h2) A At 1 X (d1 h2) (d2 h2) (d1 h1) (d2 h1) (d2 h1)t 2 (d1 h1) (d1 h2) (d2 h2) (d1 h2) (d1 h1) (d2 h1) (d2 h2) (d2 h1)t 3 (d1 h1) (d1 h2) (d2 h2) (d1 h2) (d1 h1) (d2 h1) (d2 h2) (d2 h1)

921VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

This theory also reaffirms and extends theclose connection between the substitutes condi-tion and other concepts that has been estab-lished in the recent auctions literature withquasi-linear preferences Milgrom (2000) stud-ies an auction model with discrete goods inwhich the set of possible bidder values is re-quired to include all the additive functions8 Heshows that if goods are substitutes then a com-petitive equilibrium exists If however thereare at least three bidders and if there is anyallowed value such that the goods are not allsubstitutes then there is some profile of valuessuch that no competitive equilibrium existsFaruk Gul and Ennio Stacchetti (1999) establishthe same positive existence result They alsoshow that if preferences include all values inwhich a bidder wants only one particular goodas well as any one for which goods are not allsubstitutes and if the number of bidders issufficiently large then there is some profile ofpreferences for which no competitive equilib-rium exists Ausubel and Milgrom (2002) estab-lish that if (a) there is some bidder for whompreferences are not demand theory substitutes(b) values may be any additive function and (c)there are at least three bidders in total thenthere is some profile of preferences such that theVickrey outcome is not stable and the coreimputations do not form a lattice Conversely ifall bidders have preferences that are demandtheory substitutes then the Vickrey outcome isin the core and the core imputations do form alattice Taken together these results establish aclose connection between the substitutes condi-tion the cooperative concept of the core thenoncooperative concepts of Vickrey outcomesand competitive equilibrium

C ldquoVacancy Chainrdquo Dynamics

Suppose that a labor market has reached equi-librium with all interested doctors placed

at hospitals in a stable match Then suppose onedoctor retires Imagine a process in which ahospital seeks to replace its retired doctor byraiding other hospitals to hire additional doc-tors If the hospital makes an offer that wouldsucceed in hiring a doctor away from anotherhospital the affected hospital has three optionsit may make an offer to another doctor (orseveral) improve the terms for its current doc-tor or leave the position vacant Suppose itmakes whatever contract offer would best serveits purposes

In models with a fixed number of positionsand no contracts this process in which doctorsand vacancies move from one hospital to an-other has been called vacancy chain dynamics(Blum et al 1997) Kelso and Crawford (1982)consider similar dynamics in the context of theirmodel

The formal results for our extended model aresimilar to those of the older theories Startingwith a stable collection of contracts X let XHbe the set of contracts that some doctor weaklyprefers to her current contract in X and letXD X (X XH) As in the proof ofTheorem 1 we have F(XD XH) (XD XH) andX XD XH

To study the dynamic adjustment that resultsfrom the retirement of doctor d we suppose theprocess starts from the initial state (XD(0)XH(0)) (XD XH) This means that the employ-ees start by considering only offers that are atleast as good as their current positions and thathospitals remember which employees have re-jected them in the past The doctorsrsquo rejectionfunction is changed by the retirement of doctord to RD where RD(X) RD(X) x XxD d that is in addition to the old rejec-tions all contract offers addressed to the retireddoctor are rejected

To synchronize the timing with our earliernotation let us imagine that hospitals makeoffers at round t 1 and doctors accept or rejectthem at round t Hospitals consider as poten-tially available the doctors in XH(t 1) X RD(XD(t 1)) and the doctors then reject all butthe best offers so the cumulative set of offersreceived is XD(t) X RH(XH(t 1)) Define

(11) FXD XH X RHXH X RDXD

8 A valuation function is additive if the value of any setof items is the sum of the separate values of the elementsSuch a function v is also described as ldquomodularrdquo Additivityis equivalent to the requirement that for all sets A and Bv(A B) 13 v(A B) v(A) 13 v(B)

922 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

If contracts are substitutes for the hospitalsthen F is isotone and since F(XD XH) (XDXH) it follows that F(XD XH) (XD XH)Then since (XD(0) XH(0)) (XD XH) we have(XD(1) XH(1)) F(XD(0) XH(0)) (XD(0)XH(0)) Iterating (XD(n) XH(n)) F(XD(n 1) XH(n 1)) (XD(n 1) XH(n 1)) thedoctors accumulate offers and the contracts thatare potentially available to the hospitals shrinkA fixed point is reached and by Theorem 1 itcorresponds to a stable collection of contracts

THEOREM 6 Suppose that contracts are sub-stitutes and that (XD XH) is a stable set ofcontracts Suppose that a doctor retires and thatthe ensuing adjustment process is described by(XD(0) XH(0)) (XD XH) and (XD(t) XH(t)) F(XD(t 1) XH(t 1)) Then the sequence(XD(t) XH(t)) converges to a stable collectionof contracts at which all the unretired doctorsare weakly better off and all the hospitals areweakly worse off than at the initial state (XDXH)9

The sequence of contract offers and jobmoves described by iterated applications of Fincludes possibly complex adjustments Hospi-tals that lose a doctor may seek several replace-ments Hospitals whose doctors receive contractoffers may retain those doctors by offering bet-ter terms or may hire a different doctor and laterrehire the original doctor at a new contract Allalong the way the doctors find themselveschoosing from more and better options and thehospitals find themselves marching down theirpreference lists by offering costlier terms pay-ing higher wages or making offers to otherdoctors whom they had earlier rejected

III Law of Aggregate Demand

We now introduce a second restriction onpreferences that allows us to prove the next tworesults about the structure of the set of stablematches We call this restriction the law ofaggregate demand Roughly this law states that

as the price falls agents should demand more ofa good Here price falls correspond to morecontracts being available and more demandcorresponds to taking on (weakly) more con-tracts We formalize this intuition with the fol-lowing definition

DEFINITION The preferences of hospital h H satisfy the law of aggregate demand if for allX X Ch(X) Ch(X)

According to this definition if the set ofpossible contracts expands (analogous to a de-crease in some doctorsrsquo wages) then the totalnumber of contracts chosen by hospital h eitherrises or stays the same The corresponding prop-erty for doctor preferences is implied by re-vealed preference because each doctor choosesat most one contract Just as for the substitutescondition when wages are endogenous we in-terpret the definition as applying to the domainof wage vectors for which the hospitalrsquos opti-mum is unique

The next theorem shows the important rela-tionship between profit maximization substi-tutes and the law of aggregate demand

THEOREM 7 If hospital hrsquos preferences arequasi-linear and satisfy the substitutes condi-tion then they satisfy the law of aggregatedemand

Below we use the law of aggregate demandto characterize both necessary and sufficientconditions for the rural hospitalsrsquo property andensure that truthful revelation is a dominantstrategy for the doctors Previously in matchingmodels without money the dominant strategyresult was known only for responsive prefer-ences with capacity constraints (Abdulkadiro-glu 2003) We subsume that result with ourtheorem

A Rural Hospitals Theorem

In the match between doctors and hospitalscertain rural hospitals often had trouble fillingall their positions raising the question ofwhether there are other core matches at whichthe rural hospitals might do better Roth (1986)analyzed this question for the case of X D

9 The theorem does not claim and it is not generally truethat this new point must be the new doctor-best stable set ofcontracts

923VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

H and responsive preferences and found thatthe answer is no every hospital that has unfilledpositions at some stable match is assigned ex-actly the same doctors at every stable match Inparticular every hospital hires the same numberof doctors at every stable match

In this section we show by an example thatthis last conclusion does not generalize to thefull set of environments in which contracts aresubstitutes10 We then prove that if preferencessatisfy the law of aggregate demand and substi-tutes then the last conclusion of Rothrsquos theoremholds every hospital signs exactly the samenumber of contracts at every point in the corealthough the doctors assigned and the terms ofemployment can vary Finally we show thatany violation of the law of aggregate demandimplies that preferences exist such that theabove conclusion does not hold

Suppose that H h1 h2 and D d1 d2d3 For hospital h1 suppose its choices maxi-mize where d3 d1 d2 d1 d2 A d1 d3 d2 d3 This prefer-ence satisfies substitutes11 Suppose h2 has oneposition with its preferences given by d1 d2 d3 A Finally suppose d1 and d2prefer h1 to h2 while d3 has the reverse prefer-ence Then the matches X (h1 d3) (h2 d1)and X (h1 d1) (h1 d2) (h2 d3) are bothstable but hospital h1 employs a different num-ber of doctors and the set of doctors assigneddiffers between the two matches

This example involves a failure of the law ofaggregate demand because as the set of con-tracts available to h1 expands by the addition of(h1 d3) to the set (h1 d1) (h1 d2) the numberof doctors demanded declines from two to oneWhen the law of aggregate demand holds how-ever we have the following result

THEOREM 8 If hospital preferences satisfysubstitutes and the law of aggregate demandthen for every stable allocation (XD XH) andevery d D and h H Cd(XD) Cd(X D)

and Ch(XH) Ch(X H) That is every doctorand hospital signs the same number of contractsat every stable collection of contracts

The next theorem verifies that the counterex-amples developed above can always be gener-alized whenever any hospitalrsquos preferencesviolate the law of aggregate demand

THEOREM 9 If there exists a hospital h setsX X X such that Ch(X) Ch(X) andat least one other hospital then there existsingleton preferences for the other hospitalsand doctors such that the number of doctorsemployed by h is different for two stablematches

Theorem 9 establishes that the law of aggre-gate demand is not only a sufficient conditionfor the rural hospitals result of Theorem 8 butin a particular sense a necessary one as well

B Truthful Revelation as a DominantStrategy

The main result of this section concerns doc-torsrsquo incentives to report their preferences truth-fully For the doctor-offering algorithm ifhospital preferences satisfy the law of aggregatedemand and the substitutes condition then it isdominant strategy for doctors to reveal truth-fully their preferences over contracts12 We fur-ther show that both preference conditions playessential roles in the conclusion

We will show the positive incentive result forthe doctor-offering algorithm in two stepswhich highlight the different roles of the twopreference assumptions First we show that thesubstitutes condition by itself guarantees thatdoctors cannot benefit by exaggerating the rank-ing of an unattainable contract More preciselyif there exists a preferences list for a doctor dsuch that d obtains contract x by submitting thislist then d can also obtain x by submitting apreference list that includes only contract xSecond we will show that adding the law of

10 A similar example appears in Ruth Martınez et al(2000)

11 These preferences however do not display the ldquosingleimprovement propertyrdquo that Gul and Stacchetti (1999) in-troduce and show is characteristic of substitutes preferencesin models with quasi-linear utility

12 It is of course not a dominant strategy for hospitals totruthfully reveal nor would it be so even if we consideredthe hospital-offering algorithm For further discussion ofthis point see Roth and Sotomayor (1990)

924 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

aggregate demand guarantees that a doctor doesat least as well as reporting truthfully as byreporting any singleton Together these are thedominant strategy result

To understand why submitting unattainedcontracts cannot help a doctor d consider thefollowing Let x be the most-preferred contractthat d can obtain by submitting any preferencelist (holding all other submitted preferencesfixed) Note that all that d accomplishes whenreporting that certain contracts are preferred to xis to make it easier for some coalition to blockoutcomes involving x Thus if x is attainablewith any report it is attainable with the reportPd x that ranks x as the only acceptable con-tract This intuition is captured in the followingtheorem

THEOREM 10 Let hospitalsrsquo preferences sat-isfy the substitutes condition and let the match-ing algorithm produce the doctor-optimalmatch Fixing the preferences of hospitals andof doctors besides d let x be the outcome that dobtains by reporting preferences Pd z1 dz2 d

d zn d x Then the outcome that dobtains by reporting preferences Pd x is also x

Some other doctors may be strictly better offwhen d submits her shorter preference list thereare fewer collections of contracts that d nowobjects to so the core may become larger andthe doctor-optimal point of the enlarged coremakes all doctors weakly better off and maymake some strictly better off

Without the law of aggregate demand how-ever it may still be in a doctorrsquos interest toconceal her preferences for unattainable posi-tions To see this consider the case with twohospitals and three doctors where contracts aresimply elements of D H and let preferences be

(12) Pd1 h1 h2

Ph1 d3 d1 d2 d1 d2

Pd2 h2 h1

Ph2 d1 d2 d3

Pd3 h2 h1

With these preferences the only stable matchis (d1 h2) (d3 h1) which leaves d2 unem-ployed However if d2 were to reverse herranking of the two hospitals then (d1 h1) (d2h1) (d3 h2) would be chosen by the doctor-offering algorithm leaving d2 better off Essen-tially by offering a contract to h2 d2 haschanged the number of positions availableWhen the preferences of the hospitals satisfythe law of aggregate demand however mak-ing more offers to the hospitals (weakly) in-creases the number of contracts the hospitalsaccept

THEOREM 11 Let hospitalsrsquo preferences sat-isfy substitutes and the law of aggregate de-mand and let the matching algorithm producethe doctor-optimal match Then fixing the pref-erences of the other doctors and of all thehospitals let x be the contract that d obtains bysubmitting the set of preferences Pd z1 dz2 d

d zn d x Then the preferences Pd y1 y2 yn x yn131 yN

obtain a contract that is Pd-preferred or indif-ferent to x

According to this theorem when a doctorrsquostrue preferences are Pd the doctor can never dobetter according to these true preferences thanby reporting the preferences truthfully

In fact the law of aggregate demand is ldquoal-mostrdquo a necessary condition as well The excep-tions can arise because certain violations of thelaw of aggregate demand are unobservable fromthe choice data of the algorithm and these can-not affect incentives Thus consider an examplewhere terms t are included in the contract andwhere a hospital h has preferences (d1 ht1) (d1 h t1) (d2 h t2) (d1 h t1) (d2 h t2) Although these preferences violatethe law of aggregate demand the algorithm willnever ldquoseerdquo the violation as either (d1 h t1) d1

(d1 h t1) or (d1 h t1) d1(d1 h t1) Thus

whichever terms that d1 first offers will deter-mine a conditional set of preferences for thehospital that does satisfy the law of aggregatedemand (The hospital will never reject an offerof either (d1 h t1) or (d1 h t1))

The next theorem says that if some hospitalrsquospreferences violate the law of aggregate demandin a way that can even potentially be observed

925VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

from the hospitalrsquos choices then there existpreferences for the other agents such that it isnot a dominant strategy for doctors to reporttruthfully even when the other assumptions wehave used are satisfied

THEOREM 12 Let hospital h have prefer-ences such that Ch(X) Ch(X x) and letthere exist two contracts y z such that yD zD xD yD and y z Rh(X x) Rh(X)Then if another hospital h exists there existsingleton preferences for the hospitals besides hand preferences for the doctors such that it isnot a dominant strategy for all doctors to revealtheir preferences truthfully

Thus to the extent that the law of aggregatedemand for hospital preferences has observableconsequences for the progress of the doctor-offering algorithm it is an indispensable condi-tion to ensure the dominant strategy property fordoctors

IV Classes of Conforming Preferences

Although the class of substitutes valuations isquite limited13 it is broader than the set ofresponsive preferences in useful ways Thesubstitutes valuations accommodate all the af-firmative action and subspecialty constraints de-scribed above and allow a doctorrsquos marginalproduct to depend on which other doctors thehospital attracts

In this section we introduce a parameterizedclass of quasi-linear substitutes valuations forhospitals evaluating sets of new hires The val-uations are based on an endowed assignmentmodel according to which hospitals have a set

of jobs to fill and an existing endowment ofdoctors while doctorsrsquo productivities varyamong jobs A hospital values new doctors ac-cording to the their incremental value in theassignment problem

From a general job assignment perspectivethe key restrictions of endowed assignment val-uations are that each doctor can do one and onlyone job and that the hospitalrsquos output is the sumof outputs of its various jobs A hospital cannotuse one doctor for two jobs nor can it combinethe skills of two doctors in the same job Alsothere is no interaction in the productivity ofdoctors in different jobs Given this mathemat-ical structure if a doctor is lost it will always beoptimal for the hospital to retain all of its otherdoctors although it may choose to reassignsome of the retained doctors to fill vacatedpositions

Another way to describe the set of endowedassignment valuations VEA is to build it upfrom three properties as follows First a sin-gleton valuation is one of the form v(S) maxdSd for some nonnegative vector Sin-gleton valuations represent the possible valua-tions by a hospital with just one opening andVEA includes all singleton valuations Second ifa hospital is composed of two units j 1 2each of which has a valuation vj VEA then thehospitalrsquos maximum value from assigningworkers between its units denoted by (v1 v2)(S) maxRSv1(R) 13 v2(S R) is also inthe set We call this property closure underaggregation Third if a hospitalrsquos value is de-rived from a value in VEA by endowing thehospital with a set of doctors T then the hospi-talrsquos incremental value for extra doctorsv(ST) v(S T) v(T) is also in the set VEAWe call this property closure under endowmentFinally two valuations v1 and v2 are calledequivalent if they differ by an additive con-stant For example for any fixed set of doctorsT v( T) is equivalent to v( T)

THEOREM 13 Let VEA denote the smallestfamily of valuations of sets of doctors that in-cludes all the singleton valuations and is closedunder aggregation and endowment Then foreach v VEA there exists a set of jobs J a setof doctors T and a (D 13 T) J-matrix [ij]such that v is equivalent to the following

13 Hans Reijnierse et al (2002) (see also Yuan-ChuanLien and Jun Yan 2003) have characterized the valuationfunctions that satisfy the substitutes condition as followsLet v(S) be the hospitalrsquos value of doctor set S and letvS(T) v(S T) v(S) denote the incremental value of theset of doctors T Then doctors are substitutes if for every setS and three other doctors d1 d2 and d3 there is no uniquemaximum in vS(d1) 13 vS(d2 d3) vS(d2) 13 vS(d1 d3)vS(d3) 13 vS(d1 d2)

926 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

(13) vSJ T maxz

d S

djzdj subject to

d S

zdj 1 for j J

j J

zdj 1 for d S T0 for d S T

zdj 0 1 for all d j

Conversely for every such J T and v( J T) VEA

We dub this family of valuations the endowedassignment valuations because of the form ofoptimization (13) The family VEA is an exten-sion of the assignment valuations derived byLloyd Shapley (1962) used by Roth (19841985b) in models of matching with wages andexplicit job assignments and emphasized in astudy of package bidding by Lehmann et al(2001) The endowed assignment valuations arequite useful for applications They also fit nicelywith the theory reported in previous sections forthe following reason

THEOREM 14 Every endowed assignmentvaluation v( J T) VEA is a substitutesvaluation

To the best of our knowledge all of thesubstitutes valuations that have been used orproposed for practical applications are includedamong the endowed assignment valuations In-deed the question of whether all substitutesvaluations are endowed assignment valuationsis an open one Here we review some of themost popular valuations to show how they fitinto the class

The most commonly studied class of prefer-ences for matching problems like the Match forwhich employment terms are exogenouslyfixed are the responsive preferences Thesespecify that each hospital h has a fixed numberof openings nh a set of acceptable doctors Dh

A D and a strict ordering h of the acceptabledoctors When a doctor is unacceptable thatmeans that hiring the doctor is always worsethan leaving her position unfilled Given any setof available doctors the hospital hires its nh

most preferred acceptable doctors if that manyare available and otherwise hires all of theacceptable doctors

To map responsive preferences into the as-signment problem framework define a utilityfunction uh D3 to represent h and set theminimum acceptable utility to zero Formally(1) if d d Dh

A then d h dN uh(d) uh(d)and (2) d Dh

AN uh(d) 0 Using this utilitywe specify an assignment problem as followsJ 1 nh and dj uh(d) 13 1 and fix thewage at 1 Using a positive wage is a device toensure that the hospital strictly prefers not tohire a doctor it plans not to assign to any job Itis evident that with this valuation preferencethe hospital most prefers to hire the set of avail-able acceptable doctors with the highest rank-ing according to h

Among the extensions of responsive prefer-ences that have been most important in practiceare ones to accommodate quotas of variouskinds For example one use of quotas is tomanage subspecialties of internal medicine inwhich a certain number of positions are to befilled by doctors planning that subspecialty ifenough acceptable doctors are available Onecan reserve ms jobs for subspecialty s by pro-viding that there are ms jobs in which doctors inthat subspecialty have their productivity in-creased by a large constant M Then if msdoctors in subspecialty s are available at leastthat many will be demanded at the optimalsolution to (13) If that many qualified doctorsare not available the jobs will be filled by otherdoctors according to their productivities

Another use of quotas is for an affirmativeaction policy that absolutely reserves jobs formembers of certain target groups For each af-firmative action group G define a correspond-ing set of jobs JG and let J G JG Specifythat for any doctor d G and job j JG dj uh(d) and otherwise dj 0 One can alsointroduce an unrestricted category of jobs j thatany doctor can fill with productivity dj uh(d) This obviously ensures that a certainnumber of jobs are reserved for each targetgroup

A recent treatment of affirmative action byRoth (1991) extended by Abdulkadiroglu(2003) uses the class of responsive preferenceswith capacity constraints This class requires

927VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

that the set of doctors be partitioned into a finitenumber of affirmative action groups and that foreach group G the hospital has a capacity mG thatlimits the number of doctors who can be hiredfrom that group In addition at most nh doctorsin total can be hired

To represent such preferences using endowedassignment valuations let us specify that thereare mG jobs of type G and yenG mG jobs in totalThe hospital is endowed with nh yenG mGdoctors The endowed doctors have productivityij M in every job where M is a largenumber This ensures that at most nh new doc-tors will be hired at any optimum For thenonendowed doctors we calculate productivi-ties uh(d) in the same fashion as for the respon-sive preferences and set dj uh(d) for jobs j oftype G and dj 0 for all other jobs Thisensures that at most mG doctors will be hiredfrom group G By inspection this specificationrepresents Abdulkadiroglursquos affirmative actionpreferences

Unlike the specifications used for the currentNational Resident Matching Program algo-rithm the endowed assignment valuations per-mit overlapping affirmative action categoriesFor example suppose that a small hospital has atarget of hiring one female and one minoritydoctor In the endowed assignment structurethe hospital may assign a minority female doc-tor to fill either a minority slot or a female slotbut not both This is necessary to retain thesubstitutes demand structure for otherwisemaking a minority female doctor availablecould lead the hospital to hire a nonminoritymale doctor whom it would otherwise reject

Endowed assignment valuations thus providea flexible parameterized way for hospitals torepresent their preferences for matching with orwithout wages using a class of quasi-linear pref-erences that satisfies the substitutes conditionand the law of aggregate demand

V Cumulative Offer Processes and Auctions

The algorithms described by the system (9)with different starting points have the propertythat they can terminate only at a stable set ofcontracts Nevertheless unless preferences sat-isfy the substitutes condition the system is notguaranteed to converge at all even when a fixed

point exists In this section we offer a differentcharacterization of the Gale-Shapley doctor-offering algorithm that will prove especiallywell suited to situations in which contracts maynot be substitutes but in which there is just oneldquohospitalrdquo the auctioneer For now we allowthe possibility that there are several hospitals

The alternative representation is constructedby replacing the system of equations (9) by thefollowing system

(14) XD t X RH XH t 1

XH t XH t 1 CD XD t

We call the algorithm that begins with XD(0) X and XH(0) A and obeys (14) a cumulativeoffer process because the formalism capturesthe idea that hospitals accumulate offers fromdoctors in the set XH(t) and hold their bestchoices CH(XH(t)) from the accumulated setThere is no assumption of consistency imposedon the algorithm so it is possible that severalhospitals are ldquoholdingrdquo contract offers from thesame doctor The corresponding allocation is ofcourse infeasible since each doctor can ulti-mately accept just one contract

At each round t of the cumulative offer pro-cess all doctors make their best offers from theset of not-yet-rejected choices XD(t) but anydoctor d for whom a contract is being heldsimply repeats one of its earlier offers Thusnew offers are made only by doctors who havebeen rejected

To see why this is so let x CH(XH(t)) be acontract that is being held and consider thecorresponding doctor xD d By revealed pref-erence doctor d strictly prefers x to any contractthat she has not yet offered since those con-tracts were available to offer at the time that xwas offered Since drsquos most preferred contractin Xd(t) at the current time must be weaklypreferred to x it must be coincide with one ofdrsquos earlier offers

The second equation of system (14) is the onethat distinguishes the cumulative offer processfrom the system in (9) In the cumulative offerprocess without any assumptions about hospi-talsrsquo preferences XH(t) grows monotonicallyfrom round to round so the sequence of setsconverges In contrast the earlier process was

928 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

guaranteed to converge only when contracts aresubstitutes for the hospitals

When contracts are substitutes the two sys-tems of equations are equivalent

THEOREM 15 Suppose that contracts aresubstitutes for the hospitals and that XD(0) Xand XH(0) A Then the sequences of pairs(XD(t) XH(t)) generated by the two laws ofmotion (9) and (14) are identical

Even with the initial condition XD(0) X andXH(0) A the algorithms described by (9) and(14) may differ when contracts are not substi-tutes In that case by inspection of the system(14) the cumulative offer process still con-verges because XH(t) is bounded by the finiteset X and grows monotonically from round toround What is at issue is whether the hospitalrsquoschoice from its final search set in the cumulativeoffer process is a feasible and stable set ofcontracts

We will find below that when there is a singlehospital the outcome is indeed a feasible andstable set of contracts In that case the cumu-lative offer process coincides with the general-ized proxy auction of Ausubel and Milgrom(2002) Those authors analyze in detail the casewhen a bid consists of a price and a subset of theset of goods that the bidder wishes to buy Ateach round the seller ldquoholdsrdquo the collection ofbids that maximizes its total revenues subject tothe constraint that each good can be sold onlyonce The generalized proxy auction howeveris not limited to the sale of goods and in fact isidentical in scope to our present model ofmatching with contracts In particular the auc-tioneer may impose a variety of constraints onthe feasible collections of bids and may weighnonprice factors either exclusively or in com-bination with prices to decide which collectionof bids to hold Bidders for their part maymake bids that include factors besides price andmay not include price at all

To illustrate the role of general contracts inthis auction setting consider the auction designsuggested by Paul Brewer and Charles Plott(1996) in which bidders seek to buy access to arailroad track In that application a bid specifiesa trainrsquos direction of travel departure and ar-rival times and price offered It is assumed that

trains travel at a uniform speed along the trackIn this setting the contract terms must includethe direction and the two times and the seller isconstrained to hold only combinations of bidssuch that trains maintain safe distances fromone another at all times

A second example of the generalized proxyprocess is a procurement auction in which thebuyer scores suppliers on the basis of suchfactors as quality excess capacity credit ratingand historical reliability as well as price and inwhich the buyer prefers to set aside someamount of its purchase for minority contractorsor to maintain geographic diversity of supply toreduce the chance of supply disruptions In anasset sale the seller may weigh the probabilitythat the sale will be completed for example dueto financing contingencies or because a union orantitrust regulators must approve the sale

The cumulative offer process model withgeneral contracts accommodates all of thesepossibilities The auctioneer in the model cor-responds to a single ldquohospitalrdquomdashhereafter theauctioneermdashwith a choice function CH thatselects her most preferred collection of contractproposals We have the following result (whichis first stated using different notation than in theAusubel-Milgrom paper)

THEOREM 16 When the doctor-offering cu-mulative offer process with a single hospitalterminates at time t with outcome (XD(t) XH(t))the hospitalrsquos choice CH(XH(t)) is a stable col-lection of contracts

Cumulative offer processes connect the the-ory of matching with contracts to the emergingtheory of package auctions and auctions withcomplex constraints

VI Conclusion

We have introduced a general model ofmatching with bilateral contracts that encom-passes and extends two-sided matching modelswith and without money and certain auctionmodels The new formulation allows some con-tract terms to be exogenously fixed and others tobe endogenous in any combinations In thisvery general framework we characterize stable

929VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

collections of contracts in terms of the solutionto a certain system of equations

The key to the analysis is to extend twoconcepts of demand theory to models with orwithout prices The first concept to be extendedis the notion of substitutes Our definition ap-plies essentially the Roth-Sotomayor substitut-able preferences condition to a more generalclass of contracts contracts are substitutes ifwhenever the set of feasible bilateral contractsexpands the set of contracts that the firm rejectsalso expands We show that (a) our definitioncoincides with the usual demand theory condi-tion when both apply (b) when contracts aresubstitutes a stable collection of contracts ex-ists and (c) if any hospital or firm has prefer-ences that are not substitutes then there arepreferences with single openings for each otherfirm such that no stable allocation exists Wefurther show that when the substitute conditionapplies (a) both the doctor-offering and hospi-tal-offering Gale-Shapley algorithms can berepresented as iterated operations of the sameoperator (starting from different initial condi-tions) and (b) starting at a stable allocationfrom which a doctor retires a natural marketdynamic mimics the Gale-Shapley process tofind a new stable allocation

The second relevant demand theory conceptis the law of demand which we extend both toinclude heterogeneous inputs and to encompassmodels with or without prices The law of ag-gregate demand condition holds that when theset of feasible contracts expands the number ofcontracts that the firm chooses to sign weaklyincreases In terms of traditional demand theorythis means that for example when the wages ofsome of a heterogeneous group of workers fallsif the workers are substitutes then the totalnumber of workers employed rises We showthat (a) when inputs are substitutes the choicesof a profit-maximizing firmhospital satisfy thelaw of aggregate demand Moreover when thechoices of every hospitalfirm satisfy the law ofaggregate demand and the substitutes conditionthen (b) the set of workersdoctors employed isthe same at every stable allocation (c) the num-ber employed by each firmhospital is also thesame and (d) truthful reporting is a dominantstrategy for doctors in the doctor-offering algo-rithm Moreover we prove (e) that if the law of

aggregate demand fails in any potentially ob-servable way then the preceding dominantstrategy property does not hold

For these results to be useful for practicalmechanism design one needs to account forhow preferences especially hospital prefer-ences are to be reported to the mechanismThere needs to be a convenient way for hospi-tals to express a rich array of preferences andone needs to know whether the preferences be-ing reported actually satisfy the conditions ofthe various theorems Toward that end we in-troduce a parametric form that we call extendedassignment valuations which strictly general-izes several existing specifications and whichalways satisfies both the substitutes and law ofaggregate demand conditions

Finally we introduce an alternative treatmentof the doctor-offering algorithm the cumulativeoffer process We show that when contracts aresubstitutes the previously characterized doctor-offering algorithm coincides exactly with a cu-mulative offer process When contracts are notsubstitutes but there is just one hospital (theldquoauctioneerrdquo) the cumulative offer process co-incides with the Ausubel-Milgrom ascendingproxy auction This identity clarifies the con-nection between these algorithms and com-bined with the dominant strategy theoremreported above generalizes the Ausubel-Milgromdominant strategy theorem for the proxyauctions

Our new approach reveals deep similaritiesamong several of the most successful auctionand matching designs in current use and amongthe environmental conditions in which theoret-ically the mechanisms should perform at theirbest Understanding these similarities can helpus to understand the limitations of these mech-anisms paving the way for new designs

APPENDIX

PROOF OF THEOREM 1Let (XD XH) X2 be a solution to (3) Then

XD XH XD RD(XD) CD(XD) andsimilarly XH XD XH RH(XH) CH(XH)so XH XD CH(XH) CD(XD)

Next we show that X XH XD is a stableset of contracts Since X CH(XH) CD(XD)it follows by revealed preference that X

930 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

CH(X) CD(X) so condition (i) of the defi-nition of stability is satisfied

Consider any hospital h and set of contractsX CD(X X) naming hospital h Since X CD(XD) revealed preference of the doctorsimplies that X XD CD(XD) and hence thatX RD(XD) X XD RD(XD) CD(XD) RD(XD) A Thus X X RD(XD) XHby (3) So if X Ch(X) then by the revealedpreference of hospital h X h Ch(XH) Ch(X) Hence X Ch(X X) so condition(ii) is satisfied So the set of contracts X isunblocked

For the converse suppose that X is a stablecollection of contracts Then CD(X) X LetXH be the set of contracts that the doctorsweakly prefer to X and XD the set of contractsthat doctors weakly disprefer By constructionX XH X XD X is a partition of X

To obtain (3) observe first that if there issome h such that Ch(XH) Xh then X Ch(XH) violates stability condition (ii) SoCh(XH) Xh for all h that is CH(XH) X Itfollows that X RH(XH) X (XH X) X (X XD) XD and that X RD(XD) X (XD CD(XD)) X (XD X) XH

Hence (XD XH) satisfies (3) and XH XD X

PROOF OF THEOREM 2Let i j ( j wj) C(w) and wi wi Define

Z(w) ( j wj)wj wj Then Z(wi wi) Z(w) If contracts are substitutes then R(Z(wiwi)) R(Z(w)) By (6) since ( j wj) C(w)it follows that ( j wj) C(Z(w)) so ( j wj) R(Z(w)) Hence ( j wj) R(Z(wi wi)) So ( jwj) Z(wi wi) R(Z(wi wi)) C(Z(wiwi)) and thus (j wj) C(wi wi) by assumption(6) Thus C satisfies demand theory substitutes

Conversely suppose contracts are not substi-tutes Then there exists a set X an element (iwi) X and ( j wj) R(X) such that ( j wj) R(X) where X X (i wi) Using (6)wi Wi(X) Let w W(X) and wi Wi(X)Then wi wi and ( j wj) C(w) but ( j wj) C(wi wi) so C does not satisfy the demandtheory substitutes condition

PROOF OF THEOREM 5We may limit attention to the case with

exactly two hospitals by specifying that

the doctors find the other hospitals to beunacceptable

Suppose Rh is not isotone Then there existssome x y X and X X such that for all x X xH h and such that x Rh(X) Rh(X y) By construction since x y Ch(X y) contracts x and y specify different doctorssay d1 xD yD d2 Let x and y denote thecorresponding contracts for doctors d1 and d2 inwhich hospital h is substituted for h

We specify preferences as follows first forhospital h we take x h y h A and allother contracts are unacceptable Second doc-tors in xD(CH(X) CH(X y)) d1 d2prefer their elements of CH(X) CH(X y)to any other contract Third d1 has x d1

x and ranks all other contracts lower Fourthd2 has y d2

y and ranks all other con-tracts lower Finally the remaining doctors findall contracts from hospitals h and h to beunacceptable

Consider a feasible acceptable allocation Xsuch that y X Since h and d2 can have onlyone contract in X x y X Then hrsquos con-tracts in X form a subset of X so x is notincluded and d1 has a contract less preferredthan x Then the deviation by (d1 h) to xblocks X

Consider a feasible acceptable allocation Xsuch that y X Then either x y X or Xis blocked by a coalition including h d1 and d2using the contracts x and y However if x y X then a deviation by (d2 h) to contract yblocks X

Since all feasible allocations are blockedthere exists no stable set of contracts

PROOF OF THEOREM 7Suppose X D H W and let Z(w) ( j

wj)wj wj Then the law of aggregate de-mand is the statement that for any wage vectorsw w satisfying w w such that the choices setsare singletons C(Z(w)) C(Z(w)) The proofis by contradiction Suppose the law of aggre-gate demand does not hold Then there exists awage vector w and a doctor d such that for some(and hence all) 0 C(Z(wd 13 wd)) C(Z(wd wd)) Since hrsquos preferences arequasi-linear changing doctor drsquos wage can af-fect the hiring of other doctors only if it affectsthe hiring of doctor d It follows that there are

931VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

exactly two optimal choices for the hospital atwage vector w these are C(Z(wd wd)) atwhich doctor d is hired and C(Z(wd 13 wd))at which d is not hired but such that two otherdoctors are hired that is there exist doctors dd C(Z(wd 13 wd)) C(Z(wd wd))Let the corresponding payoff for the hospital(when faced with wage vector w) be

Consider the wage vector w (wd wd 2 wdd) For positive and suffi-ciently small the hospitalrsquos payoff at wage vec-tor w is 13 2 if it chooses C(Z(wd 13 wd))and it is 13 if it chooses C(Z(wd wd))and one of these choices must be optimal SoC(w) C(Z(wd 13 wd)) But then raisingthe wage of doctor d from wd 2 to wd whileholding the other wages at wd reduces the de-mand for doctor d from one to zero in violationof the demand theory substitutes condition

PROOF OF THEOREM 8By definition XD X D so by revealed pref-

erence Cd(X D) Cd(XD) Also X H XH soby the law of aggregate demand Ch(X H) Ch(XH) By Theorem 1 CD(XD) CH(XH)and CD(X D) CH(X H) so yendD Cd(XD) yenhH Ch(XH) and yendD Cd(XD) yenhH Ch(XH)Combining these leads to yendD Cd(X D) yendD Cd(XD) yenhH Ch(XH) yenhH Ch(XH) yendD Cd(XD) which begins and ends with the samesum Hence none of the inequalities can bestrict

PROOF OF THEOREM 9Since Ch(X) Ch(X) there exists some

set Y X Y X and contract x such thatCh(Y) Ch(Y x) Since x Ch(Y x)(as otherwise Ch(Y) Ch(Y x) for thepreferences to be rationalizable) there must ex-ist two contracts y z Rh(Y x) Rh(Y)such that y x z y Moreover since y z Ch(Y) yD zD

Denoting by h the second hospital whose exis-tence is hypothesized by the theorem we specifypreferences as follows Let all the doctors with con-tracts in Y have those contracts be their most favoredand let all other doctors find any contract with hunacceptable Let all doctors find any contract notinvolving hospital h or h to be unacceptable

In principle there are three casesIf xD yD then let PxD

y x and PzD z

Then there exist two stable matches Ch(Y x) and Ch(Y) with zD employed in the firstmatch but not in the second

The case xD zD is symmetricFinally if yD xD zD then let x y z

denote contracts with hospital h where the doc-tors (and any other terms) are the same as in xy z respectively Specify the remaining prefer-ences by PxD

x x PyD y y PzD

z z and Ph y x A z Thenthere exist two different stable matches x Ch(Y) and y Ch(Y x) with zD em-ployed in the first match but not in the second

PROOF OF THEOREM 10Let X denote the collection of contracts cho-

sen by the algorithm when doctor d submitspreference Pd If this collection which is stableunder the reported preferences is not stableunder Pd then there exists a blocking coalitionThis blocking coalition must contain d as noother doctorrsquos preferences have changed butthat is impossible since x is drsquos favorite con-tract according to the preferences Pd Since X isstable under Pd the doctor-optimal stable matchunder Pd (the existence of which is guaranteedby Theorem 2) must make every doctor(weakly) better off than at X In particulardoctor d must obtain x

PROOF OF THEOREM 11From Theorem 10 Pd x also obtains x

Hence by the rural hospitals theorem d is em-ployed at every point in the core when Pd x issubmitted So every allocation X at which d isunemployed is blocked by some coalition andset of contracts when d submits Pd Conse-quently if d submits the preferences Pd y1 y2 yn x then every allocation at whichd is unemployed is still blocked by the samecoalition and set of contracts Since the doctor-best stable allocation is one at which d gets aPd-acceptable contract that allocation is weaklyPd-preferred to x Finally the doctor-optimalmatch when Pd is submitted is still the doctor-optimal match when Pd is submitted as drsquospreferences over contracts less preferred than xcannot be used to block a match where shereceives a contract weakly preferred to x

932 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

PROOF OF THEOREM 12Consider contracts x y and z such that

xD xD yD yD zD zD and xH yH zH h Let the preferences of the three identified bePxD

x x PyD y y and PzD

z z andlet those of h be Ph y z x Forthe other contracts x Y Ch(X) let x be xDrsquosmost favored contract For the remaining doctorslet any contract with h or h be unacceptable

With the preceding preferences the only sta-ble allocation includes contracts x and y leav-ing doctor zD unemployed If however zDmisrepresents her preferences and reports PzD

z z then the doctor-optimal stable matchincludes z leaving doctor zD better off

PROOF OF THEOREM 13Setting J 1 and T A it is clear by

inspection that this family includes all singletonvaluations

The family is closed under endowment be-cause given any such valuation v( J T)endowing a set of doctors T simply creates thevaluation v( J T T))

To verify that the family is closed underaggregation consider any two valuations v( J T) and v( J T) Since J and T are justindex sets we may assume without loss ofgenerality that T T J J A DefineT T T and J J J Let

(15) ij ij if i D T j Jij if i D T j J0 otherwise

By inspection of the optimization problems v( J T) v( J T) v( J T)

For the converse consider the valuation v( J T) given by (13) We derive it construc-tively from the singleton valuations aggrega-tion and endowment as follows Let vj be thesingleton valuation associated with row j inmatrix [ij] for j 1 J Since VEA isclosed under aggregation v1 vJ v( J A) VEA Since VEA is also closed underendowment we may endow the doctors in T toobtain v( J T) VEA

PROOF OF THEOREM 14L Shapley (1962) (see also Lehmann et al

2001) had already proved that every assignment

valuation without endowments v( J A) is asubstitutes valuation Ausubel and Milgrom(2002) prove that a valuation v is a substitutesvaluation if and only if the corresponding indi-rect profit function ((p) v(S) yendS pd) issubmodular Let be the indirect profit func-tion corresponding to v( J A) Then theindirect profit function corresponding to v( J T) is (p1 pN) (p1 pN 0 0)Since is the profit function of the substitutesvaluation vh it is submodular and hence issubmodular as well

PROOF OF THEOREM 15Suppose that contracts are substitutes for the

hospitals We proceed by induction The initialcondition specifies that the sequences are iden-tical through time t 0 Denote the sequencecorresponding to the cumulative offer processby a superscript C and denote the alternativeprocess defined by (9) with no superscript As-sume the inductive hypothesis that the se-quences are the same up to round t 1 andsuppress the corresponding superscripts for thevalues at that round Then XD(t) X RH(XH(t 1)) XD

C(t) This also implies that

(16) X XH t 1 XD t

To complete the proof we must show thatXH

C(t) XH(t) or equivalently that XH(t 1) CD(XD(t)) X RD(XD(t))

For t 2 XHC(t 2) XH

C(t 1) by con-struction so by the inductive hypothesis XH(t 2) XH(t 1) Since contracts are substitutesRH is isotone so X RH(XH(t 1)) X RH(XH(t 2)) and hence XD(t) XD(t 1)For t 1 the inclusion XD(t) XD(t 1) isimplied by the initial condition XD(0) X

Recall that by revealed preference RD isisotone It follows that RD(XD(t)) RD(XD(t 1)) and hence using (9) that XH(t 1) X RD(XD(t 1)) X RD(XD(t)) XH(t) ThusXH(t 1) XH(t 1) (X RD(XD(t))) XH(t 1) RD(XD(t)) So XH(t 1) CD(XD(t)) XH(t 1) (XD(t) RD(XD(t))) (XH(t 1) RD(XD(t))) (XD(t) RD(XD(t))) (XH(t 1) XD(t)) RD(XD(t)) X RD(XD(t)) where the last stepequality follows from (16)

933VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

PROOF OF THEOREM 16By construction any contract not in XH(t) is

less preferred by some doctor d than everycorresponding contract in XH(t) (because doctord offers her most preferred contracts in se-quence) So any collection of contracts thatincludes some not in XH(t) must be strictly lesspreferred by one of the doctors Any profitablecoalitional deviation must use only contracts inXH(t)

By construction the one hospitalauctioneermust be part of any deviating coalition andCH(XH(t)) is its strictly most preferred collectionof contracts in XH(t) so there is no profitablecoalitional deviation using just contracts in XH(t)

REFERENCES

Abdulkadiroglu Atila ldquoCollege Admissionswith Affirmative Actionrdquo Unpublished Pa-per 2003

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoBoston Public School MatchingrdquoAmerican Economic Review 2005a (Papersand Proceedings) 95(2) pp 368ndash71

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoThe New York City High SchoolMatchrdquo American Economic Review 2005b(Papers and Proceedings) 95(2) pp 364ndash67

Abdulkadiroglu Atila and Sonmez TayfunldquoSchool Choice A Mechanism Design Ap-proachrdquo American Economic Review 200393(3) pp 729ndash47

Adachi Hiroyuki ldquoOn a Characterization of Sta-ble Matchingsrdquo Economics Letters 200068(1) pp 43ndash49

Alkan Ahmet and Gale David ldquoStable ScheduleMatching under Revealed Preferencerdquo Jour-nal of Economic Theory 2003 112(2) pp289ndash306

Ausubel Lawrence M Cramton Peter and Mil-grom Paul R ldquoThe Clock-Poxy Auction APractical Combinatorial Auction Designrdquo inPeter Cramton Yoav Shoham and RichardSteinberg eds Combinatorial auctionsCambridge MA MIT Press 2005 ch 5

Ausubel Lawrence M and Milgrom Paul RldquoAscending Auctions with Package Bid-dingrdquo Frontiers of Theoretical Economics2002 1(1) Article 1

Blum Yosef Roth Alvin E and Rothblum UrielG ldquoVacancy Chains and Equilibration in Se-nior-Level Labor Marketsrdquo Journal of Eco-nomic Theory 1997 76(2) pp 362ndash411

Brewer Paul J and Plott Charles R ldquoA BinaryConflict Ascending Price (Bicap) Mechanismfor the Decentralized Allocation of the Rightto Use Railroad Tracksrdquo International Jour-nal of Industrial Organization 1996 14(6)pp 857ndash86

Bulow Jeremy and Levin Jonathan ldquoMatchingand Price Competitionrdquo Stanford UniversityStanford Economics Working Paper No1818 2003

Cramton Peter Shoham Yoav and SteinbergRichard Combinatorial auctions Cam-bridge MA MIT Press (forthcoming)

Crawford Vincent P and Knoer Elsie M ldquoJobMatching with Heterogeneous Firms andWorkersrdquo Econometrica 1981 49(2) pp437ndash50

Demange Gabrielle and Gale David ldquoThe Strat-egy Structure of Two-Sided Matching Mar-ketsrdquo Econometrica 1985 53(4) pp 873ndash88

Dubins Lester and Freedman David ldquoMachia-velli and the Gale-Shapley Algorithmrdquo Na-val Research Logistics Quarterly 198188(7) pp 485ndash94

Echenique Federico and Oviedo Jorge ldquoCoreMany-to-One Matchings by Fixed-PointMethodsrdquo Journal of Economic Theory2004 115(2) pp 358ndash76

Fleiner Tamas ldquoA Fixed-Point Approach toStable Matchings and Some ApplicationsrdquoMathematics of Operations Research 200328(1) pp 103ndash26

Gale David and Shapley Lloyd ldquoCollege Ad-missions and the Stability of MarriagerdquoAmerican Mathematical Monthly 196269(1) pp 9ndash15

Gul Faruk and Stacchetti Ennio ldquoWalrasianEquilibrium with Gross Substitutesrdquo Journalof Economic Theory 1999 87(1) pp 95ndash124

Kelso Alexander and Crawford Vincent P ldquoJobMatching Coalition Formation and GrossSubstitutesrdquo Econometrica 1982 50(6) pp1483ndash504

Lehmann Benny Lehmann Daniel and NisanNoam ldquoCombinatorial Auctions with De-

934 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

creasing Marginal Utilityrdquo Games and Eco-nomic Behavior 2005 (forthcoming)

Lien Yuan-Chuan and Yan Jun ldquoOn the GrossSubstitutes Conditionrdquo Unpublished Paper2003 httpwwwstamfordeduyclienTerm_Paper_Lien_Yanpdf

Martınez Ruth Masso Jordi Neme Alejandroand Oviedo Jorge ldquoSingle Agents and the Setof Many-to-One Stable Matchingsrdquo Journalof Economic Theory 2000 91(1) pp 91ndash105

Milgrom Paul R Putting auction theory towork Cambridge Cambridge UniversityPress 2004

Milgrom Paul R ldquoPutting Auction Theory toWork The Simultaneous Ascending Auc-tionrdquo Journal of Political Economy 2000108(2) pp 245ndash72

Porter David Rassenti Stephen RoopnarineAnil and Smith Vernon ldquoCombinatorial Auc-tion Designrdquo Proceedings of the NationalAcademy of Sciences 2003 100(19) pp11153ndash57

Reijnierse Hans van Gellekom Anita and PottersJos A M ldquoVerifying Gross SubstitutabilityrdquoEconomic Theory 2002 20(4) pp 767ndash76

Roth Alvin E ldquoThe Economics of Matching Sta-bility and Incentivesrdquo Mathematics of Opera-tions Research 1982 7(4) pp 617ndash28

Roth Alvin E ldquoStability and Polarization ofInterests in Job Matchingrdquo Econometrica1984 52(1) pp 47ndash57

Roth Alvin E ldquoThe College Admissions Prob-lem Is Not Equivalent to the Marriage Prob-lemrdquo Journal of Economic Theory 1985a36(2) pp 277ndash88

Roth Alvin E ldquoConflict and Coincidence ofInterest in Job Matching Some New Resultsand Open Questionsrdquo Mathematics of Oper-ations Research 1985b 10(3) pp 379ndash89

Roth Alvin E ldquoOn the Allocation of Residentsto Rural Hospitals A General Property ofTwo-Sided Matching Marketsrdquo Economet-rica 1986 54(2) pp 425ndash27

Roth Alvin E ldquoA Natural Experiment in theOrganization of Entry-Level Labor MarketsRegional Markets for New Physicians andSurgeons in the United Kingdomrdquo AmericanEconomic Review 1991 81(3) pp 415ndash40

Roth Alvin E and Peranson Elliott ldquoThe Rede-sign of the Matching Market for AmericanPhysicians Some Engineering Aspects ofEconomic Designrdquo American Economic Re-view 1999 89(4) pp 748ndash80

Roth Alvin E and Sotomayor Marilda Two-sided matching A study in game-theoreticmodeling and analysis Cambridge Cam-bridge University Press 1990

Sen Amartya Collective choice and social wel-fare San Francisco Holden-Day Inc 1970

Shapley Lloyd ldquoComplements and Substitutesin the Optimal Assignment Problemrdquo NavalResearch Logistics Quarterly 1962 9(1) pp45ndash48

935VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

Page 7: Matching with Contracts - Stanford Universityweb.stanford.edu/~milgrom/publishedarticles/Matching with... · 2005. 10. 22. · Gale-Shapley matching algorithm. Hence, the Gale-Shapley

(6) CX CWX

THEOREM 2 Suppose that X D W is afinite set of doctor-wage pairs and that (6)holds Then C satisfies the demand theory sub-stitutes condition if and only if its contracts aresubstitutes

In particular this shows that the Kelso-Crawford ldquogross substitutesrdquo condition is sub-sumed by our substitutes condition

A A Generalized Gale-Shapley Algorithm

We now introduce a monotonic algorithmthat will be shown to coincide with the Gale-Shapley algorithm on its original domain Todescribe the monotonicity that is found in thealgorithm let us define an order on X X asfollows

(7) XD XH XD XH

N XD XD and XH XH

With this definition (X X ) is a finitelattice

The generalized Gale-Shapley algorithm isdefined as the iterated applications of a certainfunction F X X3 X X as defined below

(8) F1 X X RH X

F2 X X RD X

FXD XH F1 XH F2 F1 XH

As we have previously observed since the doc-torsrsquo choices are singletons a revealed prefer-ence argument establishes that the function RD X3 X is isotone If the contracts are substitutesfor the hospitals then the function RH X 3 Xis isotone as well When both are isotone thefunction F (X X ) 3 (X X ) isalso isotone that is it satisfies ((XD XH) (XD XH)) f (F(XD XH) F(XD XH))

Thus F X X 3 X X is an isotonefunction from a finite lattice into itself Usingfixed point theory for finite lattices the set offixed points is a nonempty lattice and iterated

applications of F starting from the minimumand maximum points of X X converge mono-tonically to a fixed point of F5 We summarizethe particular application here with the follow-ing theorem6

THEOREM 3 Suppose contracts are substi-tutes for the hospitals Then

(a) The set of fixed points of F on X X is anonempty finite lattice and in particularincludes a smallest element (X D X H) and alargest element (X D X H)

(b) Starting at (XD XH) (X A) the general-ized Gale-Shapley algorithm convergesmonotonically to the highest fixed point

X D X H

supX XFX X X X and

(c) Starting at (XD XH) (A X) the general-ized Gale-Shapley algorithm convergesmonotonically to the lowest fixed point

X D X H

infX XFX X X X

The facts that (X D X H) is the highest fixedpoint of F and that (X D X H) is the lowest in thespecified order mean that for any other fixedpoint (XD XH) X D XD X D and X H XH X H Because doctors are better off when theycan choose from a larger set of contracts it

5 This special case of Tarskirsquos fixed point theorem can besimply proved as follows Let Z be a finite lattice withmaximum point z Let z0 z z1 F(z0) zn F(zn1)Plainly z1 z0 and since F is isotone z2 F(z1) F(z0) z1 and similarly zn131 zn for all n So thedecreasing sequence zn converges in a finite number ofsteps to a point z with F( z) z Moreover for any fixedpoint z since z z z Fn( z) Fn(z) z for n large soz is the maximum fixed point A similar argument appliesfor the minimum fixed point

6 Hiroyuki Adachi (2000) and Federico Echenique andJorge Oviedo (2004) have also characterized the Gale-Shapley algorithm for the marriage problem and the collegeadmissions problem respectively as iterated applications ofa certain operator on a lattice See also Tamas Fleiner(2003)

919VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

follows that the doctors unanimously weaklyprefer CD(X D) to CD(XD) to CD(X D) and simi-larly that the hospitals unanimously preferCH(X H) to CH(XH) to CH(X H) Notice byTheorem 1 that CD(X D) CH(X H) X D X H and CD(X D) CH(X H) X D X H sowe have the following welfare conclusion

THEOREM 4 Suppose contracts are substi-tutes for the hospitals Then the stable set ofcontracts X D X H is the unanimously mostpreferred stable set for the doctors and theunanimously least preferred stable set for thehospitals Similarly the stable set X D X H isthe unanimously most preferred stable set forthe hospitals and the unanimously least pre-ferred stable set for the doctors

Theorems 3 and 4 duplicate and extend fa-miliar conclusions about stable matches in theGale-Shapley matching problem and a similarconclusion about equilibrium prices in theKelso-Crawford labor market model Thesenew theorems encompass both these older mod-els and additional ones with general contractterms

To see how the Gale-Shapley algorithm isencompassed consider the doctor-offering al-gorithm As in the original formulation we sup-pose that hospitals have a ranking of doctorsthat is independent of the other doctors they willhire so hospital h just chooses its nh mostpreferred doctors (from among those who areacceptable and have proposed to hospital h)

Let XH(t) be the cumulative set of contractsoffered by the doctors to the hospitals throughiteration t and let XD(t) be the set of contractsthat have not yet been rejected by the hospitalsthrough iteration t Then the contracts ldquoheldrdquo atthe end of the iteration are precisely those thathave been offered but not rejected which arethose in XD(t) XH(t) The process initiateswith no offers having been made or rejected soXD(0) X and XH(0) A

Iterated applications of the operator F de-scribed above define a monotonic process inwhich the set of doctors makes an ever-larger(accumulated) set of offers and the set of unre-jected offers grows smaller round by roundUsing the specification of F and starting fromthe extreme point (X A) we have

(9) XD t X RH XH t 1

XH t X RD XD t

After offers have been made in iteration t 1the hospitalrsquos cumulative set of offers is XH(t 1) Each hospital h holds onto the nh best offersit has received at any iteration provided thatmany acceptable offers have been made other-wise it holds all acceptable offers that havebeen made Thus the accumulated set of re-jected offers is RH(XH(t 1)) and the unre-jected offers are those in X RH(XH(t 1)) XD(t) At round t if a doctorrsquos contract is beingheld then the last offer the doctor made was itsbest contract in XD(t) If a doctorrsquos last offerwas rejected then its new offer is its best con-tract in XD(t) The contracts that doctors havenot offered at this round or any earlier one aretherefore those in RD(XD(t)) So the accumu-lated set of offers doctors have made are thosein X RD(XD(t)) XH(t) Once a fixed point ofthis process is found we have by Theorem 1 astable set of contracts XH(t) XD(t)

To illustrate the algorithm consider a simpleexample with two doctors and two hospitalswhere X D H and agents have the follow-ing preferences

(10) Pd1 h1 h2

Ph1 d1 d2 A

Pd2 h1 h2

Ph2 d1 d2 d1 d2 A

The algorithm is initialized with XD(0) X (d1 h1) (d1 h2) (d2 h1) (d2 h2) andXH(0) A Table 1 applies the operator givenin (9) to illustrate the algorithm

For t 1 starting from XD(1) X bothdoctors choose to work for the hospital h1 sothey reject their contracts with hospital h2 thusRD(XD(1)) (d1 h2) (d2 h2) Next XH(1) iscalculated as the complement of RD(XD(1)) soXH(1) (d1 h1) (d2 h1) From XH(1) thehospitals choose (d1 h1) and reject (d2 h1)completing the row for t 1

920 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

For t 2 we first compute XD(2) as thecomplement of RH(XH(1)) The doctors choose(d1 h1) (d2 h2) so they reject (d1 h2) Thehospitals must then choose from the comple-ment XH(2) X (d1 h2) The hospitalschoose (d1 h1) and (d2 h2) and reject (d2 h1) Inthe third round XD(3) XD(2) and the processhas reached a fixed point

The example illustrates the monotonicity ofthe algorithm XH(t) grows larger step by stepwhile XD(t) grows smaller At termination of thealgorithm the intersection of the choice sets isthe stable set of contracts XH(3) XD(3) (d1 h1) (d2 h2) Moreover when XD(t) andXH(t) are interpreted as suggested above theprocess XD(t) XH(t) described by (9) with theinitial conditions XD(0) X and XH(0) Acoincides with the doctor-offering Gale-Shapley algorithm

For the hospital-offering algorithm a similaranalysis applies but with a different interpreta-tion of the sets and a different initial conditionLet XD(t) be the cumulative set of contractsoffered by the hospitals to the doctors beforeiteration t and let XH(t) be the set of contractsthat have not yet been rejected by the hospitalsup to and including iteration t Then the con-tracts ldquoheldrdquo at the end of iteration t are pre-cisely those that have been offered but notrejected which are those in XD(t 13 1) XH(t)With this interpretation the analysis is identicalto the one above The Gale-Shapley hospitaloffering algorithm is characterized by (9) andthe initial conditions XD(0) A and XH(0) X

The same logic applies to the Kelso-Crawfordmodel provided one extends their original treat-ment to include a version in which the workersmake offers in addition to the treatment inwhich firms make offers The words of thepreceding paragraphs apply exactly but a con-tract offer now includes a wage so for exam-ple a hospital whose contract offer is rejected

by a doctor may find that its next most preferredcontract to the same doctor is at a higher wage

B When Contracts Are Not Substitutes

It is clear from the preceding analysis thatthat definition of substitutes is just sufficient toallow our mathematical tools to be applied Inthis section we establish more We show thatunless contracts are substitutes for every hospi-tal the very existence of a stable set of contractscannot be guaranteed7

THEOREM 5 Suppose H contains at least twohospitals which we denote by h and h Furthersuppose that Rh is not isotone that is contractsare not substitutes for h Then there exist pref-erence orderings for the doctors in set D apreference ordering for a hospital h with asingle job opening such that regardless of thepreferences of the other hospitals no stable setof contracts exists

Together Theorems 3 and 5 characterize theset of preferences that can be allowed as inputsinto a matching algorithm if we wish to guar-antee that the outcome of the algorithm is astable set of contracts with respect to the re-ported preferences According to Theorem 3we can allow all preferences that satisfy substi-tutes and still reach an outcome that is a stablecollection of contracts According to Theorem5 if we allow any preference that does notsatisfy the substitutes condition then there issome profile of singleton preferences for theother parties such that no stable collection ofcontracts exists

7 Kelso and Crawford (1982) provide a particular exam-ple in which preferences do not satisfy substitutes and theredoes not exist a stable allocation

TABLE 1mdashILLUSTRATION OF THE ALGORITHM

XD(t) RD(XD(t)) XH(t) RH(XH(t))t 0 X (d1 h2) (d2 h2) A At 1 X (d1 h2) (d2 h2) (d1 h1) (d2 h1) (d2 h1)t 2 (d1 h1) (d1 h2) (d2 h2) (d1 h2) (d1 h1) (d2 h1) (d2 h2) (d2 h1)t 3 (d1 h1) (d1 h2) (d2 h2) (d1 h2) (d1 h1) (d2 h1) (d2 h2) (d2 h1)

921VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

This theory also reaffirms and extends theclose connection between the substitutes condi-tion and other concepts that has been estab-lished in the recent auctions literature withquasi-linear preferences Milgrom (2000) stud-ies an auction model with discrete goods inwhich the set of possible bidder values is re-quired to include all the additive functions8 Heshows that if goods are substitutes then a com-petitive equilibrium exists If however thereare at least three bidders and if there is anyallowed value such that the goods are not allsubstitutes then there is some profile of valuessuch that no competitive equilibrium existsFaruk Gul and Ennio Stacchetti (1999) establishthe same positive existence result They alsoshow that if preferences include all values inwhich a bidder wants only one particular goodas well as any one for which goods are not allsubstitutes and if the number of bidders issufficiently large then there is some profile ofpreferences for which no competitive equilib-rium exists Ausubel and Milgrom (2002) estab-lish that if (a) there is some bidder for whompreferences are not demand theory substitutes(b) values may be any additive function and (c)there are at least three bidders in total thenthere is some profile of preferences such that theVickrey outcome is not stable and the coreimputations do not form a lattice Conversely ifall bidders have preferences that are demandtheory substitutes then the Vickrey outcome isin the core and the core imputations do form alattice Taken together these results establish aclose connection between the substitutes condi-tion the cooperative concept of the core thenoncooperative concepts of Vickrey outcomesand competitive equilibrium

C ldquoVacancy Chainrdquo Dynamics

Suppose that a labor market has reached equi-librium with all interested doctors placed

at hospitals in a stable match Then suppose onedoctor retires Imagine a process in which ahospital seeks to replace its retired doctor byraiding other hospitals to hire additional doc-tors If the hospital makes an offer that wouldsucceed in hiring a doctor away from anotherhospital the affected hospital has three optionsit may make an offer to another doctor (orseveral) improve the terms for its current doc-tor or leave the position vacant Suppose itmakes whatever contract offer would best serveits purposes

In models with a fixed number of positionsand no contracts this process in which doctorsand vacancies move from one hospital to an-other has been called vacancy chain dynamics(Blum et al 1997) Kelso and Crawford (1982)consider similar dynamics in the context of theirmodel

The formal results for our extended model aresimilar to those of the older theories Startingwith a stable collection of contracts X let XHbe the set of contracts that some doctor weaklyprefers to her current contract in X and letXD X (X XH) As in the proof ofTheorem 1 we have F(XD XH) (XD XH) andX XD XH

To study the dynamic adjustment that resultsfrom the retirement of doctor d we suppose theprocess starts from the initial state (XD(0)XH(0)) (XD XH) This means that the employ-ees start by considering only offers that are atleast as good as their current positions and thathospitals remember which employees have re-jected them in the past The doctorsrsquo rejectionfunction is changed by the retirement of doctord to RD where RD(X) RD(X) x XxD d that is in addition to the old rejec-tions all contract offers addressed to the retireddoctor are rejected

To synchronize the timing with our earliernotation let us imagine that hospitals makeoffers at round t 1 and doctors accept or rejectthem at round t Hospitals consider as poten-tially available the doctors in XH(t 1) X RD(XD(t 1)) and the doctors then reject all butthe best offers so the cumulative set of offersreceived is XD(t) X RH(XH(t 1)) Define

(11) FXD XH X RHXH X RDXD

8 A valuation function is additive if the value of any setof items is the sum of the separate values of the elementsSuch a function v is also described as ldquomodularrdquo Additivityis equivalent to the requirement that for all sets A and Bv(A B) 13 v(A B) v(A) 13 v(B)

922 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

If contracts are substitutes for the hospitalsthen F is isotone and since F(XD XH) (XDXH) it follows that F(XD XH) (XD XH)Then since (XD(0) XH(0)) (XD XH) we have(XD(1) XH(1)) F(XD(0) XH(0)) (XD(0)XH(0)) Iterating (XD(n) XH(n)) F(XD(n 1) XH(n 1)) (XD(n 1) XH(n 1)) thedoctors accumulate offers and the contracts thatare potentially available to the hospitals shrinkA fixed point is reached and by Theorem 1 itcorresponds to a stable collection of contracts

THEOREM 6 Suppose that contracts are sub-stitutes and that (XD XH) is a stable set ofcontracts Suppose that a doctor retires and thatthe ensuing adjustment process is described by(XD(0) XH(0)) (XD XH) and (XD(t) XH(t)) F(XD(t 1) XH(t 1)) Then the sequence(XD(t) XH(t)) converges to a stable collectionof contracts at which all the unretired doctorsare weakly better off and all the hospitals areweakly worse off than at the initial state (XDXH)9

The sequence of contract offers and jobmoves described by iterated applications of Fincludes possibly complex adjustments Hospi-tals that lose a doctor may seek several replace-ments Hospitals whose doctors receive contractoffers may retain those doctors by offering bet-ter terms or may hire a different doctor and laterrehire the original doctor at a new contract Allalong the way the doctors find themselveschoosing from more and better options and thehospitals find themselves marching down theirpreference lists by offering costlier terms pay-ing higher wages or making offers to otherdoctors whom they had earlier rejected

III Law of Aggregate Demand

We now introduce a second restriction onpreferences that allows us to prove the next tworesults about the structure of the set of stablematches We call this restriction the law ofaggregate demand Roughly this law states that

as the price falls agents should demand more ofa good Here price falls correspond to morecontracts being available and more demandcorresponds to taking on (weakly) more con-tracts We formalize this intuition with the fol-lowing definition

DEFINITION The preferences of hospital h H satisfy the law of aggregate demand if for allX X Ch(X) Ch(X)

According to this definition if the set ofpossible contracts expands (analogous to a de-crease in some doctorsrsquo wages) then the totalnumber of contracts chosen by hospital h eitherrises or stays the same The corresponding prop-erty for doctor preferences is implied by re-vealed preference because each doctor choosesat most one contract Just as for the substitutescondition when wages are endogenous we in-terpret the definition as applying to the domainof wage vectors for which the hospitalrsquos opti-mum is unique

The next theorem shows the important rela-tionship between profit maximization substi-tutes and the law of aggregate demand

THEOREM 7 If hospital hrsquos preferences arequasi-linear and satisfy the substitutes condi-tion then they satisfy the law of aggregatedemand

Below we use the law of aggregate demandto characterize both necessary and sufficientconditions for the rural hospitalsrsquo property andensure that truthful revelation is a dominantstrategy for the doctors Previously in matchingmodels without money the dominant strategyresult was known only for responsive prefer-ences with capacity constraints (Abdulkadiro-glu 2003) We subsume that result with ourtheorem

A Rural Hospitals Theorem

In the match between doctors and hospitalscertain rural hospitals often had trouble fillingall their positions raising the question ofwhether there are other core matches at whichthe rural hospitals might do better Roth (1986)analyzed this question for the case of X D

9 The theorem does not claim and it is not generally truethat this new point must be the new doctor-best stable set ofcontracts

923VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

H and responsive preferences and found thatthe answer is no every hospital that has unfilledpositions at some stable match is assigned ex-actly the same doctors at every stable match Inparticular every hospital hires the same numberof doctors at every stable match

In this section we show by an example thatthis last conclusion does not generalize to thefull set of environments in which contracts aresubstitutes10 We then prove that if preferencessatisfy the law of aggregate demand and substi-tutes then the last conclusion of Rothrsquos theoremholds every hospital signs exactly the samenumber of contracts at every point in the corealthough the doctors assigned and the terms ofemployment can vary Finally we show thatany violation of the law of aggregate demandimplies that preferences exist such that theabove conclusion does not hold

Suppose that H h1 h2 and D d1 d2d3 For hospital h1 suppose its choices maxi-mize where d3 d1 d2 d1 d2 A d1 d3 d2 d3 This prefer-ence satisfies substitutes11 Suppose h2 has oneposition with its preferences given by d1 d2 d3 A Finally suppose d1 and d2prefer h1 to h2 while d3 has the reverse prefer-ence Then the matches X (h1 d3) (h2 d1)and X (h1 d1) (h1 d2) (h2 d3) are bothstable but hospital h1 employs a different num-ber of doctors and the set of doctors assigneddiffers between the two matches

This example involves a failure of the law ofaggregate demand because as the set of con-tracts available to h1 expands by the addition of(h1 d3) to the set (h1 d1) (h1 d2) the numberof doctors demanded declines from two to oneWhen the law of aggregate demand holds how-ever we have the following result

THEOREM 8 If hospital preferences satisfysubstitutes and the law of aggregate demandthen for every stable allocation (XD XH) andevery d D and h H Cd(XD) Cd(X D)

and Ch(XH) Ch(X H) That is every doctorand hospital signs the same number of contractsat every stable collection of contracts

The next theorem verifies that the counterex-amples developed above can always be gener-alized whenever any hospitalrsquos preferencesviolate the law of aggregate demand

THEOREM 9 If there exists a hospital h setsX X X such that Ch(X) Ch(X) andat least one other hospital then there existsingleton preferences for the other hospitalsand doctors such that the number of doctorsemployed by h is different for two stablematches

Theorem 9 establishes that the law of aggre-gate demand is not only a sufficient conditionfor the rural hospitals result of Theorem 8 butin a particular sense a necessary one as well

B Truthful Revelation as a DominantStrategy

The main result of this section concerns doc-torsrsquo incentives to report their preferences truth-fully For the doctor-offering algorithm ifhospital preferences satisfy the law of aggregatedemand and the substitutes condition then it isdominant strategy for doctors to reveal truth-fully their preferences over contracts12 We fur-ther show that both preference conditions playessential roles in the conclusion

We will show the positive incentive result forthe doctor-offering algorithm in two stepswhich highlight the different roles of the twopreference assumptions First we show that thesubstitutes condition by itself guarantees thatdoctors cannot benefit by exaggerating the rank-ing of an unattainable contract More preciselyif there exists a preferences list for a doctor dsuch that d obtains contract x by submitting thislist then d can also obtain x by submitting apreference list that includes only contract xSecond we will show that adding the law of

10 A similar example appears in Ruth Martınez et al(2000)

11 These preferences however do not display the ldquosingleimprovement propertyrdquo that Gul and Stacchetti (1999) in-troduce and show is characteristic of substitutes preferencesin models with quasi-linear utility

12 It is of course not a dominant strategy for hospitals totruthfully reveal nor would it be so even if we consideredthe hospital-offering algorithm For further discussion ofthis point see Roth and Sotomayor (1990)

924 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

aggregate demand guarantees that a doctor doesat least as well as reporting truthfully as byreporting any singleton Together these are thedominant strategy result

To understand why submitting unattainedcontracts cannot help a doctor d consider thefollowing Let x be the most-preferred contractthat d can obtain by submitting any preferencelist (holding all other submitted preferencesfixed) Note that all that d accomplishes whenreporting that certain contracts are preferred to xis to make it easier for some coalition to blockoutcomes involving x Thus if x is attainablewith any report it is attainable with the reportPd x that ranks x as the only acceptable con-tract This intuition is captured in the followingtheorem

THEOREM 10 Let hospitalsrsquo preferences sat-isfy the substitutes condition and let the match-ing algorithm produce the doctor-optimalmatch Fixing the preferences of hospitals andof doctors besides d let x be the outcome that dobtains by reporting preferences Pd z1 dz2 d

d zn d x Then the outcome that dobtains by reporting preferences Pd x is also x

Some other doctors may be strictly better offwhen d submits her shorter preference list thereare fewer collections of contracts that d nowobjects to so the core may become larger andthe doctor-optimal point of the enlarged coremakes all doctors weakly better off and maymake some strictly better off

Without the law of aggregate demand how-ever it may still be in a doctorrsquos interest toconceal her preferences for unattainable posi-tions To see this consider the case with twohospitals and three doctors where contracts aresimply elements of D H and let preferences be

(12) Pd1 h1 h2

Ph1 d3 d1 d2 d1 d2

Pd2 h2 h1

Ph2 d1 d2 d3

Pd3 h2 h1

With these preferences the only stable matchis (d1 h2) (d3 h1) which leaves d2 unem-ployed However if d2 were to reverse herranking of the two hospitals then (d1 h1) (d2h1) (d3 h2) would be chosen by the doctor-offering algorithm leaving d2 better off Essen-tially by offering a contract to h2 d2 haschanged the number of positions availableWhen the preferences of the hospitals satisfythe law of aggregate demand however mak-ing more offers to the hospitals (weakly) in-creases the number of contracts the hospitalsaccept

THEOREM 11 Let hospitalsrsquo preferences sat-isfy substitutes and the law of aggregate de-mand and let the matching algorithm producethe doctor-optimal match Then fixing the pref-erences of the other doctors and of all thehospitals let x be the contract that d obtains bysubmitting the set of preferences Pd z1 dz2 d

d zn d x Then the preferences Pd y1 y2 yn x yn131 yN

obtain a contract that is Pd-preferred or indif-ferent to x

According to this theorem when a doctorrsquostrue preferences are Pd the doctor can never dobetter according to these true preferences thanby reporting the preferences truthfully

In fact the law of aggregate demand is ldquoal-mostrdquo a necessary condition as well The excep-tions can arise because certain violations of thelaw of aggregate demand are unobservable fromthe choice data of the algorithm and these can-not affect incentives Thus consider an examplewhere terms t are included in the contract andwhere a hospital h has preferences (d1 ht1) (d1 h t1) (d2 h t2) (d1 h t1) (d2 h t2) Although these preferences violatethe law of aggregate demand the algorithm willnever ldquoseerdquo the violation as either (d1 h t1) d1

(d1 h t1) or (d1 h t1) d1(d1 h t1) Thus

whichever terms that d1 first offers will deter-mine a conditional set of preferences for thehospital that does satisfy the law of aggregatedemand (The hospital will never reject an offerof either (d1 h t1) or (d1 h t1))

The next theorem says that if some hospitalrsquospreferences violate the law of aggregate demandin a way that can even potentially be observed

925VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

from the hospitalrsquos choices then there existpreferences for the other agents such that it isnot a dominant strategy for doctors to reporttruthfully even when the other assumptions wehave used are satisfied

THEOREM 12 Let hospital h have prefer-ences such that Ch(X) Ch(X x) and letthere exist two contracts y z such that yD zD xD yD and y z Rh(X x) Rh(X)Then if another hospital h exists there existsingleton preferences for the hospitals besides hand preferences for the doctors such that it isnot a dominant strategy for all doctors to revealtheir preferences truthfully

Thus to the extent that the law of aggregatedemand for hospital preferences has observableconsequences for the progress of the doctor-offering algorithm it is an indispensable condi-tion to ensure the dominant strategy property fordoctors

IV Classes of Conforming Preferences

Although the class of substitutes valuations isquite limited13 it is broader than the set ofresponsive preferences in useful ways Thesubstitutes valuations accommodate all the af-firmative action and subspecialty constraints de-scribed above and allow a doctorrsquos marginalproduct to depend on which other doctors thehospital attracts

In this section we introduce a parameterizedclass of quasi-linear substitutes valuations forhospitals evaluating sets of new hires The val-uations are based on an endowed assignmentmodel according to which hospitals have a set

of jobs to fill and an existing endowment ofdoctors while doctorsrsquo productivities varyamong jobs A hospital values new doctors ac-cording to the their incremental value in theassignment problem

From a general job assignment perspectivethe key restrictions of endowed assignment val-uations are that each doctor can do one and onlyone job and that the hospitalrsquos output is the sumof outputs of its various jobs A hospital cannotuse one doctor for two jobs nor can it combinethe skills of two doctors in the same job Alsothere is no interaction in the productivity ofdoctors in different jobs Given this mathemat-ical structure if a doctor is lost it will always beoptimal for the hospital to retain all of its otherdoctors although it may choose to reassignsome of the retained doctors to fill vacatedpositions

Another way to describe the set of endowedassignment valuations VEA is to build it upfrom three properties as follows First a sin-gleton valuation is one of the form v(S) maxdSd for some nonnegative vector Sin-gleton valuations represent the possible valua-tions by a hospital with just one opening andVEA includes all singleton valuations Second ifa hospital is composed of two units j 1 2each of which has a valuation vj VEA then thehospitalrsquos maximum value from assigningworkers between its units denoted by (v1 v2)(S) maxRSv1(R) 13 v2(S R) is also inthe set We call this property closure underaggregation Third if a hospitalrsquos value is de-rived from a value in VEA by endowing thehospital with a set of doctors T then the hospi-talrsquos incremental value for extra doctorsv(ST) v(S T) v(T) is also in the set VEAWe call this property closure under endowmentFinally two valuations v1 and v2 are calledequivalent if they differ by an additive con-stant For example for any fixed set of doctorsT v( T) is equivalent to v( T)

THEOREM 13 Let VEA denote the smallestfamily of valuations of sets of doctors that in-cludes all the singleton valuations and is closedunder aggregation and endowment Then foreach v VEA there exists a set of jobs J a setof doctors T and a (D 13 T) J-matrix [ij]such that v is equivalent to the following

13 Hans Reijnierse et al (2002) (see also Yuan-ChuanLien and Jun Yan 2003) have characterized the valuationfunctions that satisfy the substitutes condition as followsLet v(S) be the hospitalrsquos value of doctor set S and letvS(T) v(S T) v(S) denote the incremental value of theset of doctors T Then doctors are substitutes if for every setS and three other doctors d1 d2 and d3 there is no uniquemaximum in vS(d1) 13 vS(d2 d3) vS(d2) 13 vS(d1 d3)vS(d3) 13 vS(d1 d2)

926 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

(13) vSJ T maxz

d S

djzdj subject to

d S

zdj 1 for j J

j J

zdj 1 for d S T0 for d S T

zdj 0 1 for all d j

Conversely for every such J T and v( J T) VEA

We dub this family of valuations the endowedassignment valuations because of the form ofoptimization (13) The family VEA is an exten-sion of the assignment valuations derived byLloyd Shapley (1962) used by Roth (19841985b) in models of matching with wages andexplicit job assignments and emphasized in astudy of package bidding by Lehmann et al(2001) The endowed assignment valuations arequite useful for applications They also fit nicelywith the theory reported in previous sections forthe following reason

THEOREM 14 Every endowed assignmentvaluation v( J T) VEA is a substitutesvaluation

To the best of our knowledge all of thesubstitutes valuations that have been used orproposed for practical applications are includedamong the endowed assignment valuations In-deed the question of whether all substitutesvaluations are endowed assignment valuationsis an open one Here we review some of themost popular valuations to show how they fitinto the class

The most commonly studied class of prefer-ences for matching problems like the Match forwhich employment terms are exogenouslyfixed are the responsive preferences Thesespecify that each hospital h has a fixed numberof openings nh a set of acceptable doctors Dh

A D and a strict ordering h of the acceptabledoctors When a doctor is unacceptable thatmeans that hiring the doctor is always worsethan leaving her position unfilled Given any setof available doctors the hospital hires its nh

most preferred acceptable doctors if that manyare available and otherwise hires all of theacceptable doctors

To map responsive preferences into the as-signment problem framework define a utilityfunction uh D3 to represent h and set theminimum acceptable utility to zero Formally(1) if d d Dh

A then d h dN uh(d) uh(d)and (2) d Dh

AN uh(d) 0 Using this utilitywe specify an assignment problem as followsJ 1 nh and dj uh(d) 13 1 and fix thewage at 1 Using a positive wage is a device toensure that the hospital strictly prefers not tohire a doctor it plans not to assign to any job Itis evident that with this valuation preferencethe hospital most prefers to hire the set of avail-able acceptable doctors with the highest rank-ing according to h

Among the extensions of responsive prefer-ences that have been most important in practiceare ones to accommodate quotas of variouskinds For example one use of quotas is tomanage subspecialties of internal medicine inwhich a certain number of positions are to befilled by doctors planning that subspecialty ifenough acceptable doctors are available Onecan reserve ms jobs for subspecialty s by pro-viding that there are ms jobs in which doctors inthat subspecialty have their productivity in-creased by a large constant M Then if msdoctors in subspecialty s are available at leastthat many will be demanded at the optimalsolution to (13) If that many qualified doctorsare not available the jobs will be filled by otherdoctors according to their productivities

Another use of quotas is for an affirmativeaction policy that absolutely reserves jobs formembers of certain target groups For each af-firmative action group G define a correspond-ing set of jobs JG and let J G JG Specifythat for any doctor d G and job j JG dj uh(d) and otherwise dj 0 One can alsointroduce an unrestricted category of jobs j thatany doctor can fill with productivity dj uh(d) This obviously ensures that a certainnumber of jobs are reserved for each targetgroup

A recent treatment of affirmative action byRoth (1991) extended by Abdulkadiroglu(2003) uses the class of responsive preferenceswith capacity constraints This class requires

927VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

that the set of doctors be partitioned into a finitenumber of affirmative action groups and that foreach group G the hospital has a capacity mG thatlimits the number of doctors who can be hiredfrom that group In addition at most nh doctorsin total can be hired

To represent such preferences using endowedassignment valuations let us specify that thereare mG jobs of type G and yenG mG jobs in totalThe hospital is endowed with nh yenG mGdoctors The endowed doctors have productivityij M in every job where M is a largenumber This ensures that at most nh new doc-tors will be hired at any optimum For thenonendowed doctors we calculate productivi-ties uh(d) in the same fashion as for the respon-sive preferences and set dj uh(d) for jobs j oftype G and dj 0 for all other jobs Thisensures that at most mG doctors will be hiredfrom group G By inspection this specificationrepresents Abdulkadiroglursquos affirmative actionpreferences

Unlike the specifications used for the currentNational Resident Matching Program algo-rithm the endowed assignment valuations per-mit overlapping affirmative action categoriesFor example suppose that a small hospital has atarget of hiring one female and one minoritydoctor In the endowed assignment structurethe hospital may assign a minority female doc-tor to fill either a minority slot or a female slotbut not both This is necessary to retain thesubstitutes demand structure for otherwisemaking a minority female doctor availablecould lead the hospital to hire a nonminoritymale doctor whom it would otherwise reject

Endowed assignment valuations thus providea flexible parameterized way for hospitals torepresent their preferences for matching with orwithout wages using a class of quasi-linear pref-erences that satisfies the substitutes conditionand the law of aggregate demand

V Cumulative Offer Processes and Auctions

The algorithms described by the system (9)with different starting points have the propertythat they can terminate only at a stable set ofcontracts Nevertheless unless preferences sat-isfy the substitutes condition the system is notguaranteed to converge at all even when a fixed

point exists In this section we offer a differentcharacterization of the Gale-Shapley doctor-offering algorithm that will prove especiallywell suited to situations in which contracts maynot be substitutes but in which there is just oneldquohospitalrdquo the auctioneer For now we allowthe possibility that there are several hospitals

The alternative representation is constructedby replacing the system of equations (9) by thefollowing system

(14) XD t X RH XH t 1

XH t XH t 1 CD XD t

We call the algorithm that begins with XD(0) X and XH(0) A and obeys (14) a cumulativeoffer process because the formalism capturesthe idea that hospitals accumulate offers fromdoctors in the set XH(t) and hold their bestchoices CH(XH(t)) from the accumulated setThere is no assumption of consistency imposedon the algorithm so it is possible that severalhospitals are ldquoholdingrdquo contract offers from thesame doctor The corresponding allocation is ofcourse infeasible since each doctor can ulti-mately accept just one contract

At each round t of the cumulative offer pro-cess all doctors make their best offers from theset of not-yet-rejected choices XD(t) but anydoctor d for whom a contract is being heldsimply repeats one of its earlier offers Thusnew offers are made only by doctors who havebeen rejected

To see why this is so let x CH(XH(t)) be acontract that is being held and consider thecorresponding doctor xD d By revealed pref-erence doctor d strictly prefers x to any contractthat she has not yet offered since those con-tracts were available to offer at the time that xwas offered Since drsquos most preferred contractin Xd(t) at the current time must be weaklypreferred to x it must be coincide with one ofdrsquos earlier offers

The second equation of system (14) is the onethat distinguishes the cumulative offer processfrom the system in (9) In the cumulative offerprocess without any assumptions about hospi-talsrsquo preferences XH(t) grows monotonicallyfrom round to round so the sequence of setsconverges In contrast the earlier process was

928 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

guaranteed to converge only when contracts aresubstitutes for the hospitals

When contracts are substitutes the two sys-tems of equations are equivalent

THEOREM 15 Suppose that contracts aresubstitutes for the hospitals and that XD(0) Xand XH(0) A Then the sequences of pairs(XD(t) XH(t)) generated by the two laws ofmotion (9) and (14) are identical

Even with the initial condition XD(0) X andXH(0) A the algorithms described by (9) and(14) may differ when contracts are not substi-tutes In that case by inspection of the system(14) the cumulative offer process still con-verges because XH(t) is bounded by the finiteset X and grows monotonically from round toround What is at issue is whether the hospitalrsquoschoice from its final search set in the cumulativeoffer process is a feasible and stable set ofcontracts

We will find below that when there is a singlehospital the outcome is indeed a feasible andstable set of contracts In that case the cumu-lative offer process coincides with the general-ized proxy auction of Ausubel and Milgrom(2002) Those authors analyze in detail the casewhen a bid consists of a price and a subset of theset of goods that the bidder wishes to buy Ateach round the seller ldquoholdsrdquo the collection ofbids that maximizes its total revenues subject tothe constraint that each good can be sold onlyonce The generalized proxy auction howeveris not limited to the sale of goods and in fact isidentical in scope to our present model ofmatching with contracts In particular the auc-tioneer may impose a variety of constraints onthe feasible collections of bids and may weighnonprice factors either exclusively or in com-bination with prices to decide which collectionof bids to hold Bidders for their part maymake bids that include factors besides price andmay not include price at all

To illustrate the role of general contracts inthis auction setting consider the auction designsuggested by Paul Brewer and Charles Plott(1996) in which bidders seek to buy access to arailroad track In that application a bid specifiesa trainrsquos direction of travel departure and ar-rival times and price offered It is assumed that

trains travel at a uniform speed along the trackIn this setting the contract terms must includethe direction and the two times and the seller isconstrained to hold only combinations of bidssuch that trains maintain safe distances fromone another at all times

A second example of the generalized proxyprocess is a procurement auction in which thebuyer scores suppliers on the basis of suchfactors as quality excess capacity credit ratingand historical reliability as well as price and inwhich the buyer prefers to set aside someamount of its purchase for minority contractorsor to maintain geographic diversity of supply toreduce the chance of supply disruptions In anasset sale the seller may weigh the probabilitythat the sale will be completed for example dueto financing contingencies or because a union orantitrust regulators must approve the sale

The cumulative offer process model withgeneral contracts accommodates all of thesepossibilities The auctioneer in the model cor-responds to a single ldquohospitalrdquomdashhereafter theauctioneermdashwith a choice function CH thatselects her most preferred collection of contractproposals We have the following result (whichis first stated using different notation than in theAusubel-Milgrom paper)

THEOREM 16 When the doctor-offering cu-mulative offer process with a single hospitalterminates at time t with outcome (XD(t) XH(t))the hospitalrsquos choice CH(XH(t)) is a stable col-lection of contracts

Cumulative offer processes connect the the-ory of matching with contracts to the emergingtheory of package auctions and auctions withcomplex constraints

VI Conclusion

We have introduced a general model ofmatching with bilateral contracts that encom-passes and extends two-sided matching modelswith and without money and certain auctionmodels The new formulation allows some con-tract terms to be exogenously fixed and others tobe endogenous in any combinations In thisvery general framework we characterize stable

929VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

collections of contracts in terms of the solutionto a certain system of equations

The key to the analysis is to extend twoconcepts of demand theory to models with orwithout prices The first concept to be extendedis the notion of substitutes Our definition ap-plies essentially the Roth-Sotomayor substitut-able preferences condition to a more generalclass of contracts contracts are substitutes ifwhenever the set of feasible bilateral contractsexpands the set of contracts that the firm rejectsalso expands We show that (a) our definitioncoincides with the usual demand theory condi-tion when both apply (b) when contracts aresubstitutes a stable collection of contracts ex-ists and (c) if any hospital or firm has prefer-ences that are not substitutes then there arepreferences with single openings for each otherfirm such that no stable allocation exists Wefurther show that when the substitute conditionapplies (a) both the doctor-offering and hospi-tal-offering Gale-Shapley algorithms can berepresented as iterated operations of the sameoperator (starting from different initial condi-tions) and (b) starting at a stable allocationfrom which a doctor retires a natural marketdynamic mimics the Gale-Shapley process tofind a new stable allocation

The second relevant demand theory conceptis the law of demand which we extend both toinclude heterogeneous inputs and to encompassmodels with or without prices The law of ag-gregate demand condition holds that when theset of feasible contracts expands the number ofcontracts that the firm chooses to sign weaklyincreases In terms of traditional demand theorythis means that for example when the wages ofsome of a heterogeneous group of workers fallsif the workers are substitutes then the totalnumber of workers employed rises We showthat (a) when inputs are substitutes the choicesof a profit-maximizing firmhospital satisfy thelaw of aggregate demand Moreover when thechoices of every hospitalfirm satisfy the law ofaggregate demand and the substitutes conditionthen (b) the set of workersdoctors employed isthe same at every stable allocation (c) the num-ber employed by each firmhospital is also thesame and (d) truthful reporting is a dominantstrategy for doctors in the doctor-offering algo-rithm Moreover we prove (e) that if the law of

aggregate demand fails in any potentially ob-servable way then the preceding dominantstrategy property does not hold

For these results to be useful for practicalmechanism design one needs to account forhow preferences especially hospital prefer-ences are to be reported to the mechanismThere needs to be a convenient way for hospi-tals to express a rich array of preferences andone needs to know whether the preferences be-ing reported actually satisfy the conditions ofthe various theorems Toward that end we in-troduce a parametric form that we call extendedassignment valuations which strictly general-izes several existing specifications and whichalways satisfies both the substitutes and law ofaggregate demand conditions

Finally we introduce an alternative treatmentof the doctor-offering algorithm the cumulativeoffer process We show that when contracts aresubstitutes the previously characterized doctor-offering algorithm coincides exactly with a cu-mulative offer process When contracts are notsubstitutes but there is just one hospital (theldquoauctioneerrdquo) the cumulative offer process co-incides with the Ausubel-Milgrom ascendingproxy auction This identity clarifies the con-nection between these algorithms and com-bined with the dominant strategy theoremreported above generalizes the Ausubel-Milgromdominant strategy theorem for the proxyauctions

Our new approach reveals deep similaritiesamong several of the most successful auctionand matching designs in current use and amongthe environmental conditions in which theoret-ically the mechanisms should perform at theirbest Understanding these similarities can helpus to understand the limitations of these mech-anisms paving the way for new designs

APPENDIX

PROOF OF THEOREM 1Let (XD XH) X2 be a solution to (3) Then

XD XH XD RD(XD) CD(XD) andsimilarly XH XD XH RH(XH) CH(XH)so XH XD CH(XH) CD(XD)

Next we show that X XH XD is a stableset of contracts Since X CH(XH) CD(XD)it follows by revealed preference that X

930 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

CH(X) CD(X) so condition (i) of the defi-nition of stability is satisfied

Consider any hospital h and set of contractsX CD(X X) naming hospital h Since X CD(XD) revealed preference of the doctorsimplies that X XD CD(XD) and hence thatX RD(XD) X XD RD(XD) CD(XD) RD(XD) A Thus X X RD(XD) XHby (3) So if X Ch(X) then by the revealedpreference of hospital h X h Ch(XH) Ch(X) Hence X Ch(X X) so condition(ii) is satisfied So the set of contracts X isunblocked

For the converse suppose that X is a stablecollection of contracts Then CD(X) X LetXH be the set of contracts that the doctorsweakly prefer to X and XD the set of contractsthat doctors weakly disprefer By constructionX XH X XD X is a partition of X

To obtain (3) observe first that if there issome h such that Ch(XH) Xh then X Ch(XH) violates stability condition (ii) SoCh(XH) Xh for all h that is CH(XH) X Itfollows that X RH(XH) X (XH X) X (X XD) XD and that X RD(XD) X (XD CD(XD)) X (XD X) XH

Hence (XD XH) satisfies (3) and XH XD X

PROOF OF THEOREM 2Let i j ( j wj) C(w) and wi wi Define

Z(w) ( j wj)wj wj Then Z(wi wi) Z(w) If contracts are substitutes then R(Z(wiwi)) R(Z(w)) By (6) since ( j wj) C(w)it follows that ( j wj) C(Z(w)) so ( j wj) R(Z(w)) Hence ( j wj) R(Z(wi wi)) So ( jwj) Z(wi wi) R(Z(wi wi)) C(Z(wiwi)) and thus (j wj) C(wi wi) by assumption(6) Thus C satisfies demand theory substitutes

Conversely suppose contracts are not substi-tutes Then there exists a set X an element (iwi) X and ( j wj) R(X) such that ( j wj) R(X) where X X (i wi) Using (6)wi Wi(X) Let w W(X) and wi Wi(X)Then wi wi and ( j wj) C(w) but ( j wj) C(wi wi) so C does not satisfy the demandtheory substitutes condition

PROOF OF THEOREM 5We may limit attention to the case with

exactly two hospitals by specifying that

the doctors find the other hospitals to beunacceptable

Suppose Rh is not isotone Then there existssome x y X and X X such that for all x X xH h and such that x Rh(X) Rh(X y) By construction since x y Ch(X y) contracts x and y specify different doctorssay d1 xD yD d2 Let x and y denote thecorresponding contracts for doctors d1 and d2 inwhich hospital h is substituted for h

We specify preferences as follows first forhospital h we take x h y h A and allother contracts are unacceptable Second doc-tors in xD(CH(X) CH(X y)) d1 d2prefer their elements of CH(X) CH(X y)to any other contract Third d1 has x d1

x and ranks all other contracts lower Fourthd2 has y d2

y and ranks all other con-tracts lower Finally the remaining doctors findall contracts from hospitals h and h to beunacceptable

Consider a feasible acceptable allocation Xsuch that y X Since h and d2 can have onlyone contract in X x y X Then hrsquos con-tracts in X form a subset of X so x is notincluded and d1 has a contract less preferredthan x Then the deviation by (d1 h) to xblocks X

Consider a feasible acceptable allocation Xsuch that y X Then either x y X or Xis blocked by a coalition including h d1 and d2using the contracts x and y However if x y X then a deviation by (d2 h) to contract yblocks X

Since all feasible allocations are blockedthere exists no stable set of contracts

PROOF OF THEOREM 7Suppose X D H W and let Z(w) ( j

wj)wj wj Then the law of aggregate de-mand is the statement that for any wage vectorsw w satisfying w w such that the choices setsare singletons C(Z(w)) C(Z(w)) The proofis by contradiction Suppose the law of aggre-gate demand does not hold Then there exists awage vector w and a doctor d such that for some(and hence all) 0 C(Z(wd 13 wd)) C(Z(wd wd)) Since hrsquos preferences arequasi-linear changing doctor drsquos wage can af-fect the hiring of other doctors only if it affectsthe hiring of doctor d It follows that there are

931VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

exactly two optimal choices for the hospital atwage vector w these are C(Z(wd wd)) atwhich doctor d is hired and C(Z(wd 13 wd))at which d is not hired but such that two otherdoctors are hired that is there exist doctors dd C(Z(wd 13 wd)) C(Z(wd wd))Let the corresponding payoff for the hospital(when faced with wage vector w) be

Consider the wage vector w (wd wd 2 wdd) For positive and suffi-ciently small the hospitalrsquos payoff at wage vec-tor w is 13 2 if it chooses C(Z(wd 13 wd))and it is 13 if it chooses C(Z(wd wd))and one of these choices must be optimal SoC(w) C(Z(wd 13 wd)) But then raisingthe wage of doctor d from wd 2 to wd whileholding the other wages at wd reduces the de-mand for doctor d from one to zero in violationof the demand theory substitutes condition

PROOF OF THEOREM 8By definition XD X D so by revealed pref-

erence Cd(X D) Cd(XD) Also X H XH soby the law of aggregate demand Ch(X H) Ch(XH) By Theorem 1 CD(XD) CH(XH)and CD(X D) CH(X H) so yendD Cd(XD) yenhH Ch(XH) and yendD Cd(XD) yenhH Ch(XH)Combining these leads to yendD Cd(X D) yendD Cd(XD) yenhH Ch(XH) yenhH Ch(XH) yendD Cd(XD) which begins and ends with the samesum Hence none of the inequalities can bestrict

PROOF OF THEOREM 9Since Ch(X) Ch(X) there exists some

set Y X Y X and contract x such thatCh(Y) Ch(Y x) Since x Ch(Y x)(as otherwise Ch(Y) Ch(Y x) for thepreferences to be rationalizable) there must ex-ist two contracts y z Rh(Y x) Rh(Y)such that y x z y Moreover since y z Ch(Y) yD zD

Denoting by h the second hospital whose exis-tence is hypothesized by the theorem we specifypreferences as follows Let all the doctors with con-tracts in Y have those contracts be their most favoredand let all other doctors find any contract with hunacceptable Let all doctors find any contract notinvolving hospital h or h to be unacceptable

In principle there are three casesIf xD yD then let PxD

y x and PzD z

Then there exist two stable matches Ch(Y x) and Ch(Y) with zD employed in the firstmatch but not in the second

The case xD zD is symmetricFinally if yD xD zD then let x y z

denote contracts with hospital h where the doc-tors (and any other terms) are the same as in xy z respectively Specify the remaining prefer-ences by PxD

x x PyD y y PzD

z z and Ph y x A z Thenthere exist two different stable matches x Ch(Y) and y Ch(Y x) with zD em-ployed in the first match but not in the second

PROOF OF THEOREM 10Let X denote the collection of contracts cho-

sen by the algorithm when doctor d submitspreference Pd If this collection which is stableunder the reported preferences is not stableunder Pd then there exists a blocking coalitionThis blocking coalition must contain d as noother doctorrsquos preferences have changed butthat is impossible since x is drsquos favorite con-tract according to the preferences Pd Since X isstable under Pd the doctor-optimal stable matchunder Pd (the existence of which is guaranteedby Theorem 2) must make every doctor(weakly) better off than at X In particulardoctor d must obtain x

PROOF OF THEOREM 11From Theorem 10 Pd x also obtains x

Hence by the rural hospitals theorem d is em-ployed at every point in the core when Pd x issubmitted So every allocation X at which d isunemployed is blocked by some coalition andset of contracts when d submits Pd Conse-quently if d submits the preferences Pd y1 y2 yn x then every allocation at whichd is unemployed is still blocked by the samecoalition and set of contracts Since the doctor-best stable allocation is one at which d gets aPd-acceptable contract that allocation is weaklyPd-preferred to x Finally the doctor-optimalmatch when Pd is submitted is still the doctor-optimal match when Pd is submitted as drsquospreferences over contracts less preferred than xcannot be used to block a match where shereceives a contract weakly preferred to x

932 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

PROOF OF THEOREM 12Consider contracts x y and z such that

xD xD yD yD zD zD and xH yH zH h Let the preferences of the three identified bePxD

x x PyD y y and PzD

z z andlet those of h be Ph y z x Forthe other contracts x Y Ch(X) let x be xDrsquosmost favored contract For the remaining doctorslet any contract with h or h be unacceptable

With the preceding preferences the only sta-ble allocation includes contracts x and y leav-ing doctor zD unemployed If however zDmisrepresents her preferences and reports PzD

z z then the doctor-optimal stable matchincludes z leaving doctor zD better off

PROOF OF THEOREM 13Setting J 1 and T A it is clear by

inspection that this family includes all singletonvaluations

The family is closed under endowment be-cause given any such valuation v( J T)endowing a set of doctors T simply creates thevaluation v( J T T))

To verify that the family is closed underaggregation consider any two valuations v( J T) and v( J T) Since J and T are justindex sets we may assume without loss ofgenerality that T T J J A DefineT T T and J J J Let

(15) ij ij if i D T j Jij if i D T j J0 otherwise

By inspection of the optimization problems v( J T) v( J T) v( J T)

For the converse consider the valuation v( J T) given by (13) We derive it construc-tively from the singleton valuations aggrega-tion and endowment as follows Let vj be thesingleton valuation associated with row j inmatrix [ij] for j 1 J Since VEA isclosed under aggregation v1 vJ v( J A) VEA Since VEA is also closed underendowment we may endow the doctors in T toobtain v( J T) VEA

PROOF OF THEOREM 14L Shapley (1962) (see also Lehmann et al

2001) had already proved that every assignment

valuation without endowments v( J A) is asubstitutes valuation Ausubel and Milgrom(2002) prove that a valuation v is a substitutesvaluation if and only if the corresponding indi-rect profit function ((p) v(S) yendS pd) issubmodular Let be the indirect profit func-tion corresponding to v( J A) Then theindirect profit function corresponding to v( J T) is (p1 pN) (p1 pN 0 0)Since is the profit function of the substitutesvaluation vh it is submodular and hence issubmodular as well

PROOF OF THEOREM 15Suppose that contracts are substitutes for the

hospitals We proceed by induction The initialcondition specifies that the sequences are iden-tical through time t 0 Denote the sequencecorresponding to the cumulative offer processby a superscript C and denote the alternativeprocess defined by (9) with no superscript As-sume the inductive hypothesis that the se-quences are the same up to round t 1 andsuppress the corresponding superscripts for thevalues at that round Then XD(t) X RH(XH(t 1)) XD

C(t) This also implies that

(16) X XH t 1 XD t

To complete the proof we must show thatXH

C(t) XH(t) or equivalently that XH(t 1) CD(XD(t)) X RD(XD(t))

For t 2 XHC(t 2) XH

C(t 1) by con-struction so by the inductive hypothesis XH(t 2) XH(t 1) Since contracts are substitutesRH is isotone so X RH(XH(t 1)) X RH(XH(t 2)) and hence XD(t) XD(t 1)For t 1 the inclusion XD(t) XD(t 1) isimplied by the initial condition XD(0) X

Recall that by revealed preference RD isisotone It follows that RD(XD(t)) RD(XD(t 1)) and hence using (9) that XH(t 1) X RD(XD(t 1)) X RD(XD(t)) XH(t) ThusXH(t 1) XH(t 1) (X RD(XD(t))) XH(t 1) RD(XD(t)) So XH(t 1) CD(XD(t)) XH(t 1) (XD(t) RD(XD(t))) (XH(t 1) RD(XD(t))) (XD(t) RD(XD(t))) (XH(t 1) XD(t)) RD(XD(t)) X RD(XD(t)) where the last stepequality follows from (16)

933VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

PROOF OF THEOREM 16By construction any contract not in XH(t) is

less preferred by some doctor d than everycorresponding contract in XH(t) (because doctord offers her most preferred contracts in se-quence) So any collection of contracts thatincludes some not in XH(t) must be strictly lesspreferred by one of the doctors Any profitablecoalitional deviation must use only contracts inXH(t)

By construction the one hospitalauctioneermust be part of any deviating coalition andCH(XH(t)) is its strictly most preferred collectionof contracts in XH(t) so there is no profitablecoalitional deviation using just contracts in XH(t)

REFERENCES

Abdulkadiroglu Atila ldquoCollege Admissionswith Affirmative Actionrdquo Unpublished Pa-per 2003

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoBoston Public School MatchingrdquoAmerican Economic Review 2005a (Papersand Proceedings) 95(2) pp 368ndash71

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoThe New York City High SchoolMatchrdquo American Economic Review 2005b(Papers and Proceedings) 95(2) pp 364ndash67

Abdulkadiroglu Atila and Sonmez TayfunldquoSchool Choice A Mechanism Design Ap-proachrdquo American Economic Review 200393(3) pp 729ndash47

Adachi Hiroyuki ldquoOn a Characterization of Sta-ble Matchingsrdquo Economics Letters 200068(1) pp 43ndash49

Alkan Ahmet and Gale David ldquoStable ScheduleMatching under Revealed Preferencerdquo Jour-nal of Economic Theory 2003 112(2) pp289ndash306

Ausubel Lawrence M Cramton Peter and Mil-grom Paul R ldquoThe Clock-Poxy Auction APractical Combinatorial Auction Designrdquo inPeter Cramton Yoav Shoham and RichardSteinberg eds Combinatorial auctionsCambridge MA MIT Press 2005 ch 5

Ausubel Lawrence M and Milgrom Paul RldquoAscending Auctions with Package Bid-dingrdquo Frontiers of Theoretical Economics2002 1(1) Article 1

Blum Yosef Roth Alvin E and Rothblum UrielG ldquoVacancy Chains and Equilibration in Se-nior-Level Labor Marketsrdquo Journal of Eco-nomic Theory 1997 76(2) pp 362ndash411

Brewer Paul J and Plott Charles R ldquoA BinaryConflict Ascending Price (Bicap) Mechanismfor the Decentralized Allocation of the Rightto Use Railroad Tracksrdquo International Jour-nal of Industrial Organization 1996 14(6)pp 857ndash86

Bulow Jeremy and Levin Jonathan ldquoMatchingand Price Competitionrdquo Stanford UniversityStanford Economics Working Paper No1818 2003

Cramton Peter Shoham Yoav and SteinbergRichard Combinatorial auctions Cam-bridge MA MIT Press (forthcoming)

Crawford Vincent P and Knoer Elsie M ldquoJobMatching with Heterogeneous Firms andWorkersrdquo Econometrica 1981 49(2) pp437ndash50

Demange Gabrielle and Gale David ldquoThe Strat-egy Structure of Two-Sided Matching Mar-ketsrdquo Econometrica 1985 53(4) pp 873ndash88

Dubins Lester and Freedman David ldquoMachia-velli and the Gale-Shapley Algorithmrdquo Na-val Research Logistics Quarterly 198188(7) pp 485ndash94

Echenique Federico and Oviedo Jorge ldquoCoreMany-to-One Matchings by Fixed-PointMethodsrdquo Journal of Economic Theory2004 115(2) pp 358ndash76

Fleiner Tamas ldquoA Fixed-Point Approach toStable Matchings and Some ApplicationsrdquoMathematics of Operations Research 200328(1) pp 103ndash26

Gale David and Shapley Lloyd ldquoCollege Ad-missions and the Stability of MarriagerdquoAmerican Mathematical Monthly 196269(1) pp 9ndash15

Gul Faruk and Stacchetti Ennio ldquoWalrasianEquilibrium with Gross Substitutesrdquo Journalof Economic Theory 1999 87(1) pp 95ndash124

Kelso Alexander and Crawford Vincent P ldquoJobMatching Coalition Formation and GrossSubstitutesrdquo Econometrica 1982 50(6) pp1483ndash504

Lehmann Benny Lehmann Daniel and NisanNoam ldquoCombinatorial Auctions with De-

934 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

creasing Marginal Utilityrdquo Games and Eco-nomic Behavior 2005 (forthcoming)

Lien Yuan-Chuan and Yan Jun ldquoOn the GrossSubstitutes Conditionrdquo Unpublished Paper2003 httpwwwstamfordeduyclienTerm_Paper_Lien_Yanpdf

Martınez Ruth Masso Jordi Neme Alejandroand Oviedo Jorge ldquoSingle Agents and the Setof Many-to-One Stable Matchingsrdquo Journalof Economic Theory 2000 91(1) pp 91ndash105

Milgrom Paul R Putting auction theory towork Cambridge Cambridge UniversityPress 2004

Milgrom Paul R ldquoPutting Auction Theory toWork The Simultaneous Ascending Auc-tionrdquo Journal of Political Economy 2000108(2) pp 245ndash72

Porter David Rassenti Stephen RoopnarineAnil and Smith Vernon ldquoCombinatorial Auc-tion Designrdquo Proceedings of the NationalAcademy of Sciences 2003 100(19) pp11153ndash57

Reijnierse Hans van Gellekom Anita and PottersJos A M ldquoVerifying Gross SubstitutabilityrdquoEconomic Theory 2002 20(4) pp 767ndash76

Roth Alvin E ldquoThe Economics of Matching Sta-bility and Incentivesrdquo Mathematics of Opera-tions Research 1982 7(4) pp 617ndash28

Roth Alvin E ldquoStability and Polarization ofInterests in Job Matchingrdquo Econometrica1984 52(1) pp 47ndash57

Roth Alvin E ldquoThe College Admissions Prob-lem Is Not Equivalent to the Marriage Prob-lemrdquo Journal of Economic Theory 1985a36(2) pp 277ndash88

Roth Alvin E ldquoConflict and Coincidence ofInterest in Job Matching Some New Resultsand Open Questionsrdquo Mathematics of Oper-ations Research 1985b 10(3) pp 379ndash89

Roth Alvin E ldquoOn the Allocation of Residentsto Rural Hospitals A General Property ofTwo-Sided Matching Marketsrdquo Economet-rica 1986 54(2) pp 425ndash27

Roth Alvin E ldquoA Natural Experiment in theOrganization of Entry-Level Labor MarketsRegional Markets for New Physicians andSurgeons in the United Kingdomrdquo AmericanEconomic Review 1991 81(3) pp 415ndash40

Roth Alvin E and Peranson Elliott ldquoThe Rede-sign of the Matching Market for AmericanPhysicians Some Engineering Aspects ofEconomic Designrdquo American Economic Re-view 1999 89(4) pp 748ndash80

Roth Alvin E and Sotomayor Marilda Two-sided matching A study in game-theoreticmodeling and analysis Cambridge Cam-bridge University Press 1990

Sen Amartya Collective choice and social wel-fare San Francisco Holden-Day Inc 1970

Shapley Lloyd ldquoComplements and Substitutesin the Optimal Assignment Problemrdquo NavalResearch Logistics Quarterly 1962 9(1) pp45ndash48

935VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

Page 8: Matching with Contracts - Stanford Universityweb.stanford.edu/~milgrom/publishedarticles/Matching with... · 2005. 10. 22. · Gale-Shapley matching algorithm. Hence, the Gale-Shapley

follows that the doctors unanimously weaklyprefer CD(X D) to CD(XD) to CD(X D) and simi-larly that the hospitals unanimously preferCH(X H) to CH(XH) to CH(X H) Notice byTheorem 1 that CD(X D) CH(X H) X D X H and CD(X D) CH(X H) X D X H sowe have the following welfare conclusion

THEOREM 4 Suppose contracts are substi-tutes for the hospitals Then the stable set ofcontracts X D X H is the unanimously mostpreferred stable set for the doctors and theunanimously least preferred stable set for thehospitals Similarly the stable set X D X H isthe unanimously most preferred stable set forthe hospitals and the unanimously least pre-ferred stable set for the doctors

Theorems 3 and 4 duplicate and extend fa-miliar conclusions about stable matches in theGale-Shapley matching problem and a similarconclusion about equilibrium prices in theKelso-Crawford labor market model Thesenew theorems encompass both these older mod-els and additional ones with general contractterms

To see how the Gale-Shapley algorithm isencompassed consider the doctor-offering al-gorithm As in the original formulation we sup-pose that hospitals have a ranking of doctorsthat is independent of the other doctors they willhire so hospital h just chooses its nh mostpreferred doctors (from among those who areacceptable and have proposed to hospital h)

Let XH(t) be the cumulative set of contractsoffered by the doctors to the hospitals throughiteration t and let XD(t) be the set of contractsthat have not yet been rejected by the hospitalsthrough iteration t Then the contracts ldquoheldrdquo atthe end of the iteration are precisely those thathave been offered but not rejected which arethose in XD(t) XH(t) The process initiateswith no offers having been made or rejected soXD(0) X and XH(0) A

Iterated applications of the operator F de-scribed above define a monotonic process inwhich the set of doctors makes an ever-larger(accumulated) set of offers and the set of unre-jected offers grows smaller round by roundUsing the specification of F and starting fromthe extreme point (X A) we have

(9) XD t X RH XH t 1

XH t X RD XD t

After offers have been made in iteration t 1the hospitalrsquos cumulative set of offers is XH(t 1) Each hospital h holds onto the nh best offersit has received at any iteration provided thatmany acceptable offers have been made other-wise it holds all acceptable offers that havebeen made Thus the accumulated set of re-jected offers is RH(XH(t 1)) and the unre-jected offers are those in X RH(XH(t 1)) XD(t) At round t if a doctorrsquos contract is beingheld then the last offer the doctor made was itsbest contract in XD(t) If a doctorrsquos last offerwas rejected then its new offer is its best con-tract in XD(t) The contracts that doctors havenot offered at this round or any earlier one aretherefore those in RD(XD(t)) So the accumu-lated set of offers doctors have made are thosein X RD(XD(t)) XH(t) Once a fixed point ofthis process is found we have by Theorem 1 astable set of contracts XH(t) XD(t)

To illustrate the algorithm consider a simpleexample with two doctors and two hospitalswhere X D H and agents have the follow-ing preferences

(10) Pd1 h1 h2

Ph1 d1 d2 A

Pd2 h1 h2

Ph2 d1 d2 d1 d2 A

The algorithm is initialized with XD(0) X (d1 h1) (d1 h2) (d2 h1) (d2 h2) andXH(0) A Table 1 applies the operator givenin (9) to illustrate the algorithm

For t 1 starting from XD(1) X bothdoctors choose to work for the hospital h1 sothey reject their contracts with hospital h2 thusRD(XD(1)) (d1 h2) (d2 h2) Next XH(1) iscalculated as the complement of RD(XD(1)) soXH(1) (d1 h1) (d2 h1) From XH(1) thehospitals choose (d1 h1) and reject (d2 h1)completing the row for t 1

920 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

For t 2 we first compute XD(2) as thecomplement of RH(XH(1)) The doctors choose(d1 h1) (d2 h2) so they reject (d1 h2) Thehospitals must then choose from the comple-ment XH(2) X (d1 h2) The hospitalschoose (d1 h1) and (d2 h2) and reject (d2 h1) Inthe third round XD(3) XD(2) and the processhas reached a fixed point

The example illustrates the monotonicity ofthe algorithm XH(t) grows larger step by stepwhile XD(t) grows smaller At termination of thealgorithm the intersection of the choice sets isthe stable set of contracts XH(3) XD(3) (d1 h1) (d2 h2) Moreover when XD(t) andXH(t) are interpreted as suggested above theprocess XD(t) XH(t) described by (9) with theinitial conditions XD(0) X and XH(0) Acoincides with the doctor-offering Gale-Shapley algorithm

For the hospital-offering algorithm a similaranalysis applies but with a different interpreta-tion of the sets and a different initial conditionLet XD(t) be the cumulative set of contractsoffered by the hospitals to the doctors beforeiteration t and let XH(t) be the set of contractsthat have not yet been rejected by the hospitalsup to and including iteration t Then the con-tracts ldquoheldrdquo at the end of iteration t are pre-cisely those that have been offered but notrejected which are those in XD(t 13 1) XH(t)With this interpretation the analysis is identicalto the one above The Gale-Shapley hospitaloffering algorithm is characterized by (9) andthe initial conditions XD(0) A and XH(0) X

The same logic applies to the Kelso-Crawfordmodel provided one extends their original treat-ment to include a version in which the workersmake offers in addition to the treatment inwhich firms make offers The words of thepreceding paragraphs apply exactly but a con-tract offer now includes a wage so for exam-ple a hospital whose contract offer is rejected

by a doctor may find that its next most preferredcontract to the same doctor is at a higher wage

B When Contracts Are Not Substitutes

It is clear from the preceding analysis thatthat definition of substitutes is just sufficient toallow our mathematical tools to be applied Inthis section we establish more We show thatunless contracts are substitutes for every hospi-tal the very existence of a stable set of contractscannot be guaranteed7

THEOREM 5 Suppose H contains at least twohospitals which we denote by h and h Furthersuppose that Rh is not isotone that is contractsare not substitutes for h Then there exist pref-erence orderings for the doctors in set D apreference ordering for a hospital h with asingle job opening such that regardless of thepreferences of the other hospitals no stable setof contracts exists

Together Theorems 3 and 5 characterize theset of preferences that can be allowed as inputsinto a matching algorithm if we wish to guar-antee that the outcome of the algorithm is astable set of contracts with respect to the re-ported preferences According to Theorem 3we can allow all preferences that satisfy substi-tutes and still reach an outcome that is a stablecollection of contracts According to Theorem5 if we allow any preference that does notsatisfy the substitutes condition then there issome profile of singleton preferences for theother parties such that no stable collection ofcontracts exists

7 Kelso and Crawford (1982) provide a particular exam-ple in which preferences do not satisfy substitutes and theredoes not exist a stable allocation

TABLE 1mdashILLUSTRATION OF THE ALGORITHM

XD(t) RD(XD(t)) XH(t) RH(XH(t))t 0 X (d1 h2) (d2 h2) A At 1 X (d1 h2) (d2 h2) (d1 h1) (d2 h1) (d2 h1)t 2 (d1 h1) (d1 h2) (d2 h2) (d1 h2) (d1 h1) (d2 h1) (d2 h2) (d2 h1)t 3 (d1 h1) (d1 h2) (d2 h2) (d1 h2) (d1 h1) (d2 h1) (d2 h2) (d2 h1)

921VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

This theory also reaffirms and extends theclose connection between the substitutes condi-tion and other concepts that has been estab-lished in the recent auctions literature withquasi-linear preferences Milgrom (2000) stud-ies an auction model with discrete goods inwhich the set of possible bidder values is re-quired to include all the additive functions8 Heshows that if goods are substitutes then a com-petitive equilibrium exists If however thereare at least three bidders and if there is anyallowed value such that the goods are not allsubstitutes then there is some profile of valuessuch that no competitive equilibrium existsFaruk Gul and Ennio Stacchetti (1999) establishthe same positive existence result They alsoshow that if preferences include all values inwhich a bidder wants only one particular goodas well as any one for which goods are not allsubstitutes and if the number of bidders issufficiently large then there is some profile ofpreferences for which no competitive equilib-rium exists Ausubel and Milgrom (2002) estab-lish that if (a) there is some bidder for whompreferences are not demand theory substitutes(b) values may be any additive function and (c)there are at least three bidders in total thenthere is some profile of preferences such that theVickrey outcome is not stable and the coreimputations do not form a lattice Conversely ifall bidders have preferences that are demandtheory substitutes then the Vickrey outcome isin the core and the core imputations do form alattice Taken together these results establish aclose connection between the substitutes condi-tion the cooperative concept of the core thenoncooperative concepts of Vickrey outcomesand competitive equilibrium

C ldquoVacancy Chainrdquo Dynamics

Suppose that a labor market has reached equi-librium with all interested doctors placed

at hospitals in a stable match Then suppose onedoctor retires Imagine a process in which ahospital seeks to replace its retired doctor byraiding other hospitals to hire additional doc-tors If the hospital makes an offer that wouldsucceed in hiring a doctor away from anotherhospital the affected hospital has three optionsit may make an offer to another doctor (orseveral) improve the terms for its current doc-tor or leave the position vacant Suppose itmakes whatever contract offer would best serveits purposes

In models with a fixed number of positionsand no contracts this process in which doctorsand vacancies move from one hospital to an-other has been called vacancy chain dynamics(Blum et al 1997) Kelso and Crawford (1982)consider similar dynamics in the context of theirmodel

The formal results for our extended model aresimilar to those of the older theories Startingwith a stable collection of contracts X let XHbe the set of contracts that some doctor weaklyprefers to her current contract in X and letXD X (X XH) As in the proof ofTheorem 1 we have F(XD XH) (XD XH) andX XD XH

To study the dynamic adjustment that resultsfrom the retirement of doctor d we suppose theprocess starts from the initial state (XD(0)XH(0)) (XD XH) This means that the employ-ees start by considering only offers that are atleast as good as their current positions and thathospitals remember which employees have re-jected them in the past The doctorsrsquo rejectionfunction is changed by the retirement of doctord to RD where RD(X) RD(X) x XxD d that is in addition to the old rejec-tions all contract offers addressed to the retireddoctor are rejected

To synchronize the timing with our earliernotation let us imagine that hospitals makeoffers at round t 1 and doctors accept or rejectthem at round t Hospitals consider as poten-tially available the doctors in XH(t 1) X RD(XD(t 1)) and the doctors then reject all butthe best offers so the cumulative set of offersreceived is XD(t) X RH(XH(t 1)) Define

(11) FXD XH X RHXH X RDXD

8 A valuation function is additive if the value of any setof items is the sum of the separate values of the elementsSuch a function v is also described as ldquomodularrdquo Additivityis equivalent to the requirement that for all sets A and Bv(A B) 13 v(A B) v(A) 13 v(B)

922 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

If contracts are substitutes for the hospitalsthen F is isotone and since F(XD XH) (XDXH) it follows that F(XD XH) (XD XH)Then since (XD(0) XH(0)) (XD XH) we have(XD(1) XH(1)) F(XD(0) XH(0)) (XD(0)XH(0)) Iterating (XD(n) XH(n)) F(XD(n 1) XH(n 1)) (XD(n 1) XH(n 1)) thedoctors accumulate offers and the contracts thatare potentially available to the hospitals shrinkA fixed point is reached and by Theorem 1 itcorresponds to a stable collection of contracts

THEOREM 6 Suppose that contracts are sub-stitutes and that (XD XH) is a stable set ofcontracts Suppose that a doctor retires and thatthe ensuing adjustment process is described by(XD(0) XH(0)) (XD XH) and (XD(t) XH(t)) F(XD(t 1) XH(t 1)) Then the sequence(XD(t) XH(t)) converges to a stable collectionof contracts at which all the unretired doctorsare weakly better off and all the hospitals areweakly worse off than at the initial state (XDXH)9

The sequence of contract offers and jobmoves described by iterated applications of Fincludes possibly complex adjustments Hospi-tals that lose a doctor may seek several replace-ments Hospitals whose doctors receive contractoffers may retain those doctors by offering bet-ter terms or may hire a different doctor and laterrehire the original doctor at a new contract Allalong the way the doctors find themselveschoosing from more and better options and thehospitals find themselves marching down theirpreference lists by offering costlier terms pay-ing higher wages or making offers to otherdoctors whom they had earlier rejected

III Law of Aggregate Demand

We now introduce a second restriction onpreferences that allows us to prove the next tworesults about the structure of the set of stablematches We call this restriction the law ofaggregate demand Roughly this law states that

as the price falls agents should demand more ofa good Here price falls correspond to morecontracts being available and more demandcorresponds to taking on (weakly) more con-tracts We formalize this intuition with the fol-lowing definition

DEFINITION The preferences of hospital h H satisfy the law of aggregate demand if for allX X Ch(X) Ch(X)

According to this definition if the set ofpossible contracts expands (analogous to a de-crease in some doctorsrsquo wages) then the totalnumber of contracts chosen by hospital h eitherrises or stays the same The corresponding prop-erty for doctor preferences is implied by re-vealed preference because each doctor choosesat most one contract Just as for the substitutescondition when wages are endogenous we in-terpret the definition as applying to the domainof wage vectors for which the hospitalrsquos opti-mum is unique

The next theorem shows the important rela-tionship between profit maximization substi-tutes and the law of aggregate demand

THEOREM 7 If hospital hrsquos preferences arequasi-linear and satisfy the substitutes condi-tion then they satisfy the law of aggregatedemand

Below we use the law of aggregate demandto characterize both necessary and sufficientconditions for the rural hospitalsrsquo property andensure that truthful revelation is a dominantstrategy for the doctors Previously in matchingmodels without money the dominant strategyresult was known only for responsive prefer-ences with capacity constraints (Abdulkadiro-glu 2003) We subsume that result with ourtheorem

A Rural Hospitals Theorem

In the match between doctors and hospitalscertain rural hospitals often had trouble fillingall their positions raising the question ofwhether there are other core matches at whichthe rural hospitals might do better Roth (1986)analyzed this question for the case of X D

9 The theorem does not claim and it is not generally truethat this new point must be the new doctor-best stable set ofcontracts

923VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

H and responsive preferences and found thatthe answer is no every hospital that has unfilledpositions at some stable match is assigned ex-actly the same doctors at every stable match Inparticular every hospital hires the same numberof doctors at every stable match

In this section we show by an example thatthis last conclusion does not generalize to thefull set of environments in which contracts aresubstitutes10 We then prove that if preferencessatisfy the law of aggregate demand and substi-tutes then the last conclusion of Rothrsquos theoremholds every hospital signs exactly the samenumber of contracts at every point in the corealthough the doctors assigned and the terms ofemployment can vary Finally we show thatany violation of the law of aggregate demandimplies that preferences exist such that theabove conclusion does not hold

Suppose that H h1 h2 and D d1 d2d3 For hospital h1 suppose its choices maxi-mize where d3 d1 d2 d1 d2 A d1 d3 d2 d3 This prefer-ence satisfies substitutes11 Suppose h2 has oneposition with its preferences given by d1 d2 d3 A Finally suppose d1 and d2prefer h1 to h2 while d3 has the reverse prefer-ence Then the matches X (h1 d3) (h2 d1)and X (h1 d1) (h1 d2) (h2 d3) are bothstable but hospital h1 employs a different num-ber of doctors and the set of doctors assigneddiffers between the two matches

This example involves a failure of the law ofaggregate demand because as the set of con-tracts available to h1 expands by the addition of(h1 d3) to the set (h1 d1) (h1 d2) the numberof doctors demanded declines from two to oneWhen the law of aggregate demand holds how-ever we have the following result

THEOREM 8 If hospital preferences satisfysubstitutes and the law of aggregate demandthen for every stable allocation (XD XH) andevery d D and h H Cd(XD) Cd(X D)

and Ch(XH) Ch(X H) That is every doctorand hospital signs the same number of contractsat every stable collection of contracts

The next theorem verifies that the counterex-amples developed above can always be gener-alized whenever any hospitalrsquos preferencesviolate the law of aggregate demand

THEOREM 9 If there exists a hospital h setsX X X such that Ch(X) Ch(X) andat least one other hospital then there existsingleton preferences for the other hospitalsand doctors such that the number of doctorsemployed by h is different for two stablematches

Theorem 9 establishes that the law of aggre-gate demand is not only a sufficient conditionfor the rural hospitals result of Theorem 8 butin a particular sense a necessary one as well

B Truthful Revelation as a DominantStrategy

The main result of this section concerns doc-torsrsquo incentives to report their preferences truth-fully For the doctor-offering algorithm ifhospital preferences satisfy the law of aggregatedemand and the substitutes condition then it isdominant strategy for doctors to reveal truth-fully their preferences over contracts12 We fur-ther show that both preference conditions playessential roles in the conclusion

We will show the positive incentive result forthe doctor-offering algorithm in two stepswhich highlight the different roles of the twopreference assumptions First we show that thesubstitutes condition by itself guarantees thatdoctors cannot benefit by exaggerating the rank-ing of an unattainable contract More preciselyif there exists a preferences list for a doctor dsuch that d obtains contract x by submitting thislist then d can also obtain x by submitting apreference list that includes only contract xSecond we will show that adding the law of

10 A similar example appears in Ruth Martınez et al(2000)

11 These preferences however do not display the ldquosingleimprovement propertyrdquo that Gul and Stacchetti (1999) in-troduce and show is characteristic of substitutes preferencesin models with quasi-linear utility

12 It is of course not a dominant strategy for hospitals totruthfully reveal nor would it be so even if we consideredthe hospital-offering algorithm For further discussion ofthis point see Roth and Sotomayor (1990)

924 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

aggregate demand guarantees that a doctor doesat least as well as reporting truthfully as byreporting any singleton Together these are thedominant strategy result

To understand why submitting unattainedcontracts cannot help a doctor d consider thefollowing Let x be the most-preferred contractthat d can obtain by submitting any preferencelist (holding all other submitted preferencesfixed) Note that all that d accomplishes whenreporting that certain contracts are preferred to xis to make it easier for some coalition to blockoutcomes involving x Thus if x is attainablewith any report it is attainable with the reportPd x that ranks x as the only acceptable con-tract This intuition is captured in the followingtheorem

THEOREM 10 Let hospitalsrsquo preferences sat-isfy the substitutes condition and let the match-ing algorithm produce the doctor-optimalmatch Fixing the preferences of hospitals andof doctors besides d let x be the outcome that dobtains by reporting preferences Pd z1 dz2 d

d zn d x Then the outcome that dobtains by reporting preferences Pd x is also x

Some other doctors may be strictly better offwhen d submits her shorter preference list thereare fewer collections of contracts that d nowobjects to so the core may become larger andthe doctor-optimal point of the enlarged coremakes all doctors weakly better off and maymake some strictly better off

Without the law of aggregate demand how-ever it may still be in a doctorrsquos interest toconceal her preferences for unattainable posi-tions To see this consider the case with twohospitals and three doctors where contracts aresimply elements of D H and let preferences be

(12) Pd1 h1 h2

Ph1 d3 d1 d2 d1 d2

Pd2 h2 h1

Ph2 d1 d2 d3

Pd3 h2 h1

With these preferences the only stable matchis (d1 h2) (d3 h1) which leaves d2 unem-ployed However if d2 were to reverse herranking of the two hospitals then (d1 h1) (d2h1) (d3 h2) would be chosen by the doctor-offering algorithm leaving d2 better off Essen-tially by offering a contract to h2 d2 haschanged the number of positions availableWhen the preferences of the hospitals satisfythe law of aggregate demand however mak-ing more offers to the hospitals (weakly) in-creases the number of contracts the hospitalsaccept

THEOREM 11 Let hospitalsrsquo preferences sat-isfy substitutes and the law of aggregate de-mand and let the matching algorithm producethe doctor-optimal match Then fixing the pref-erences of the other doctors and of all thehospitals let x be the contract that d obtains bysubmitting the set of preferences Pd z1 dz2 d

d zn d x Then the preferences Pd y1 y2 yn x yn131 yN

obtain a contract that is Pd-preferred or indif-ferent to x

According to this theorem when a doctorrsquostrue preferences are Pd the doctor can never dobetter according to these true preferences thanby reporting the preferences truthfully

In fact the law of aggregate demand is ldquoal-mostrdquo a necessary condition as well The excep-tions can arise because certain violations of thelaw of aggregate demand are unobservable fromthe choice data of the algorithm and these can-not affect incentives Thus consider an examplewhere terms t are included in the contract andwhere a hospital h has preferences (d1 ht1) (d1 h t1) (d2 h t2) (d1 h t1) (d2 h t2) Although these preferences violatethe law of aggregate demand the algorithm willnever ldquoseerdquo the violation as either (d1 h t1) d1

(d1 h t1) or (d1 h t1) d1(d1 h t1) Thus

whichever terms that d1 first offers will deter-mine a conditional set of preferences for thehospital that does satisfy the law of aggregatedemand (The hospital will never reject an offerof either (d1 h t1) or (d1 h t1))

The next theorem says that if some hospitalrsquospreferences violate the law of aggregate demandin a way that can even potentially be observed

925VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

from the hospitalrsquos choices then there existpreferences for the other agents such that it isnot a dominant strategy for doctors to reporttruthfully even when the other assumptions wehave used are satisfied

THEOREM 12 Let hospital h have prefer-ences such that Ch(X) Ch(X x) and letthere exist two contracts y z such that yD zD xD yD and y z Rh(X x) Rh(X)Then if another hospital h exists there existsingleton preferences for the hospitals besides hand preferences for the doctors such that it isnot a dominant strategy for all doctors to revealtheir preferences truthfully

Thus to the extent that the law of aggregatedemand for hospital preferences has observableconsequences for the progress of the doctor-offering algorithm it is an indispensable condi-tion to ensure the dominant strategy property fordoctors

IV Classes of Conforming Preferences

Although the class of substitutes valuations isquite limited13 it is broader than the set ofresponsive preferences in useful ways Thesubstitutes valuations accommodate all the af-firmative action and subspecialty constraints de-scribed above and allow a doctorrsquos marginalproduct to depend on which other doctors thehospital attracts

In this section we introduce a parameterizedclass of quasi-linear substitutes valuations forhospitals evaluating sets of new hires The val-uations are based on an endowed assignmentmodel according to which hospitals have a set

of jobs to fill and an existing endowment ofdoctors while doctorsrsquo productivities varyamong jobs A hospital values new doctors ac-cording to the their incremental value in theassignment problem

From a general job assignment perspectivethe key restrictions of endowed assignment val-uations are that each doctor can do one and onlyone job and that the hospitalrsquos output is the sumof outputs of its various jobs A hospital cannotuse one doctor for two jobs nor can it combinethe skills of two doctors in the same job Alsothere is no interaction in the productivity ofdoctors in different jobs Given this mathemat-ical structure if a doctor is lost it will always beoptimal for the hospital to retain all of its otherdoctors although it may choose to reassignsome of the retained doctors to fill vacatedpositions

Another way to describe the set of endowedassignment valuations VEA is to build it upfrom three properties as follows First a sin-gleton valuation is one of the form v(S) maxdSd for some nonnegative vector Sin-gleton valuations represent the possible valua-tions by a hospital with just one opening andVEA includes all singleton valuations Second ifa hospital is composed of two units j 1 2each of which has a valuation vj VEA then thehospitalrsquos maximum value from assigningworkers between its units denoted by (v1 v2)(S) maxRSv1(R) 13 v2(S R) is also inthe set We call this property closure underaggregation Third if a hospitalrsquos value is de-rived from a value in VEA by endowing thehospital with a set of doctors T then the hospi-talrsquos incremental value for extra doctorsv(ST) v(S T) v(T) is also in the set VEAWe call this property closure under endowmentFinally two valuations v1 and v2 are calledequivalent if they differ by an additive con-stant For example for any fixed set of doctorsT v( T) is equivalent to v( T)

THEOREM 13 Let VEA denote the smallestfamily of valuations of sets of doctors that in-cludes all the singleton valuations and is closedunder aggregation and endowment Then foreach v VEA there exists a set of jobs J a setof doctors T and a (D 13 T) J-matrix [ij]such that v is equivalent to the following

13 Hans Reijnierse et al (2002) (see also Yuan-ChuanLien and Jun Yan 2003) have characterized the valuationfunctions that satisfy the substitutes condition as followsLet v(S) be the hospitalrsquos value of doctor set S and letvS(T) v(S T) v(S) denote the incremental value of theset of doctors T Then doctors are substitutes if for every setS and three other doctors d1 d2 and d3 there is no uniquemaximum in vS(d1) 13 vS(d2 d3) vS(d2) 13 vS(d1 d3)vS(d3) 13 vS(d1 d2)

926 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

(13) vSJ T maxz

d S

djzdj subject to

d S

zdj 1 for j J

j J

zdj 1 for d S T0 for d S T

zdj 0 1 for all d j

Conversely for every such J T and v( J T) VEA

We dub this family of valuations the endowedassignment valuations because of the form ofoptimization (13) The family VEA is an exten-sion of the assignment valuations derived byLloyd Shapley (1962) used by Roth (19841985b) in models of matching with wages andexplicit job assignments and emphasized in astudy of package bidding by Lehmann et al(2001) The endowed assignment valuations arequite useful for applications They also fit nicelywith the theory reported in previous sections forthe following reason

THEOREM 14 Every endowed assignmentvaluation v( J T) VEA is a substitutesvaluation

To the best of our knowledge all of thesubstitutes valuations that have been used orproposed for practical applications are includedamong the endowed assignment valuations In-deed the question of whether all substitutesvaluations are endowed assignment valuationsis an open one Here we review some of themost popular valuations to show how they fitinto the class

The most commonly studied class of prefer-ences for matching problems like the Match forwhich employment terms are exogenouslyfixed are the responsive preferences Thesespecify that each hospital h has a fixed numberof openings nh a set of acceptable doctors Dh

A D and a strict ordering h of the acceptabledoctors When a doctor is unacceptable thatmeans that hiring the doctor is always worsethan leaving her position unfilled Given any setof available doctors the hospital hires its nh

most preferred acceptable doctors if that manyare available and otherwise hires all of theacceptable doctors

To map responsive preferences into the as-signment problem framework define a utilityfunction uh D3 to represent h and set theminimum acceptable utility to zero Formally(1) if d d Dh

A then d h dN uh(d) uh(d)and (2) d Dh

AN uh(d) 0 Using this utilitywe specify an assignment problem as followsJ 1 nh and dj uh(d) 13 1 and fix thewage at 1 Using a positive wage is a device toensure that the hospital strictly prefers not tohire a doctor it plans not to assign to any job Itis evident that with this valuation preferencethe hospital most prefers to hire the set of avail-able acceptable doctors with the highest rank-ing according to h

Among the extensions of responsive prefer-ences that have been most important in practiceare ones to accommodate quotas of variouskinds For example one use of quotas is tomanage subspecialties of internal medicine inwhich a certain number of positions are to befilled by doctors planning that subspecialty ifenough acceptable doctors are available Onecan reserve ms jobs for subspecialty s by pro-viding that there are ms jobs in which doctors inthat subspecialty have their productivity in-creased by a large constant M Then if msdoctors in subspecialty s are available at leastthat many will be demanded at the optimalsolution to (13) If that many qualified doctorsare not available the jobs will be filled by otherdoctors according to their productivities

Another use of quotas is for an affirmativeaction policy that absolutely reserves jobs formembers of certain target groups For each af-firmative action group G define a correspond-ing set of jobs JG and let J G JG Specifythat for any doctor d G and job j JG dj uh(d) and otherwise dj 0 One can alsointroduce an unrestricted category of jobs j thatany doctor can fill with productivity dj uh(d) This obviously ensures that a certainnumber of jobs are reserved for each targetgroup

A recent treatment of affirmative action byRoth (1991) extended by Abdulkadiroglu(2003) uses the class of responsive preferenceswith capacity constraints This class requires

927VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

that the set of doctors be partitioned into a finitenumber of affirmative action groups and that foreach group G the hospital has a capacity mG thatlimits the number of doctors who can be hiredfrom that group In addition at most nh doctorsin total can be hired

To represent such preferences using endowedassignment valuations let us specify that thereare mG jobs of type G and yenG mG jobs in totalThe hospital is endowed with nh yenG mGdoctors The endowed doctors have productivityij M in every job where M is a largenumber This ensures that at most nh new doc-tors will be hired at any optimum For thenonendowed doctors we calculate productivi-ties uh(d) in the same fashion as for the respon-sive preferences and set dj uh(d) for jobs j oftype G and dj 0 for all other jobs Thisensures that at most mG doctors will be hiredfrom group G By inspection this specificationrepresents Abdulkadiroglursquos affirmative actionpreferences

Unlike the specifications used for the currentNational Resident Matching Program algo-rithm the endowed assignment valuations per-mit overlapping affirmative action categoriesFor example suppose that a small hospital has atarget of hiring one female and one minoritydoctor In the endowed assignment structurethe hospital may assign a minority female doc-tor to fill either a minority slot or a female slotbut not both This is necessary to retain thesubstitutes demand structure for otherwisemaking a minority female doctor availablecould lead the hospital to hire a nonminoritymale doctor whom it would otherwise reject

Endowed assignment valuations thus providea flexible parameterized way for hospitals torepresent their preferences for matching with orwithout wages using a class of quasi-linear pref-erences that satisfies the substitutes conditionand the law of aggregate demand

V Cumulative Offer Processes and Auctions

The algorithms described by the system (9)with different starting points have the propertythat they can terminate only at a stable set ofcontracts Nevertheless unless preferences sat-isfy the substitutes condition the system is notguaranteed to converge at all even when a fixed

point exists In this section we offer a differentcharacterization of the Gale-Shapley doctor-offering algorithm that will prove especiallywell suited to situations in which contracts maynot be substitutes but in which there is just oneldquohospitalrdquo the auctioneer For now we allowthe possibility that there are several hospitals

The alternative representation is constructedby replacing the system of equations (9) by thefollowing system

(14) XD t X RH XH t 1

XH t XH t 1 CD XD t

We call the algorithm that begins with XD(0) X and XH(0) A and obeys (14) a cumulativeoffer process because the formalism capturesthe idea that hospitals accumulate offers fromdoctors in the set XH(t) and hold their bestchoices CH(XH(t)) from the accumulated setThere is no assumption of consistency imposedon the algorithm so it is possible that severalhospitals are ldquoholdingrdquo contract offers from thesame doctor The corresponding allocation is ofcourse infeasible since each doctor can ulti-mately accept just one contract

At each round t of the cumulative offer pro-cess all doctors make their best offers from theset of not-yet-rejected choices XD(t) but anydoctor d for whom a contract is being heldsimply repeats one of its earlier offers Thusnew offers are made only by doctors who havebeen rejected

To see why this is so let x CH(XH(t)) be acontract that is being held and consider thecorresponding doctor xD d By revealed pref-erence doctor d strictly prefers x to any contractthat she has not yet offered since those con-tracts were available to offer at the time that xwas offered Since drsquos most preferred contractin Xd(t) at the current time must be weaklypreferred to x it must be coincide with one ofdrsquos earlier offers

The second equation of system (14) is the onethat distinguishes the cumulative offer processfrom the system in (9) In the cumulative offerprocess without any assumptions about hospi-talsrsquo preferences XH(t) grows monotonicallyfrom round to round so the sequence of setsconverges In contrast the earlier process was

928 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

guaranteed to converge only when contracts aresubstitutes for the hospitals

When contracts are substitutes the two sys-tems of equations are equivalent

THEOREM 15 Suppose that contracts aresubstitutes for the hospitals and that XD(0) Xand XH(0) A Then the sequences of pairs(XD(t) XH(t)) generated by the two laws ofmotion (9) and (14) are identical

Even with the initial condition XD(0) X andXH(0) A the algorithms described by (9) and(14) may differ when contracts are not substi-tutes In that case by inspection of the system(14) the cumulative offer process still con-verges because XH(t) is bounded by the finiteset X and grows monotonically from round toround What is at issue is whether the hospitalrsquoschoice from its final search set in the cumulativeoffer process is a feasible and stable set ofcontracts

We will find below that when there is a singlehospital the outcome is indeed a feasible andstable set of contracts In that case the cumu-lative offer process coincides with the general-ized proxy auction of Ausubel and Milgrom(2002) Those authors analyze in detail the casewhen a bid consists of a price and a subset of theset of goods that the bidder wishes to buy Ateach round the seller ldquoholdsrdquo the collection ofbids that maximizes its total revenues subject tothe constraint that each good can be sold onlyonce The generalized proxy auction howeveris not limited to the sale of goods and in fact isidentical in scope to our present model ofmatching with contracts In particular the auc-tioneer may impose a variety of constraints onthe feasible collections of bids and may weighnonprice factors either exclusively or in com-bination with prices to decide which collectionof bids to hold Bidders for their part maymake bids that include factors besides price andmay not include price at all

To illustrate the role of general contracts inthis auction setting consider the auction designsuggested by Paul Brewer and Charles Plott(1996) in which bidders seek to buy access to arailroad track In that application a bid specifiesa trainrsquos direction of travel departure and ar-rival times and price offered It is assumed that

trains travel at a uniform speed along the trackIn this setting the contract terms must includethe direction and the two times and the seller isconstrained to hold only combinations of bidssuch that trains maintain safe distances fromone another at all times

A second example of the generalized proxyprocess is a procurement auction in which thebuyer scores suppliers on the basis of suchfactors as quality excess capacity credit ratingand historical reliability as well as price and inwhich the buyer prefers to set aside someamount of its purchase for minority contractorsor to maintain geographic diversity of supply toreduce the chance of supply disruptions In anasset sale the seller may weigh the probabilitythat the sale will be completed for example dueto financing contingencies or because a union orantitrust regulators must approve the sale

The cumulative offer process model withgeneral contracts accommodates all of thesepossibilities The auctioneer in the model cor-responds to a single ldquohospitalrdquomdashhereafter theauctioneermdashwith a choice function CH thatselects her most preferred collection of contractproposals We have the following result (whichis first stated using different notation than in theAusubel-Milgrom paper)

THEOREM 16 When the doctor-offering cu-mulative offer process with a single hospitalterminates at time t with outcome (XD(t) XH(t))the hospitalrsquos choice CH(XH(t)) is a stable col-lection of contracts

Cumulative offer processes connect the the-ory of matching with contracts to the emergingtheory of package auctions and auctions withcomplex constraints

VI Conclusion

We have introduced a general model ofmatching with bilateral contracts that encom-passes and extends two-sided matching modelswith and without money and certain auctionmodels The new formulation allows some con-tract terms to be exogenously fixed and others tobe endogenous in any combinations In thisvery general framework we characterize stable

929VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

collections of contracts in terms of the solutionto a certain system of equations

The key to the analysis is to extend twoconcepts of demand theory to models with orwithout prices The first concept to be extendedis the notion of substitutes Our definition ap-plies essentially the Roth-Sotomayor substitut-able preferences condition to a more generalclass of contracts contracts are substitutes ifwhenever the set of feasible bilateral contractsexpands the set of contracts that the firm rejectsalso expands We show that (a) our definitioncoincides with the usual demand theory condi-tion when both apply (b) when contracts aresubstitutes a stable collection of contracts ex-ists and (c) if any hospital or firm has prefer-ences that are not substitutes then there arepreferences with single openings for each otherfirm such that no stable allocation exists Wefurther show that when the substitute conditionapplies (a) both the doctor-offering and hospi-tal-offering Gale-Shapley algorithms can berepresented as iterated operations of the sameoperator (starting from different initial condi-tions) and (b) starting at a stable allocationfrom which a doctor retires a natural marketdynamic mimics the Gale-Shapley process tofind a new stable allocation

The second relevant demand theory conceptis the law of demand which we extend both toinclude heterogeneous inputs and to encompassmodels with or without prices The law of ag-gregate demand condition holds that when theset of feasible contracts expands the number ofcontracts that the firm chooses to sign weaklyincreases In terms of traditional demand theorythis means that for example when the wages ofsome of a heterogeneous group of workers fallsif the workers are substitutes then the totalnumber of workers employed rises We showthat (a) when inputs are substitutes the choicesof a profit-maximizing firmhospital satisfy thelaw of aggregate demand Moreover when thechoices of every hospitalfirm satisfy the law ofaggregate demand and the substitutes conditionthen (b) the set of workersdoctors employed isthe same at every stable allocation (c) the num-ber employed by each firmhospital is also thesame and (d) truthful reporting is a dominantstrategy for doctors in the doctor-offering algo-rithm Moreover we prove (e) that if the law of

aggregate demand fails in any potentially ob-servable way then the preceding dominantstrategy property does not hold

For these results to be useful for practicalmechanism design one needs to account forhow preferences especially hospital prefer-ences are to be reported to the mechanismThere needs to be a convenient way for hospi-tals to express a rich array of preferences andone needs to know whether the preferences be-ing reported actually satisfy the conditions ofthe various theorems Toward that end we in-troduce a parametric form that we call extendedassignment valuations which strictly general-izes several existing specifications and whichalways satisfies both the substitutes and law ofaggregate demand conditions

Finally we introduce an alternative treatmentof the doctor-offering algorithm the cumulativeoffer process We show that when contracts aresubstitutes the previously characterized doctor-offering algorithm coincides exactly with a cu-mulative offer process When contracts are notsubstitutes but there is just one hospital (theldquoauctioneerrdquo) the cumulative offer process co-incides with the Ausubel-Milgrom ascendingproxy auction This identity clarifies the con-nection between these algorithms and com-bined with the dominant strategy theoremreported above generalizes the Ausubel-Milgromdominant strategy theorem for the proxyauctions

Our new approach reveals deep similaritiesamong several of the most successful auctionand matching designs in current use and amongthe environmental conditions in which theoret-ically the mechanisms should perform at theirbest Understanding these similarities can helpus to understand the limitations of these mech-anisms paving the way for new designs

APPENDIX

PROOF OF THEOREM 1Let (XD XH) X2 be a solution to (3) Then

XD XH XD RD(XD) CD(XD) andsimilarly XH XD XH RH(XH) CH(XH)so XH XD CH(XH) CD(XD)

Next we show that X XH XD is a stableset of contracts Since X CH(XH) CD(XD)it follows by revealed preference that X

930 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

CH(X) CD(X) so condition (i) of the defi-nition of stability is satisfied

Consider any hospital h and set of contractsX CD(X X) naming hospital h Since X CD(XD) revealed preference of the doctorsimplies that X XD CD(XD) and hence thatX RD(XD) X XD RD(XD) CD(XD) RD(XD) A Thus X X RD(XD) XHby (3) So if X Ch(X) then by the revealedpreference of hospital h X h Ch(XH) Ch(X) Hence X Ch(X X) so condition(ii) is satisfied So the set of contracts X isunblocked

For the converse suppose that X is a stablecollection of contracts Then CD(X) X LetXH be the set of contracts that the doctorsweakly prefer to X and XD the set of contractsthat doctors weakly disprefer By constructionX XH X XD X is a partition of X

To obtain (3) observe first that if there issome h such that Ch(XH) Xh then X Ch(XH) violates stability condition (ii) SoCh(XH) Xh for all h that is CH(XH) X Itfollows that X RH(XH) X (XH X) X (X XD) XD and that X RD(XD) X (XD CD(XD)) X (XD X) XH

Hence (XD XH) satisfies (3) and XH XD X

PROOF OF THEOREM 2Let i j ( j wj) C(w) and wi wi Define

Z(w) ( j wj)wj wj Then Z(wi wi) Z(w) If contracts are substitutes then R(Z(wiwi)) R(Z(w)) By (6) since ( j wj) C(w)it follows that ( j wj) C(Z(w)) so ( j wj) R(Z(w)) Hence ( j wj) R(Z(wi wi)) So ( jwj) Z(wi wi) R(Z(wi wi)) C(Z(wiwi)) and thus (j wj) C(wi wi) by assumption(6) Thus C satisfies demand theory substitutes

Conversely suppose contracts are not substi-tutes Then there exists a set X an element (iwi) X and ( j wj) R(X) such that ( j wj) R(X) where X X (i wi) Using (6)wi Wi(X) Let w W(X) and wi Wi(X)Then wi wi and ( j wj) C(w) but ( j wj) C(wi wi) so C does not satisfy the demandtheory substitutes condition

PROOF OF THEOREM 5We may limit attention to the case with

exactly two hospitals by specifying that

the doctors find the other hospitals to beunacceptable

Suppose Rh is not isotone Then there existssome x y X and X X such that for all x X xH h and such that x Rh(X) Rh(X y) By construction since x y Ch(X y) contracts x and y specify different doctorssay d1 xD yD d2 Let x and y denote thecorresponding contracts for doctors d1 and d2 inwhich hospital h is substituted for h

We specify preferences as follows first forhospital h we take x h y h A and allother contracts are unacceptable Second doc-tors in xD(CH(X) CH(X y)) d1 d2prefer their elements of CH(X) CH(X y)to any other contract Third d1 has x d1

x and ranks all other contracts lower Fourthd2 has y d2

y and ranks all other con-tracts lower Finally the remaining doctors findall contracts from hospitals h and h to beunacceptable

Consider a feasible acceptable allocation Xsuch that y X Since h and d2 can have onlyone contract in X x y X Then hrsquos con-tracts in X form a subset of X so x is notincluded and d1 has a contract less preferredthan x Then the deviation by (d1 h) to xblocks X

Consider a feasible acceptable allocation Xsuch that y X Then either x y X or Xis blocked by a coalition including h d1 and d2using the contracts x and y However if x y X then a deviation by (d2 h) to contract yblocks X

Since all feasible allocations are blockedthere exists no stable set of contracts

PROOF OF THEOREM 7Suppose X D H W and let Z(w) ( j

wj)wj wj Then the law of aggregate de-mand is the statement that for any wage vectorsw w satisfying w w such that the choices setsare singletons C(Z(w)) C(Z(w)) The proofis by contradiction Suppose the law of aggre-gate demand does not hold Then there exists awage vector w and a doctor d such that for some(and hence all) 0 C(Z(wd 13 wd)) C(Z(wd wd)) Since hrsquos preferences arequasi-linear changing doctor drsquos wage can af-fect the hiring of other doctors only if it affectsthe hiring of doctor d It follows that there are

931VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

exactly two optimal choices for the hospital atwage vector w these are C(Z(wd wd)) atwhich doctor d is hired and C(Z(wd 13 wd))at which d is not hired but such that two otherdoctors are hired that is there exist doctors dd C(Z(wd 13 wd)) C(Z(wd wd))Let the corresponding payoff for the hospital(when faced with wage vector w) be

Consider the wage vector w (wd wd 2 wdd) For positive and suffi-ciently small the hospitalrsquos payoff at wage vec-tor w is 13 2 if it chooses C(Z(wd 13 wd))and it is 13 if it chooses C(Z(wd wd))and one of these choices must be optimal SoC(w) C(Z(wd 13 wd)) But then raisingthe wage of doctor d from wd 2 to wd whileholding the other wages at wd reduces the de-mand for doctor d from one to zero in violationof the demand theory substitutes condition

PROOF OF THEOREM 8By definition XD X D so by revealed pref-

erence Cd(X D) Cd(XD) Also X H XH soby the law of aggregate demand Ch(X H) Ch(XH) By Theorem 1 CD(XD) CH(XH)and CD(X D) CH(X H) so yendD Cd(XD) yenhH Ch(XH) and yendD Cd(XD) yenhH Ch(XH)Combining these leads to yendD Cd(X D) yendD Cd(XD) yenhH Ch(XH) yenhH Ch(XH) yendD Cd(XD) which begins and ends with the samesum Hence none of the inequalities can bestrict

PROOF OF THEOREM 9Since Ch(X) Ch(X) there exists some

set Y X Y X and contract x such thatCh(Y) Ch(Y x) Since x Ch(Y x)(as otherwise Ch(Y) Ch(Y x) for thepreferences to be rationalizable) there must ex-ist two contracts y z Rh(Y x) Rh(Y)such that y x z y Moreover since y z Ch(Y) yD zD

Denoting by h the second hospital whose exis-tence is hypothesized by the theorem we specifypreferences as follows Let all the doctors with con-tracts in Y have those contracts be their most favoredand let all other doctors find any contract with hunacceptable Let all doctors find any contract notinvolving hospital h or h to be unacceptable

In principle there are three casesIf xD yD then let PxD

y x and PzD z

Then there exist two stable matches Ch(Y x) and Ch(Y) with zD employed in the firstmatch but not in the second

The case xD zD is symmetricFinally if yD xD zD then let x y z

denote contracts with hospital h where the doc-tors (and any other terms) are the same as in xy z respectively Specify the remaining prefer-ences by PxD

x x PyD y y PzD

z z and Ph y x A z Thenthere exist two different stable matches x Ch(Y) and y Ch(Y x) with zD em-ployed in the first match but not in the second

PROOF OF THEOREM 10Let X denote the collection of contracts cho-

sen by the algorithm when doctor d submitspreference Pd If this collection which is stableunder the reported preferences is not stableunder Pd then there exists a blocking coalitionThis blocking coalition must contain d as noother doctorrsquos preferences have changed butthat is impossible since x is drsquos favorite con-tract according to the preferences Pd Since X isstable under Pd the doctor-optimal stable matchunder Pd (the existence of which is guaranteedby Theorem 2) must make every doctor(weakly) better off than at X In particulardoctor d must obtain x

PROOF OF THEOREM 11From Theorem 10 Pd x also obtains x

Hence by the rural hospitals theorem d is em-ployed at every point in the core when Pd x issubmitted So every allocation X at which d isunemployed is blocked by some coalition andset of contracts when d submits Pd Conse-quently if d submits the preferences Pd y1 y2 yn x then every allocation at whichd is unemployed is still blocked by the samecoalition and set of contracts Since the doctor-best stable allocation is one at which d gets aPd-acceptable contract that allocation is weaklyPd-preferred to x Finally the doctor-optimalmatch when Pd is submitted is still the doctor-optimal match when Pd is submitted as drsquospreferences over contracts less preferred than xcannot be used to block a match where shereceives a contract weakly preferred to x

932 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

PROOF OF THEOREM 12Consider contracts x y and z such that

xD xD yD yD zD zD and xH yH zH h Let the preferences of the three identified bePxD

x x PyD y y and PzD

z z andlet those of h be Ph y z x Forthe other contracts x Y Ch(X) let x be xDrsquosmost favored contract For the remaining doctorslet any contract with h or h be unacceptable

With the preceding preferences the only sta-ble allocation includes contracts x and y leav-ing doctor zD unemployed If however zDmisrepresents her preferences and reports PzD

z z then the doctor-optimal stable matchincludes z leaving doctor zD better off

PROOF OF THEOREM 13Setting J 1 and T A it is clear by

inspection that this family includes all singletonvaluations

The family is closed under endowment be-cause given any such valuation v( J T)endowing a set of doctors T simply creates thevaluation v( J T T))

To verify that the family is closed underaggregation consider any two valuations v( J T) and v( J T) Since J and T are justindex sets we may assume without loss ofgenerality that T T J J A DefineT T T and J J J Let

(15) ij ij if i D T j Jij if i D T j J0 otherwise

By inspection of the optimization problems v( J T) v( J T) v( J T)

For the converse consider the valuation v( J T) given by (13) We derive it construc-tively from the singleton valuations aggrega-tion and endowment as follows Let vj be thesingleton valuation associated with row j inmatrix [ij] for j 1 J Since VEA isclosed under aggregation v1 vJ v( J A) VEA Since VEA is also closed underendowment we may endow the doctors in T toobtain v( J T) VEA

PROOF OF THEOREM 14L Shapley (1962) (see also Lehmann et al

2001) had already proved that every assignment

valuation without endowments v( J A) is asubstitutes valuation Ausubel and Milgrom(2002) prove that a valuation v is a substitutesvaluation if and only if the corresponding indi-rect profit function ((p) v(S) yendS pd) issubmodular Let be the indirect profit func-tion corresponding to v( J A) Then theindirect profit function corresponding to v( J T) is (p1 pN) (p1 pN 0 0)Since is the profit function of the substitutesvaluation vh it is submodular and hence issubmodular as well

PROOF OF THEOREM 15Suppose that contracts are substitutes for the

hospitals We proceed by induction The initialcondition specifies that the sequences are iden-tical through time t 0 Denote the sequencecorresponding to the cumulative offer processby a superscript C and denote the alternativeprocess defined by (9) with no superscript As-sume the inductive hypothesis that the se-quences are the same up to round t 1 andsuppress the corresponding superscripts for thevalues at that round Then XD(t) X RH(XH(t 1)) XD

C(t) This also implies that

(16) X XH t 1 XD t

To complete the proof we must show thatXH

C(t) XH(t) or equivalently that XH(t 1) CD(XD(t)) X RD(XD(t))

For t 2 XHC(t 2) XH

C(t 1) by con-struction so by the inductive hypothesis XH(t 2) XH(t 1) Since contracts are substitutesRH is isotone so X RH(XH(t 1)) X RH(XH(t 2)) and hence XD(t) XD(t 1)For t 1 the inclusion XD(t) XD(t 1) isimplied by the initial condition XD(0) X

Recall that by revealed preference RD isisotone It follows that RD(XD(t)) RD(XD(t 1)) and hence using (9) that XH(t 1) X RD(XD(t 1)) X RD(XD(t)) XH(t) ThusXH(t 1) XH(t 1) (X RD(XD(t))) XH(t 1) RD(XD(t)) So XH(t 1) CD(XD(t)) XH(t 1) (XD(t) RD(XD(t))) (XH(t 1) RD(XD(t))) (XD(t) RD(XD(t))) (XH(t 1) XD(t)) RD(XD(t)) X RD(XD(t)) where the last stepequality follows from (16)

933VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

PROOF OF THEOREM 16By construction any contract not in XH(t) is

less preferred by some doctor d than everycorresponding contract in XH(t) (because doctord offers her most preferred contracts in se-quence) So any collection of contracts thatincludes some not in XH(t) must be strictly lesspreferred by one of the doctors Any profitablecoalitional deviation must use only contracts inXH(t)

By construction the one hospitalauctioneermust be part of any deviating coalition andCH(XH(t)) is its strictly most preferred collectionof contracts in XH(t) so there is no profitablecoalitional deviation using just contracts in XH(t)

REFERENCES

Abdulkadiroglu Atila ldquoCollege Admissionswith Affirmative Actionrdquo Unpublished Pa-per 2003

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoBoston Public School MatchingrdquoAmerican Economic Review 2005a (Papersand Proceedings) 95(2) pp 368ndash71

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoThe New York City High SchoolMatchrdquo American Economic Review 2005b(Papers and Proceedings) 95(2) pp 364ndash67

Abdulkadiroglu Atila and Sonmez TayfunldquoSchool Choice A Mechanism Design Ap-proachrdquo American Economic Review 200393(3) pp 729ndash47

Adachi Hiroyuki ldquoOn a Characterization of Sta-ble Matchingsrdquo Economics Letters 200068(1) pp 43ndash49

Alkan Ahmet and Gale David ldquoStable ScheduleMatching under Revealed Preferencerdquo Jour-nal of Economic Theory 2003 112(2) pp289ndash306

Ausubel Lawrence M Cramton Peter and Mil-grom Paul R ldquoThe Clock-Poxy Auction APractical Combinatorial Auction Designrdquo inPeter Cramton Yoav Shoham and RichardSteinberg eds Combinatorial auctionsCambridge MA MIT Press 2005 ch 5

Ausubel Lawrence M and Milgrom Paul RldquoAscending Auctions with Package Bid-dingrdquo Frontiers of Theoretical Economics2002 1(1) Article 1

Blum Yosef Roth Alvin E and Rothblum UrielG ldquoVacancy Chains and Equilibration in Se-nior-Level Labor Marketsrdquo Journal of Eco-nomic Theory 1997 76(2) pp 362ndash411

Brewer Paul J and Plott Charles R ldquoA BinaryConflict Ascending Price (Bicap) Mechanismfor the Decentralized Allocation of the Rightto Use Railroad Tracksrdquo International Jour-nal of Industrial Organization 1996 14(6)pp 857ndash86

Bulow Jeremy and Levin Jonathan ldquoMatchingand Price Competitionrdquo Stanford UniversityStanford Economics Working Paper No1818 2003

Cramton Peter Shoham Yoav and SteinbergRichard Combinatorial auctions Cam-bridge MA MIT Press (forthcoming)

Crawford Vincent P and Knoer Elsie M ldquoJobMatching with Heterogeneous Firms andWorkersrdquo Econometrica 1981 49(2) pp437ndash50

Demange Gabrielle and Gale David ldquoThe Strat-egy Structure of Two-Sided Matching Mar-ketsrdquo Econometrica 1985 53(4) pp 873ndash88

Dubins Lester and Freedman David ldquoMachia-velli and the Gale-Shapley Algorithmrdquo Na-val Research Logistics Quarterly 198188(7) pp 485ndash94

Echenique Federico and Oviedo Jorge ldquoCoreMany-to-One Matchings by Fixed-PointMethodsrdquo Journal of Economic Theory2004 115(2) pp 358ndash76

Fleiner Tamas ldquoA Fixed-Point Approach toStable Matchings and Some ApplicationsrdquoMathematics of Operations Research 200328(1) pp 103ndash26

Gale David and Shapley Lloyd ldquoCollege Ad-missions and the Stability of MarriagerdquoAmerican Mathematical Monthly 196269(1) pp 9ndash15

Gul Faruk and Stacchetti Ennio ldquoWalrasianEquilibrium with Gross Substitutesrdquo Journalof Economic Theory 1999 87(1) pp 95ndash124

Kelso Alexander and Crawford Vincent P ldquoJobMatching Coalition Formation and GrossSubstitutesrdquo Econometrica 1982 50(6) pp1483ndash504

Lehmann Benny Lehmann Daniel and NisanNoam ldquoCombinatorial Auctions with De-

934 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

creasing Marginal Utilityrdquo Games and Eco-nomic Behavior 2005 (forthcoming)

Lien Yuan-Chuan and Yan Jun ldquoOn the GrossSubstitutes Conditionrdquo Unpublished Paper2003 httpwwwstamfordeduyclienTerm_Paper_Lien_Yanpdf

Martınez Ruth Masso Jordi Neme Alejandroand Oviedo Jorge ldquoSingle Agents and the Setof Many-to-One Stable Matchingsrdquo Journalof Economic Theory 2000 91(1) pp 91ndash105

Milgrom Paul R Putting auction theory towork Cambridge Cambridge UniversityPress 2004

Milgrom Paul R ldquoPutting Auction Theory toWork The Simultaneous Ascending Auc-tionrdquo Journal of Political Economy 2000108(2) pp 245ndash72

Porter David Rassenti Stephen RoopnarineAnil and Smith Vernon ldquoCombinatorial Auc-tion Designrdquo Proceedings of the NationalAcademy of Sciences 2003 100(19) pp11153ndash57

Reijnierse Hans van Gellekom Anita and PottersJos A M ldquoVerifying Gross SubstitutabilityrdquoEconomic Theory 2002 20(4) pp 767ndash76

Roth Alvin E ldquoThe Economics of Matching Sta-bility and Incentivesrdquo Mathematics of Opera-tions Research 1982 7(4) pp 617ndash28

Roth Alvin E ldquoStability and Polarization ofInterests in Job Matchingrdquo Econometrica1984 52(1) pp 47ndash57

Roth Alvin E ldquoThe College Admissions Prob-lem Is Not Equivalent to the Marriage Prob-lemrdquo Journal of Economic Theory 1985a36(2) pp 277ndash88

Roth Alvin E ldquoConflict and Coincidence ofInterest in Job Matching Some New Resultsand Open Questionsrdquo Mathematics of Oper-ations Research 1985b 10(3) pp 379ndash89

Roth Alvin E ldquoOn the Allocation of Residentsto Rural Hospitals A General Property ofTwo-Sided Matching Marketsrdquo Economet-rica 1986 54(2) pp 425ndash27

Roth Alvin E ldquoA Natural Experiment in theOrganization of Entry-Level Labor MarketsRegional Markets for New Physicians andSurgeons in the United Kingdomrdquo AmericanEconomic Review 1991 81(3) pp 415ndash40

Roth Alvin E and Peranson Elliott ldquoThe Rede-sign of the Matching Market for AmericanPhysicians Some Engineering Aspects ofEconomic Designrdquo American Economic Re-view 1999 89(4) pp 748ndash80

Roth Alvin E and Sotomayor Marilda Two-sided matching A study in game-theoreticmodeling and analysis Cambridge Cam-bridge University Press 1990

Sen Amartya Collective choice and social wel-fare San Francisco Holden-Day Inc 1970

Shapley Lloyd ldquoComplements and Substitutesin the Optimal Assignment Problemrdquo NavalResearch Logistics Quarterly 1962 9(1) pp45ndash48

935VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

Page 9: Matching with Contracts - Stanford Universityweb.stanford.edu/~milgrom/publishedarticles/Matching with... · 2005. 10. 22. · Gale-Shapley matching algorithm. Hence, the Gale-Shapley

For t 2 we first compute XD(2) as thecomplement of RH(XH(1)) The doctors choose(d1 h1) (d2 h2) so they reject (d1 h2) Thehospitals must then choose from the comple-ment XH(2) X (d1 h2) The hospitalschoose (d1 h1) and (d2 h2) and reject (d2 h1) Inthe third round XD(3) XD(2) and the processhas reached a fixed point

The example illustrates the monotonicity ofthe algorithm XH(t) grows larger step by stepwhile XD(t) grows smaller At termination of thealgorithm the intersection of the choice sets isthe stable set of contracts XH(3) XD(3) (d1 h1) (d2 h2) Moreover when XD(t) andXH(t) are interpreted as suggested above theprocess XD(t) XH(t) described by (9) with theinitial conditions XD(0) X and XH(0) Acoincides with the doctor-offering Gale-Shapley algorithm

For the hospital-offering algorithm a similaranalysis applies but with a different interpreta-tion of the sets and a different initial conditionLet XD(t) be the cumulative set of contractsoffered by the hospitals to the doctors beforeiteration t and let XH(t) be the set of contractsthat have not yet been rejected by the hospitalsup to and including iteration t Then the con-tracts ldquoheldrdquo at the end of iteration t are pre-cisely those that have been offered but notrejected which are those in XD(t 13 1) XH(t)With this interpretation the analysis is identicalto the one above The Gale-Shapley hospitaloffering algorithm is characterized by (9) andthe initial conditions XD(0) A and XH(0) X

The same logic applies to the Kelso-Crawfordmodel provided one extends their original treat-ment to include a version in which the workersmake offers in addition to the treatment inwhich firms make offers The words of thepreceding paragraphs apply exactly but a con-tract offer now includes a wage so for exam-ple a hospital whose contract offer is rejected

by a doctor may find that its next most preferredcontract to the same doctor is at a higher wage

B When Contracts Are Not Substitutes

It is clear from the preceding analysis thatthat definition of substitutes is just sufficient toallow our mathematical tools to be applied Inthis section we establish more We show thatunless contracts are substitutes for every hospi-tal the very existence of a stable set of contractscannot be guaranteed7

THEOREM 5 Suppose H contains at least twohospitals which we denote by h and h Furthersuppose that Rh is not isotone that is contractsare not substitutes for h Then there exist pref-erence orderings for the doctors in set D apreference ordering for a hospital h with asingle job opening such that regardless of thepreferences of the other hospitals no stable setof contracts exists

Together Theorems 3 and 5 characterize theset of preferences that can be allowed as inputsinto a matching algorithm if we wish to guar-antee that the outcome of the algorithm is astable set of contracts with respect to the re-ported preferences According to Theorem 3we can allow all preferences that satisfy substi-tutes and still reach an outcome that is a stablecollection of contracts According to Theorem5 if we allow any preference that does notsatisfy the substitutes condition then there issome profile of singleton preferences for theother parties such that no stable collection ofcontracts exists

7 Kelso and Crawford (1982) provide a particular exam-ple in which preferences do not satisfy substitutes and theredoes not exist a stable allocation

TABLE 1mdashILLUSTRATION OF THE ALGORITHM

XD(t) RD(XD(t)) XH(t) RH(XH(t))t 0 X (d1 h2) (d2 h2) A At 1 X (d1 h2) (d2 h2) (d1 h1) (d2 h1) (d2 h1)t 2 (d1 h1) (d1 h2) (d2 h2) (d1 h2) (d1 h1) (d2 h1) (d2 h2) (d2 h1)t 3 (d1 h1) (d1 h2) (d2 h2) (d1 h2) (d1 h1) (d2 h1) (d2 h2) (d2 h1)

921VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

This theory also reaffirms and extends theclose connection between the substitutes condi-tion and other concepts that has been estab-lished in the recent auctions literature withquasi-linear preferences Milgrom (2000) stud-ies an auction model with discrete goods inwhich the set of possible bidder values is re-quired to include all the additive functions8 Heshows that if goods are substitutes then a com-petitive equilibrium exists If however thereare at least three bidders and if there is anyallowed value such that the goods are not allsubstitutes then there is some profile of valuessuch that no competitive equilibrium existsFaruk Gul and Ennio Stacchetti (1999) establishthe same positive existence result They alsoshow that if preferences include all values inwhich a bidder wants only one particular goodas well as any one for which goods are not allsubstitutes and if the number of bidders issufficiently large then there is some profile ofpreferences for which no competitive equilib-rium exists Ausubel and Milgrom (2002) estab-lish that if (a) there is some bidder for whompreferences are not demand theory substitutes(b) values may be any additive function and (c)there are at least three bidders in total thenthere is some profile of preferences such that theVickrey outcome is not stable and the coreimputations do not form a lattice Conversely ifall bidders have preferences that are demandtheory substitutes then the Vickrey outcome isin the core and the core imputations do form alattice Taken together these results establish aclose connection between the substitutes condi-tion the cooperative concept of the core thenoncooperative concepts of Vickrey outcomesand competitive equilibrium

C ldquoVacancy Chainrdquo Dynamics

Suppose that a labor market has reached equi-librium with all interested doctors placed

at hospitals in a stable match Then suppose onedoctor retires Imagine a process in which ahospital seeks to replace its retired doctor byraiding other hospitals to hire additional doc-tors If the hospital makes an offer that wouldsucceed in hiring a doctor away from anotherhospital the affected hospital has three optionsit may make an offer to another doctor (orseveral) improve the terms for its current doc-tor or leave the position vacant Suppose itmakes whatever contract offer would best serveits purposes

In models with a fixed number of positionsand no contracts this process in which doctorsand vacancies move from one hospital to an-other has been called vacancy chain dynamics(Blum et al 1997) Kelso and Crawford (1982)consider similar dynamics in the context of theirmodel

The formal results for our extended model aresimilar to those of the older theories Startingwith a stable collection of contracts X let XHbe the set of contracts that some doctor weaklyprefers to her current contract in X and letXD X (X XH) As in the proof ofTheorem 1 we have F(XD XH) (XD XH) andX XD XH

To study the dynamic adjustment that resultsfrom the retirement of doctor d we suppose theprocess starts from the initial state (XD(0)XH(0)) (XD XH) This means that the employ-ees start by considering only offers that are atleast as good as their current positions and thathospitals remember which employees have re-jected them in the past The doctorsrsquo rejectionfunction is changed by the retirement of doctord to RD where RD(X) RD(X) x XxD d that is in addition to the old rejec-tions all contract offers addressed to the retireddoctor are rejected

To synchronize the timing with our earliernotation let us imagine that hospitals makeoffers at round t 1 and doctors accept or rejectthem at round t Hospitals consider as poten-tially available the doctors in XH(t 1) X RD(XD(t 1)) and the doctors then reject all butthe best offers so the cumulative set of offersreceived is XD(t) X RH(XH(t 1)) Define

(11) FXD XH X RHXH X RDXD

8 A valuation function is additive if the value of any setof items is the sum of the separate values of the elementsSuch a function v is also described as ldquomodularrdquo Additivityis equivalent to the requirement that for all sets A and Bv(A B) 13 v(A B) v(A) 13 v(B)

922 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

If contracts are substitutes for the hospitalsthen F is isotone and since F(XD XH) (XDXH) it follows that F(XD XH) (XD XH)Then since (XD(0) XH(0)) (XD XH) we have(XD(1) XH(1)) F(XD(0) XH(0)) (XD(0)XH(0)) Iterating (XD(n) XH(n)) F(XD(n 1) XH(n 1)) (XD(n 1) XH(n 1)) thedoctors accumulate offers and the contracts thatare potentially available to the hospitals shrinkA fixed point is reached and by Theorem 1 itcorresponds to a stable collection of contracts

THEOREM 6 Suppose that contracts are sub-stitutes and that (XD XH) is a stable set ofcontracts Suppose that a doctor retires and thatthe ensuing adjustment process is described by(XD(0) XH(0)) (XD XH) and (XD(t) XH(t)) F(XD(t 1) XH(t 1)) Then the sequence(XD(t) XH(t)) converges to a stable collectionof contracts at which all the unretired doctorsare weakly better off and all the hospitals areweakly worse off than at the initial state (XDXH)9

The sequence of contract offers and jobmoves described by iterated applications of Fincludes possibly complex adjustments Hospi-tals that lose a doctor may seek several replace-ments Hospitals whose doctors receive contractoffers may retain those doctors by offering bet-ter terms or may hire a different doctor and laterrehire the original doctor at a new contract Allalong the way the doctors find themselveschoosing from more and better options and thehospitals find themselves marching down theirpreference lists by offering costlier terms pay-ing higher wages or making offers to otherdoctors whom they had earlier rejected

III Law of Aggregate Demand

We now introduce a second restriction onpreferences that allows us to prove the next tworesults about the structure of the set of stablematches We call this restriction the law ofaggregate demand Roughly this law states that

as the price falls agents should demand more ofa good Here price falls correspond to morecontracts being available and more demandcorresponds to taking on (weakly) more con-tracts We formalize this intuition with the fol-lowing definition

DEFINITION The preferences of hospital h H satisfy the law of aggregate demand if for allX X Ch(X) Ch(X)

According to this definition if the set ofpossible contracts expands (analogous to a de-crease in some doctorsrsquo wages) then the totalnumber of contracts chosen by hospital h eitherrises or stays the same The corresponding prop-erty for doctor preferences is implied by re-vealed preference because each doctor choosesat most one contract Just as for the substitutescondition when wages are endogenous we in-terpret the definition as applying to the domainof wage vectors for which the hospitalrsquos opti-mum is unique

The next theorem shows the important rela-tionship between profit maximization substi-tutes and the law of aggregate demand

THEOREM 7 If hospital hrsquos preferences arequasi-linear and satisfy the substitutes condi-tion then they satisfy the law of aggregatedemand

Below we use the law of aggregate demandto characterize both necessary and sufficientconditions for the rural hospitalsrsquo property andensure that truthful revelation is a dominantstrategy for the doctors Previously in matchingmodels without money the dominant strategyresult was known only for responsive prefer-ences with capacity constraints (Abdulkadiro-glu 2003) We subsume that result with ourtheorem

A Rural Hospitals Theorem

In the match between doctors and hospitalscertain rural hospitals often had trouble fillingall their positions raising the question ofwhether there are other core matches at whichthe rural hospitals might do better Roth (1986)analyzed this question for the case of X D

9 The theorem does not claim and it is not generally truethat this new point must be the new doctor-best stable set ofcontracts

923VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

H and responsive preferences and found thatthe answer is no every hospital that has unfilledpositions at some stable match is assigned ex-actly the same doctors at every stable match Inparticular every hospital hires the same numberof doctors at every stable match

In this section we show by an example thatthis last conclusion does not generalize to thefull set of environments in which contracts aresubstitutes10 We then prove that if preferencessatisfy the law of aggregate demand and substi-tutes then the last conclusion of Rothrsquos theoremholds every hospital signs exactly the samenumber of contracts at every point in the corealthough the doctors assigned and the terms ofemployment can vary Finally we show thatany violation of the law of aggregate demandimplies that preferences exist such that theabove conclusion does not hold

Suppose that H h1 h2 and D d1 d2d3 For hospital h1 suppose its choices maxi-mize where d3 d1 d2 d1 d2 A d1 d3 d2 d3 This prefer-ence satisfies substitutes11 Suppose h2 has oneposition with its preferences given by d1 d2 d3 A Finally suppose d1 and d2prefer h1 to h2 while d3 has the reverse prefer-ence Then the matches X (h1 d3) (h2 d1)and X (h1 d1) (h1 d2) (h2 d3) are bothstable but hospital h1 employs a different num-ber of doctors and the set of doctors assigneddiffers between the two matches

This example involves a failure of the law ofaggregate demand because as the set of con-tracts available to h1 expands by the addition of(h1 d3) to the set (h1 d1) (h1 d2) the numberof doctors demanded declines from two to oneWhen the law of aggregate demand holds how-ever we have the following result

THEOREM 8 If hospital preferences satisfysubstitutes and the law of aggregate demandthen for every stable allocation (XD XH) andevery d D and h H Cd(XD) Cd(X D)

and Ch(XH) Ch(X H) That is every doctorand hospital signs the same number of contractsat every stable collection of contracts

The next theorem verifies that the counterex-amples developed above can always be gener-alized whenever any hospitalrsquos preferencesviolate the law of aggregate demand

THEOREM 9 If there exists a hospital h setsX X X such that Ch(X) Ch(X) andat least one other hospital then there existsingleton preferences for the other hospitalsand doctors such that the number of doctorsemployed by h is different for two stablematches

Theorem 9 establishes that the law of aggre-gate demand is not only a sufficient conditionfor the rural hospitals result of Theorem 8 butin a particular sense a necessary one as well

B Truthful Revelation as a DominantStrategy

The main result of this section concerns doc-torsrsquo incentives to report their preferences truth-fully For the doctor-offering algorithm ifhospital preferences satisfy the law of aggregatedemand and the substitutes condition then it isdominant strategy for doctors to reveal truth-fully their preferences over contracts12 We fur-ther show that both preference conditions playessential roles in the conclusion

We will show the positive incentive result forthe doctor-offering algorithm in two stepswhich highlight the different roles of the twopreference assumptions First we show that thesubstitutes condition by itself guarantees thatdoctors cannot benefit by exaggerating the rank-ing of an unattainable contract More preciselyif there exists a preferences list for a doctor dsuch that d obtains contract x by submitting thislist then d can also obtain x by submitting apreference list that includes only contract xSecond we will show that adding the law of

10 A similar example appears in Ruth Martınez et al(2000)

11 These preferences however do not display the ldquosingleimprovement propertyrdquo that Gul and Stacchetti (1999) in-troduce and show is characteristic of substitutes preferencesin models with quasi-linear utility

12 It is of course not a dominant strategy for hospitals totruthfully reveal nor would it be so even if we consideredthe hospital-offering algorithm For further discussion ofthis point see Roth and Sotomayor (1990)

924 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

aggregate demand guarantees that a doctor doesat least as well as reporting truthfully as byreporting any singleton Together these are thedominant strategy result

To understand why submitting unattainedcontracts cannot help a doctor d consider thefollowing Let x be the most-preferred contractthat d can obtain by submitting any preferencelist (holding all other submitted preferencesfixed) Note that all that d accomplishes whenreporting that certain contracts are preferred to xis to make it easier for some coalition to blockoutcomes involving x Thus if x is attainablewith any report it is attainable with the reportPd x that ranks x as the only acceptable con-tract This intuition is captured in the followingtheorem

THEOREM 10 Let hospitalsrsquo preferences sat-isfy the substitutes condition and let the match-ing algorithm produce the doctor-optimalmatch Fixing the preferences of hospitals andof doctors besides d let x be the outcome that dobtains by reporting preferences Pd z1 dz2 d

d zn d x Then the outcome that dobtains by reporting preferences Pd x is also x

Some other doctors may be strictly better offwhen d submits her shorter preference list thereare fewer collections of contracts that d nowobjects to so the core may become larger andthe doctor-optimal point of the enlarged coremakes all doctors weakly better off and maymake some strictly better off

Without the law of aggregate demand how-ever it may still be in a doctorrsquos interest toconceal her preferences for unattainable posi-tions To see this consider the case with twohospitals and three doctors where contracts aresimply elements of D H and let preferences be

(12) Pd1 h1 h2

Ph1 d3 d1 d2 d1 d2

Pd2 h2 h1

Ph2 d1 d2 d3

Pd3 h2 h1

With these preferences the only stable matchis (d1 h2) (d3 h1) which leaves d2 unem-ployed However if d2 were to reverse herranking of the two hospitals then (d1 h1) (d2h1) (d3 h2) would be chosen by the doctor-offering algorithm leaving d2 better off Essen-tially by offering a contract to h2 d2 haschanged the number of positions availableWhen the preferences of the hospitals satisfythe law of aggregate demand however mak-ing more offers to the hospitals (weakly) in-creases the number of contracts the hospitalsaccept

THEOREM 11 Let hospitalsrsquo preferences sat-isfy substitutes and the law of aggregate de-mand and let the matching algorithm producethe doctor-optimal match Then fixing the pref-erences of the other doctors and of all thehospitals let x be the contract that d obtains bysubmitting the set of preferences Pd z1 dz2 d

d zn d x Then the preferences Pd y1 y2 yn x yn131 yN

obtain a contract that is Pd-preferred or indif-ferent to x

According to this theorem when a doctorrsquostrue preferences are Pd the doctor can never dobetter according to these true preferences thanby reporting the preferences truthfully

In fact the law of aggregate demand is ldquoal-mostrdquo a necessary condition as well The excep-tions can arise because certain violations of thelaw of aggregate demand are unobservable fromthe choice data of the algorithm and these can-not affect incentives Thus consider an examplewhere terms t are included in the contract andwhere a hospital h has preferences (d1 ht1) (d1 h t1) (d2 h t2) (d1 h t1) (d2 h t2) Although these preferences violatethe law of aggregate demand the algorithm willnever ldquoseerdquo the violation as either (d1 h t1) d1

(d1 h t1) or (d1 h t1) d1(d1 h t1) Thus

whichever terms that d1 first offers will deter-mine a conditional set of preferences for thehospital that does satisfy the law of aggregatedemand (The hospital will never reject an offerof either (d1 h t1) or (d1 h t1))

The next theorem says that if some hospitalrsquospreferences violate the law of aggregate demandin a way that can even potentially be observed

925VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

from the hospitalrsquos choices then there existpreferences for the other agents such that it isnot a dominant strategy for doctors to reporttruthfully even when the other assumptions wehave used are satisfied

THEOREM 12 Let hospital h have prefer-ences such that Ch(X) Ch(X x) and letthere exist two contracts y z such that yD zD xD yD and y z Rh(X x) Rh(X)Then if another hospital h exists there existsingleton preferences for the hospitals besides hand preferences for the doctors such that it isnot a dominant strategy for all doctors to revealtheir preferences truthfully

Thus to the extent that the law of aggregatedemand for hospital preferences has observableconsequences for the progress of the doctor-offering algorithm it is an indispensable condi-tion to ensure the dominant strategy property fordoctors

IV Classes of Conforming Preferences

Although the class of substitutes valuations isquite limited13 it is broader than the set ofresponsive preferences in useful ways Thesubstitutes valuations accommodate all the af-firmative action and subspecialty constraints de-scribed above and allow a doctorrsquos marginalproduct to depend on which other doctors thehospital attracts

In this section we introduce a parameterizedclass of quasi-linear substitutes valuations forhospitals evaluating sets of new hires The val-uations are based on an endowed assignmentmodel according to which hospitals have a set

of jobs to fill and an existing endowment ofdoctors while doctorsrsquo productivities varyamong jobs A hospital values new doctors ac-cording to the their incremental value in theassignment problem

From a general job assignment perspectivethe key restrictions of endowed assignment val-uations are that each doctor can do one and onlyone job and that the hospitalrsquos output is the sumof outputs of its various jobs A hospital cannotuse one doctor for two jobs nor can it combinethe skills of two doctors in the same job Alsothere is no interaction in the productivity ofdoctors in different jobs Given this mathemat-ical structure if a doctor is lost it will always beoptimal for the hospital to retain all of its otherdoctors although it may choose to reassignsome of the retained doctors to fill vacatedpositions

Another way to describe the set of endowedassignment valuations VEA is to build it upfrom three properties as follows First a sin-gleton valuation is one of the form v(S) maxdSd for some nonnegative vector Sin-gleton valuations represent the possible valua-tions by a hospital with just one opening andVEA includes all singleton valuations Second ifa hospital is composed of two units j 1 2each of which has a valuation vj VEA then thehospitalrsquos maximum value from assigningworkers between its units denoted by (v1 v2)(S) maxRSv1(R) 13 v2(S R) is also inthe set We call this property closure underaggregation Third if a hospitalrsquos value is de-rived from a value in VEA by endowing thehospital with a set of doctors T then the hospi-talrsquos incremental value for extra doctorsv(ST) v(S T) v(T) is also in the set VEAWe call this property closure under endowmentFinally two valuations v1 and v2 are calledequivalent if they differ by an additive con-stant For example for any fixed set of doctorsT v( T) is equivalent to v( T)

THEOREM 13 Let VEA denote the smallestfamily of valuations of sets of doctors that in-cludes all the singleton valuations and is closedunder aggregation and endowment Then foreach v VEA there exists a set of jobs J a setof doctors T and a (D 13 T) J-matrix [ij]such that v is equivalent to the following

13 Hans Reijnierse et al (2002) (see also Yuan-ChuanLien and Jun Yan 2003) have characterized the valuationfunctions that satisfy the substitutes condition as followsLet v(S) be the hospitalrsquos value of doctor set S and letvS(T) v(S T) v(S) denote the incremental value of theset of doctors T Then doctors are substitutes if for every setS and three other doctors d1 d2 and d3 there is no uniquemaximum in vS(d1) 13 vS(d2 d3) vS(d2) 13 vS(d1 d3)vS(d3) 13 vS(d1 d2)

926 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

(13) vSJ T maxz

d S

djzdj subject to

d S

zdj 1 for j J

j J

zdj 1 for d S T0 for d S T

zdj 0 1 for all d j

Conversely for every such J T and v( J T) VEA

We dub this family of valuations the endowedassignment valuations because of the form ofoptimization (13) The family VEA is an exten-sion of the assignment valuations derived byLloyd Shapley (1962) used by Roth (19841985b) in models of matching with wages andexplicit job assignments and emphasized in astudy of package bidding by Lehmann et al(2001) The endowed assignment valuations arequite useful for applications They also fit nicelywith the theory reported in previous sections forthe following reason

THEOREM 14 Every endowed assignmentvaluation v( J T) VEA is a substitutesvaluation

To the best of our knowledge all of thesubstitutes valuations that have been used orproposed for practical applications are includedamong the endowed assignment valuations In-deed the question of whether all substitutesvaluations are endowed assignment valuationsis an open one Here we review some of themost popular valuations to show how they fitinto the class

The most commonly studied class of prefer-ences for matching problems like the Match forwhich employment terms are exogenouslyfixed are the responsive preferences Thesespecify that each hospital h has a fixed numberof openings nh a set of acceptable doctors Dh

A D and a strict ordering h of the acceptabledoctors When a doctor is unacceptable thatmeans that hiring the doctor is always worsethan leaving her position unfilled Given any setof available doctors the hospital hires its nh

most preferred acceptable doctors if that manyare available and otherwise hires all of theacceptable doctors

To map responsive preferences into the as-signment problem framework define a utilityfunction uh D3 to represent h and set theminimum acceptable utility to zero Formally(1) if d d Dh

A then d h dN uh(d) uh(d)and (2) d Dh

AN uh(d) 0 Using this utilitywe specify an assignment problem as followsJ 1 nh and dj uh(d) 13 1 and fix thewage at 1 Using a positive wage is a device toensure that the hospital strictly prefers not tohire a doctor it plans not to assign to any job Itis evident that with this valuation preferencethe hospital most prefers to hire the set of avail-able acceptable doctors with the highest rank-ing according to h

Among the extensions of responsive prefer-ences that have been most important in practiceare ones to accommodate quotas of variouskinds For example one use of quotas is tomanage subspecialties of internal medicine inwhich a certain number of positions are to befilled by doctors planning that subspecialty ifenough acceptable doctors are available Onecan reserve ms jobs for subspecialty s by pro-viding that there are ms jobs in which doctors inthat subspecialty have their productivity in-creased by a large constant M Then if msdoctors in subspecialty s are available at leastthat many will be demanded at the optimalsolution to (13) If that many qualified doctorsare not available the jobs will be filled by otherdoctors according to their productivities

Another use of quotas is for an affirmativeaction policy that absolutely reserves jobs formembers of certain target groups For each af-firmative action group G define a correspond-ing set of jobs JG and let J G JG Specifythat for any doctor d G and job j JG dj uh(d) and otherwise dj 0 One can alsointroduce an unrestricted category of jobs j thatany doctor can fill with productivity dj uh(d) This obviously ensures that a certainnumber of jobs are reserved for each targetgroup

A recent treatment of affirmative action byRoth (1991) extended by Abdulkadiroglu(2003) uses the class of responsive preferenceswith capacity constraints This class requires

927VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

that the set of doctors be partitioned into a finitenumber of affirmative action groups and that foreach group G the hospital has a capacity mG thatlimits the number of doctors who can be hiredfrom that group In addition at most nh doctorsin total can be hired

To represent such preferences using endowedassignment valuations let us specify that thereare mG jobs of type G and yenG mG jobs in totalThe hospital is endowed with nh yenG mGdoctors The endowed doctors have productivityij M in every job where M is a largenumber This ensures that at most nh new doc-tors will be hired at any optimum For thenonendowed doctors we calculate productivi-ties uh(d) in the same fashion as for the respon-sive preferences and set dj uh(d) for jobs j oftype G and dj 0 for all other jobs Thisensures that at most mG doctors will be hiredfrom group G By inspection this specificationrepresents Abdulkadiroglursquos affirmative actionpreferences

Unlike the specifications used for the currentNational Resident Matching Program algo-rithm the endowed assignment valuations per-mit overlapping affirmative action categoriesFor example suppose that a small hospital has atarget of hiring one female and one minoritydoctor In the endowed assignment structurethe hospital may assign a minority female doc-tor to fill either a minority slot or a female slotbut not both This is necessary to retain thesubstitutes demand structure for otherwisemaking a minority female doctor availablecould lead the hospital to hire a nonminoritymale doctor whom it would otherwise reject

Endowed assignment valuations thus providea flexible parameterized way for hospitals torepresent their preferences for matching with orwithout wages using a class of quasi-linear pref-erences that satisfies the substitutes conditionand the law of aggregate demand

V Cumulative Offer Processes and Auctions

The algorithms described by the system (9)with different starting points have the propertythat they can terminate only at a stable set ofcontracts Nevertheless unless preferences sat-isfy the substitutes condition the system is notguaranteed to converge at all even when a fixed

point exists In this section we offer a differentcharacterization of the Gale-Shapley doctor-offering algorithm that will prove especiallywell suited to situations in which contracts maynot be substitutes but in which there is just oneldquohospitalrdquo the auctioneer For now we allowthe possibility that there are several hospitals

The alternative representation is constructedby replacing the system of equations (9) by thefollowing system

(14) XD t X RH XH t 1

XH t XH t 1 CD XD t

We call the algorithm that begins with XD(0) X and XH(0) A and obeys (14) a cumulativeoffer process because the formalism capturesthe idea that hospitals accumulate offers fromdoctors in the set XH(t) and hold their bestchoices CH(XH(t)) from the accumulated setThere is no assumption of consistency imposedon the algorithm so it is possible that severalhospitals are ldquoholdingrdquo contract offers from thesame doctor The corresponding allocation is ofcourse infeasible since each doctor can ulti-mately accept just one contract

At each round t of the cumulative offer pro-cess all doctors make their best offers from theset of not-yet-rejected choices XD(t) but anydoctor d for whom a contract is being heldsimply repeats one of its earlier offers Thusnew offers are made only by doctors who havebeen rejected

To see why this is so let x CH(XH(t)) be acontract that is being held and consider thecorresponding doctor xD d By revealed pref-erence doctor d strictly prefers x to any contractthat she has not yet offered since those con-tracts were available to offer at the time that xwas offered Since drsquos most preferred contractin Xd(t) at the current time must be weaklypreferred to x it must be coincide with one ofdrsquos earlier offers

The second equation of system (14) is the onethat distinguishes the cumulative offer processfrom the system in (9) In the cumulative offerprocess without any assumptions about hospi-talsrsquo preferences XH(t) grows monotonicallyfrom round to round so the sequence of setsconverges In contrast the earlier process was

928 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

guaranteed to converge only when contracts aresubstitutes for the hospitals

When contracts are substitutes the two sys-tems of equations are equivalent

THEOREM 15 Suppose that contracts aresubstitutes for the hospitals and that XD(0) Xand XH(0) A Then the sequences of pairs(XD(t) XH(t)) generated by the two laws ofmotion (9) and (14) are identical

Even with the initial condition XD(0) X andXH(0) A the algorithms described by (9) and(14) may differ when contracts are not substi-tutes In that case by inspection of the system(14) the cumulative offer process still con-verges because XH(t) is bounded by the finiteset X and grows monotonically from round toround What is at issue is whether the hospitalrsquoschoice from its final search set in the cumulativeoffer process is a feasible and stable set ofcontracts

We will find below that when there is a singlehospital the outcome is indeed a feasible andstable set of contracts In that case the cumu-lative offer process coincides with the general-ized proxy auction of Ausubel and Milgrom(2002) Those authors analyze in detail the casewhen a bid consists of a price and a subset of theset of goods that the bidder wishes to buy Ateach round the seller ldquoholdsrdquo the collection ofbids that maximizes its total revenues subject tothe constraint that each good can be sold onlyonce The generalized proxy auction howeveris not limited to the sale of goods and in fact isidentical in scope to our present model ofmatching with contracts In particular the auc-tioneer may impose a variety of constraints onthe feasible collections of bids and may weighnonprice factors either exclusively or in com-bination with prices to decide which collectionof bids to hold Bidders for their part maymake bids that include factors besides price andmay not include price at all

To illustrate the role of general contracts inthis auction setting consider the auction designsuggested by Paul Brewer and Charles Plott(1996) in which bidders seek to buy access to arailroad track In that application a bid specifiesa trainrsquos direction of travel departure and ar-rival times and price offered It is assumed that

trains travel at a uniform speed along the trackIn this setting the contract terms must includethe direction and the two times and the seller isconstrained to hold only combinations of bidssuch that trains maintain safe distances fromone another at all times

A second example of the generalized proxyprocess is a procurement auction in which thebuyer scores suppliers on the basis of suchfactors as quality excess capacity credit ratingand historical reliability as well as price and inwhich the buyer prefers to set aside someamount of its purchase for minority contractorsor to maintain geographic diversity of supply toreduce the chance of supply disruptions In anasset sale the seller may weigh the probabilitythat the sale will be completed for example dueto financing contingencies or because a union orantitrust regulators must approve the sale

The cumulative offer process model withgeneral contracts accommodates all of thesepossibilities The auctioneer in the model cor-responds to a single ldquohospitalrdquomdashhereafter theauctioneermdashwith a choice function CH thatselects her most preferred collection of contractproposals We have the following result (whichis first stated using different notation than in theAusubel-Milgrom paper)

THEOREM 16 When the doctor-offering cu-mulative offer process with a single hospitalterminates at time t with outcome (XD(t) XH(t))the hospitalrsquos choice CH(XH(t)) is a stable col-lection of contracts

Cumulative offer processes connect the the-ory of matching with contracts to the emergingtheory of package auctions and auctions withcomplex constraints

VI Conclusion

We have introduced a general model ofmatching with bilateral contracts that encom-passes and extends two-sided matching modelswith and without money and certain auctionmodels The new formulation allows some con-tract terms to be exogenously fixed and others tobe endogenous in any combinations In thisvery general framework we characterize stable

929VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

collections of contracts in terms of the solutionto a certain system of equations

The key to the analysis is to extend twoconcepts of demand theory to models with orwithout prices The first concept to be extendedis the notion of substitutes Our definition ap-plies essentially the Roth-Sotomayor substitut-able preferences condition to a more generalclass of contracts contracts are substitutes ifwhenever the set of feasible bilateral contractsexpands the set of contracts that the firm rejectsalso expands We show that (a) our definitioncoincides with the usual demand theory condi-tion when both apply (b) when contracts aresubstitutes a stable collection of contracts ex-ists and (c) if any hospital or firm has prefer-ences that are not substitutes then there arepreferences with single openings for each otherfirm such that no stable allocation exists Wefurther show that when the substitute conditionapplies (a) both the doctor-offering and hospi-tal-offering Gale-Shapley algorithms can berepresented as iterated operations of the sameoperator (starting from different initial condi-tions) and (b) starting at a stable allocationfrom which a doctor retires a natural marketdynamic mimics the Gale-Shapley process tofind a new stable allocation

The second relevant demand theory conceptis the law of demand which we extend both toinclude heterogeneous inputs and to encompassmodels with or without prices The law of ag-gregate demand condition holds that when theset of feasible contracts expands the number ofcontracts that the firm chooses to sign weaklyincreases In terms of traditional demand theorythis means that for example when the wages ofsome of a heterogeneous group of workers fallsif the workers are substitutes then the totalnumber of workers employed rises We showthat (a) when inputs are substitutes the choicesof a profit-maximizing firmhospital satisfy thelaw of aggregate demand Moreover when thechoices of every hospitalfirm satisfy the law ofaggregate demand and the substitutes conditionthen (b) the set of workersdoctors employed isthe same at every stable allocation (c) the num-ber employed by each firmhospital is also thesame and (d) truthful reporting is a dominantstrategy for doctors in the doctor-offering algo-rithm Moreover we prove (e) that if the law of

aggregate demand fails in any potentially ob-servable way then the preceding dominantstrategy property does not hold

For these results to be useful for practicalmechanism design one needs to account forhow preferences especially hospital prefer-ences are to be reported to the mechanismThere needs to be a convenient way for hospi-tals to express a rich array of preferences andone needs to know whether the preferences be-ing reported actually satisfy the conditions ofthe various theorems Toward that end we in-troduce a parametric form that we call extendedassignment valuations which strictly general-izes several existing specifications and whichalways satisfies both the substitutes and law ofaggregate demand conditions

Finally we introduce an alternative treatmentof the doctor-offering algorithm the cumulativeoffer process We show that when contracts aresubstitutes the previously characterized doctor-offering algorithm coincides exactly with a cu-mulative offer process When contracts are notsubstitutes but there is just one hospital (theldquoauctioneerrdquo) the cumulative offer process co-incides with the Ausubel-Milgrom ascendingproxy auction This identity clarifies the con-nection between these algorithms and com-bined with the dominant strategy theoremreported above generalizes the Ausubel-Milgromdominant strategy theorem for the proxyauctions

Our new approach reveals deep similaritiesamong several of the most successful auctionand matching designs in current use and amongthe environmental conditions in which theoret-ically the mechanisms should perform at theirbest Understanding these similarities can helpus to understand the limitations of these mech-anisms paving the way for new designs

APPENDIX

PROOF OF THEOREM 1Let (XD XH) X2 be a solution to (3) Then

XD XH XD RD(XD) CD(XD) andsimilarly XH XD XH RH(XH) CH(XH)so XH XD CH(XH) CD(XD)

Next we show that X XH XD is a stableset of contracts Since X CH(XH) CD(XD)it follows by revealed preference that X

930 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

CH(X) CD(X) so condition (i) of the defi-nition of stability is satisfied

Consider any hospital h and set of contractsX CD(X X) naming hospital h Since X CD(XD) revealed preference of the doctorsimplies that X XD CD(XD) and hence thatX RD(XD) X XD RD(XD) CD(XD) RD(XD) A Thus X X RD(XD) XHby (3) So if X Ch(X) then by the revealedpreference of hospital h X h Ch(XH) Ch(X) Hence X Ch(X X) so condition(ii) is satisfied So the set of contracts X isunblocked

For the converse suppose that X is a stablecollection of contracts Then CD(X) X LetXH be the set of contracts that the doctorsweakly prefer to X and XD the set of contractsthat doctors weakly disprefer By constructionX XH X XD X is a partition of X

To obtain (3) observe first that if there issome h such that Ch(XH) Xh then X Ch(XH) violates stability condition (ii) SoCh(XH) Xh for all h that is CH(XH) X Itfollows that X RH(XH) X (XH X) X (X XD) XD and that X RD(XD) X (XD CD(XD)) X (XD X) XH

Hence (XD XH) satisfies (3) and XH XD X

PROOF OF THEOREM 2Let i j ( j wj) C(w) and wi wi Define

Z(w) ( j wj)wj wj Then Z(wi wi) Z(w) If contracts are substitutes then R(Z(wiwi)) R(Z(w)) By (6) since ( j wj) C(w)it follows that ( j wj) C(Z(w)) so ( j wj) R(Z(w)) Hence ( j wj) R(Z(wi wi)) So ( jwj) Z(wi wi) R(Z(wi wi)) C(Z(wiwi)) and thus (j wj) C(wi wi) by assumption(6) Thus C satisfies demand theory substitutes

Conversely suppose contracts are not substi-tutes Then there exists a set X an element (iwi) X and ( j wj) R(X) such that ( j wj) R(X) where X X (i wi) Using (6)wi Wi(X) Let w W(X) and wi Wi(X)Then wi wi and ( j wj) C(w) but ( j wj) C(wi wi) so C does not satisfy the demandtheory substitutes condition

PROOF OF THEOREM 5We may limit attention to the case with

exactly two hospitals by specifying that

the doctors find the other hospitals to beunacceptable

Suppose Rh is not isotone Then there existssome x y X and X X such that for all x X xH h and such that x Rh(X) Rh(X y) By construction since x y Ch(X y) contracts x and y specify different doctorssay d1 xD yD d2 Let x and y denote thecorresponding contracts for doctors d1 and d2 inwhich hospital h is substituted for h

We specify preferences as follows first forhospital h we take x h y h A and allother contracts are unacceptable Second doc-tors in xD(CH(X) CH(X y)) d1 d2prefer their elements of CH(X) CH(X y)to any other contract Third d1 has x d1

x and ranks all other contracts lower Fourthd2 has y d2

y and ranks all other con-tracts lower Finally the remaining doctors findall contracts from hospitals h and h to beunacceptable

Consider a feasible acceptable allocation Xsuch that y X Since h and d2 can have onlyone contract in X x y X Then hrsquos con-tracts in X form a subset of X so x is notincluded and d1 has a contract less preferredthan x Then the deviation by (d1 h) to xblocks X

Consider a feasible acceptable allocation Xsuch that y X Then either x y X or Xis blocked by a coalition including h d1 and d2using the contracts x and y However if x y X then a deviation by (d2 h) to contract yblocks X

Since all feasible allocations are blockedthere exists no stable set of contracts

PROOF OF THEOREM 7Suppose X D H W and let Z(w) ( j

wj)wj wj Then the law of aggregate de-mand is the statement that for any wage vectorsw w satisfying w w such that the choices setsare singletons C(Z(w)) C(Z(w)) The proofis by contradiction Suppose the law of aggre-gate demand does not hold Then there exists awage vector w and a doctor d such that for some(and hence all) 0 C(Z(wd 13 wd)) C(Z(wd wd)) Since hrsquos preferences arequasi-linear changing doctor drsquos wage can af-fect the hiring of other doctors only if it affectsthe hiring of doctor d It follows that there are

931VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

exactly two optimal choices for the hospital atwage vector w these are C(Z(wd wd)) atwhich doctor d is hired and C(Z(wd 13 wd))at which d is not hired but such that two otherdoctors are hired that is there exist doctors dd C(Z(wd 13 wd)) C(Z(wd wd))Let the corresponding payoff for the hospital(when faced with wage vector w) be

Consider the wage vector w (wd wd 2 wdd) For positive and suffi-ciently small the hospitalrsquos payoff at wage vec-tor w is 13 2 if it chooses C(Z(wd 13 wd))and it is 13 if it chooses C(Z(wd wd))and one of these choices must be optimal SoC(w) C(Z(wd 13 wd)) But then raisingthe wage of doctor d from wd 2 to wd whileholding the other wages at wd reduces the de-mand for doctor d from one to zero in violationof the demand theory substitutes condition

PROOF OF THEOREM 8By definition XD X D so by revealed pref-

erence Cd(X D) Cd(XD) Also X H XH soby the law of aggregate demand Ch(X H) Ch(XH) By Theorem 1 CD(XD) CH(XH)and CD(X D) CH(X H) so yendD Cd(XD) yenhH Ch(XH) and yendD Cd(XD) yenhH Ch(XH)Combining these leads to yendD Cd(X D) yendD Cd(XD) yenhH Ch(XH) yenhH Ch(XH) yendD Cd(XD) which begins and ends with the samesum Hence none of the inequalities can bestrict

PROOF OF THEOREM 9Since Ch(X) Ch(X) there exists some

set Y X Y X and contract x such thatCh(Y) Ch(Y x) Since x Ch(Y x)(as otherwise Ch(Y) Ch(Y x) for thepreferences to be rationalizable) there must ex-ist two contracts y z Rh(Y x) Rh(Y)such that y x z y Moreover since y z Ch(Y) yD zD

Denoting by h the second hospital whose exis-tence is hypothesized by the theorem we specifypreferences as follows Let all the doctors with con-tracts in Y have those contracts be their most favoredand let all other doctors find any contract with hunacceptable Let all doctors find any contract notinvolving hospital h or h to be unacceptable

In principle there are three casesIf xD yD then let PxD

y x and PzD z

Then there exist two stable matches Ch(Y x) and Ch(Y) with zD employed in the firstmatch but not in the second

The case xD zD is symmetricFinally if yD xD zD then let x y z

denote contracts with hospital h where the doc-tors (and any other terms) are the same as in xy z respectively Specify the remaining prefer-ences by PxD

x x PyD y y PzD

z z and Ph y x A z Thenthere exist two different stable matches x Ch(Y) and y Ch(Y x) with zD em-ployed in the first match but not in the second

PROOF OF THEOREM 10Let X denote the collection of contracts cho-

sen by the algorithm when doctor d submitspreference Pd If this collection which is stableunder the reported preferences is not stableunder Pd then there exists a blocking coalitionThis blocking coalition must contain d as noother doctorrsquos preferences have changed butthat is impossible since x is drsquos favorite con-tract according to the preferences Pd Since X isstable under Pd the doctor-optimal stable matchunder Pd (the existence of which is guaranteedby Theorem 2) must make every doctor(weakly) better off than at X In particulardoctor d must obtain x

PROOF OF THEOREM 11From Theorem 10 Pd x also obtains x

Hence by the rural hospitals theorem d is em-ployed at every point in the core when Pd x issubmitted So every allocation X at which d isunemployed is blocked by some coalition andset of contracts when d submits Pd Conse-quently if d submits the preferences Pd y1 y2 yn x then every allocation at whichd is unemployed is still blocked by the samecoalition and set of contracts Since the doctor-best stable allocation is one at which d gets aPd-acceptable contract that allocation is weaklyPd-preferred to x Finally the doctor-optimalmatch when Pd is submitted is still the doctor-optimal match when Pd is submitted as drsquospreferences over contracts less preferred than xcannot be used to block a match where shereceives a contract weakly preferred to x

932 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

PROOF OF THEOREM 12Consider contracts x y and z such that

xD xD yD yD zD zD and xH yH zH h Let the preferences of the three identified bePxD

x x PyD y y and PzD

z z andlet those of h be Ph y z x Forthe other contracts x Y Ch(X) let x be xDrsquosmost favored contract For the remaining doctorslet any contract with h or h be unacceptable

With the preceding preferences the only sta-ble allocation includes contracts x and y leav-ing doctor zD unemployed If however zDmisrepresents her preferences and reports PzD

z z then the doctor-optimal stable matchincludes z leaving doctor zD better off

PROOF OF THEOREM 13Setting J 1 and T A it is clear by

inspection that this family includes all singletonvaluations

The family is closed under endowment be-cause given any such valuation v( J T)endowing a set of doctors T simply creates thevaluation v( J T T))

To verify that the family is closed underaggregation consider any two valuations v( J T) and v( J T) Since J and T are justindex sets we may assume without loss ofgenerality that T T J J A DefineT T T and J J J Let

(15) ij ij if i D T j Jij if i D T j J0 otherwise

By inspection of the optimization problems v( J T) v( J T) v( J T)

For the converse consider the valuation v( J T) given by (13) We derive it construc-tively from the singleton valuations aggrega-tion and endowment as follows Let vj be thesingleton valuation associated with row j inmatrix [ij] for j 1 J Since VEA isclosed under aggregation v1 vJ v( J A) VEA Since VEA is also closed underendowment we may endow the doctors in T toobtain v( J T) VEA

PROOF OF THEOREM 14L Shapley (1962) (see also Lehmann et al

2001) had already proved that every assignment

valuation without endowments v( J A) is asubstitutes valuation Ausubel and Milgrom(2002) prove that a valuation v is a substitutesvaluation if and only if the corresponding indi-rect profit function ((p) v(S) yendS pd) issubmodular Let be the indirect profit func-tion corresponding to v( J A) Then theindirect profit function corresponding to v( J T) is (p1 pN) (p1 pN 0 0)Since is the profit function of the substitutesvaluation vh it is submodular and hence issubmodular as well

PROOF OF THEOREM 15Suppose that contracts are substitutes for the

hospitals We proceed by induction The initialcondition specifies that the sequences are iden-tical through time t 0 Denote the sequencecorresponding to the cumulative offer processby a superscript C and denote the alternativeprocess defined by (9) with no superscript As-sume the inductive hypothesis that the se-quences are the same up to round t 1 andsuppress the corresponding superscripts for thevalues at that round Then XD(t) X RH(XH(t 1)) XD

C(t) This also implies that

(16) X XH t 1 XD t

To complete the proof we must show thatXH

C(t) XH(t) or equivalently that XH(t 1) CD(XD(t)) X RD(XD(t))

For t 2 XHC(t 2) XH

C(t 1) by con-struction so by the inductive hypothesis XH(t 2) XH(t 1) Since contracts are substitutesRH is isotone so X RH(XH(t 1)) X RH(XH(t 2)) and hence XD(t) XD(t 1)For t 1 the inclusion XD(t) XD(t 1) isimplied by the initial condition XD(0) X

Recall that by revealed preference RD isisotone It follows that RD(XD(t)) RD(XD(t 1)) and hence using (9) that XH(t 1) X RD(XD(t 1)) X RD(XD(t)) XH(t) ThusXH(t 1) XH(t 1) (X RD(XD(t))) XH(t 1) RD(XD(t)) So XH(t 1) CD(XD(t)) XH(t 1) (XD(t) RD(XD(t))) (XH(t 1) RD(XD(t))) (XD(t) RD(XD(t))) (XH(t 1) XD(t)) RD(XD(t)) X RD(XD(t)) where the last stepequality follows from (16)

933VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

PROOF OF THEOREM 16By construction any contract not in XH(t) is

less preferred by some doctor d than everycorresponding contract in XH(t) (because doctord offers her most preferred contracts in se-quence) So any collection of contracts thatincludes some not in XH(t) must be strictly lesspreferred by one of the doctors Any profitablecoalitional deviation must use only contracts inXH(t)

By construction the one hospitalauctioneermust be part of any deviating coalition andCH(XH(t)) is its strictly most preferred collectionof contracts in XH(t) so there is no profitablecoalitional deviation using just contracts in XH(t)

REFERENCES

Abdulkadiroglu Atila ldquoCollege Admissionswith Affirmative Actionrdquo Unpublished Pa-per 2003

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoBoston Public School MatchingrdquoAmerican Economic Review 2005a (Papersand Proceedings) 95(2) pp 368ndash71

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoThe New York City High SchoolMatchrdquo American Economic Review 2005b(Papers and Proceedings) 95(2) pp 364ndash67

Abdulkadiroglu Atila and Sonmez TayfunldquoSchool Choice A Mechanism Design Ap-proachrdquo American Economic Review 200393(3) pp 729ndash47

Adachi Hiroyuki ldquoOn a Characterization of Sta-ble Matchingsrdquo Economics Letters 200068(1) pp 43ndash49

Alkan Ahmet and Gale David ldquoStable ScheduleMatching under Revealed Preferencerdquo Jour-nal of Economic Theory 2003 112(2) pp289ndash306

Ausubel Lawrence M Cramton Peter and Mil-grom Paul R ldquoThe Clock-Poxy Auction APractical Combinatorial Auction Designrdquo inPeter Cramton Yoav Shoham and RichardSteinberg eds Combinatorial auctionsCambridge MA MIT Press 2005 ch 5

Ausubel Lawrence M and Milgrom Paul RldquoAscending Auctions with Package Bid-dingrdquo Frontiers of Theoretical Economics2002 1(1) Article 1

Blum Yosef Roth Alvin E and Rothblum UrielG ldquoVacancy Chains and Equilibration in Se-nior-Level Labor Marketsrdquo Journal of Eco-nomic Theory 1997 76(2) pp 362ndash411

Brewer Paul J and Plott Charles R ldquoA BinaryConflict Ascending Price (Bicap) Mechanismfor the Decentralized Allocation of the Rightto Use Railroad Tracksrdquo International Jour-nal of Industrial Organization 1996 14(6)pp 857ndash86

Bulow Jeremy and Levin Jonathan ldquoMatchingand Price Competitionrdquo Stanford UniversityStanford Economics Working Paper No1818 2003

Cramton Peter Shoham Yoav and SteinbergRichard Combinatorial auctions Cam-bridge MA MIT Press (forthcoming)

Crawford Vincent P and Knoer Elsie M ldquoJobMatching with Heterogeneous Firms andWorkersrdquo Econometrica 1981 49(2) pp437ndash50

Demange Gabrielle and Gale David ldquoThe Strat-egy Structure of Two-Sided Matching Mar-ketsrdquo Econometrica 1985 53(4) pp 873ndash88

Dubins Lester and Freedman David ldquoMachia-velli and the Gale-Shapley Algorithmrdquo Na-val Research Logistics Quarterly 198188(7) pp 485ndash94

Echenique Federico and Oviedo Jorge ldquoCoreMany-to-One Matchings by Fixed-PointMethodsrdquo Journal of Economic Theory2004 115(2) pp 358ndash76

Fleiner Tamas ldquoA Fixed-Point Approach toStable Matchings and Some ApplicationsrdquoMathematics of Operations Research 200328(1) pp 103ndash26

Gale David and Shapley Lloyd ldquoCollege Ad-missions and the Stability of MarriagerdquoAmerican Mathematical Monthly 196269(1) pp 9ndash15

Gul Faruk and Stacchetti Ennio ldquoWalrasianEquilibrium with Gross Substitutesrdquo Journalof Economic Theory 1999 87(1) pp 95ndash124

Kelso Alexander and Crawford Vincent P ldquoJobMatching Coalition Formation and GrossSubstitutesrdquo Econometrica 1982 50(6) pp1483ndash504

Lehmann Benny Lehmann Daniel and NisanNoam ldquoCombinatorial Auctions with De-

934 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

creasing Marginal Utilityrdquo Games and Eco-nomic Behavior 2005 (forthcoming)

Lien Yuan-Chuan and Yan Jun ldquoOn the GrossSubstitutes Conditionrdquo Unpublished Paper2003 httpwwwstamfordeduyclienTerm_Paper_Lien_Yanpdf

Martınez Ruth Masso Jordi Neme Alejandroand Oviedo Jorge ldquoSingle Agents and the Setof Many-to-One Stable Matchingsrdquo Journalof Economic Theory 2000 91(1) pp 91ndash105

Milgrom Paul R Putting auction theory towork Cambridge Cambridge UniversityPress 2004

Milgrom Paul R ldquoPutting Auction Theory toWork The Simultaneous Ascending Auc-tionrdquo Journal of Political Economy 2000108(2) pp 245ndash72

Porter David Rassenti Stephen RoopnarineAnil and Smith Vernon ldquoCombinatorial Auc-tion Designrdquo Proceedings of the NationalAcademy of Sciences 2003 100(19) pp11153ndash57

Reijnierse Hans van Gellekom Anita and PottersJos A M ldquoVerifying Gross SubstitutabilityrdquoEconomic Theory 2002 20(4) pp 767ndash76

Roth Alvin E ldquoThe Economics of Matching Sta-bility and Incentivesrdquo Mathematics of Opera-tions Research 1982 7(4) pp 617ndash28

Roth Alvin E ldquoStability and Polarization ofInterests in Job Matchingrdquo Econometrica1984 52(1) pp 47ndash57

Roth Alvin E ldquoThe College Admissions Prob-lem Is Not Equivalent to the Marriage Prob-lemrdquo Journal of Economic Theory 1985a36(2) pp 277ndash88

Roth Alvin E ldquoConflict and Coincidence ofInterest in Job Matching Some New Resultsand Open Questionsrdquo Mathematics of Oper-ations Research 1985b 10(3) pp 379ndash89

Roth Alvin E ldquoOn the Allocation of Residentsto Rural Hospitals A General Property ofTwo-Sided Matching Marketsrdquo Economet-rica 1986 54(2) pp 425ndash27

Roth Alvin E ldquoA Natural Experiment in theOrganization of Entry-Level Labor MarketsRegional Markets for New Physicians andSurgeons in the United Kingdomrdquo AmericanEconomic Review 1991 81(3) pp 415ndash40

Roth Alvin E and Peranson Elliott ldquoThe Rede-sign of the Matching Market for AmericanPhysicians Some Engineering Aspects ofEconomic Designrdquo American Economic Re-view 1999 89(4) pp 748ndash80

Roth Alvin E and Sotomayor Marilda Two-sided matching A study in game-theoreticmodeling and analysis Cambridge Cam-bridge University Press 1990

Sen Amartya Collective choice and social wel-fare San Francisco Holden-Day Inc 1970

Shapley Lloyd ldquoComplements and Substitutesin the Optimal Assignment Problemrdquo NavalResearch Logistics Quarterly 1962 9(1) pp45ndash48

935VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

Page 10: Matching with Contracts - Stanford Universityweb.stanford.edu/~milgrom/publishedarticles/Matching with... · 2005. 10. 22. · Gale-Shapley matching algorithm. Hence, the Gale-Shapley

This theory also reaffirms and extends theclose connection between the substitutes condi-tion and other concepts that has been estab-lished in the recent auctions literature withquasi-linear preferences Milgrom (2000) stud-ies an auction model with discrete goods inwhich the set of possible bidder values is re-quired to include all the additive functions8 Heshows that if goods are substitutes then a com-petitive equilibrium exists If however thereare at least three bidders and if there is anyallowed value such that the goods are not allsubstitutes then there is some profile of valuessuch that no competitive equilibrium existsFaruk Gul and Ennio Stacchetti (1999) establishthe same positive existence result They alsoshow that if preferences include all values inwhich a bidder wants only one particular goodas well as any one for which goods are not allsubstitutes and if the number of bidders issufficiently large then there is some profile ofpreferences for which no competitive equilib-rium exists Ausubel and Milgrom (2002) estab-lish that if (a) there is some bidder for whompreferences are not demand theory substitutes(b) values may be any additive function and (c)there are at least three bidders in total thenthere is some profile of preferences such that theVickrey outcome is not stable and the coreimputations do not form a lattice Conversely ifall bidders have preferences that are demandtheory substitutes then the Vickrey outcome isin the core and the core imputations do form alattice Taken together these results establish aclose connection between the substitutes condi-tion the cooperative concept of the core thenoncooperative concepts of Vickrey outcomesand competitive equilibrium

C ldquoVacancy Chainrdquo Dynamics

Suppose that a labor market has reached equi-librium with all interested doctors placed

at hospitals in a stable match Then suppose onedoctor retires Imagine a process in which ahospital seeks to replace its retired doctor byraiding other hospitals to hire additional doc-tors If the hospital makes an offer that wouldsucceed in hiring a doctor away from anotherhospital the affected hospital has three optionsit may make an offer to another doctor (orseveral) improve the terms for its current doc-tor or leave the position vacant Suppose itmakes whatever contract offer would best serveits purposes

In models with a fixed number of positionsand no contracts this process in which doctorsand vacancies move from one hospital to an-other has been called vacancy chain dynamics(Blum et al 1997) Kelso and Crawford (1982)consider similar dynamics in the context of theirmodel

The formal results for our extended model aresimilar to those of the older theories Startingwith a stable collection of contracts X let XHbe the set of contracts that some doctor weaklyprefers to her current contract in X and letXD X (X XH) As in the proof ofTheorem 1 we have F(XD XH) (XD XH) andX XD XH

To study the dynamic adjustment that resultsfrom the retirement of doctor d we suppose theprocess starts from the initial state (XD(0)XH(0)) (XD XH) This means that the employ-ees start by considering only offers that are atleast as good as their current positions and thathospitals remember which employees have re-jected them in the past The doctorsrsquo rejectionfunction is changed by the retirement of doctord to RD where RD(X) RD(X) x XxD d that is in addition to the old rejec-tions all contract offers addressed to the retireddoctor are rejected

To synchronize the timing with our earliernotation let us imagine that hospitals makeoffers at round t 1 and doctors accept or rejectthem at round t Hospitals consider as poten-tially available the doctors in XH(t 1) X RD(XD(t 1)) and the doctors then reject all butthe best offers so the cumulative set of offersreceived is XD(t) X RH(XH(t 1)) Define

(11) FXD XH X RHXH X RDXD

8 A valuation function is additive if the value of any setof items is the sum of the separate values of the elementsSuch a function v is also described as ldquomodularrdquo Additivityis equivalent to the requirement that for all sets A and Bv(A B) 13 v(A B) v(A) 13 v(B)

922 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

If contracts are substitutes for the hospitalsthen F is isotone and since F(XD XH) (XDXH) it follows that F(XD XH) (XD XH)Then since (XD(0) XH(0)) (XD XH) we have(XD(1) XH(1)) F(XD(0) XH(0)) (XD(0)XH(0)) Iterating (XD(n) XH(n)) F(XD(n 1) XH(n 1)) (XD(n 1) XH(n 1)) thedoctors accumulate offers and the contracts thatare potentially available to the hospitals shrinkA fixed point is reached and by Theorem 1 itcorresponds to a stable collection of contracts

THEOREM 6 Suppose that contracts are sub-stitutes and that (XD XH) is a stable set ofcontracts Suppose that a doctor retires and thatthe ensuing adjustment process is described by(XD(0) XH(0)) (XD XH) and (XD(t) XH(t)) F(XD(t 1) XH(t 1)) Then the sequence(XD(t) XH(t)) converges to a stable collectionof contracts at which all the unretired doctorsare weakly better off and all the hospitals areweakly worse off than at the initial state (XDXH)9

The sequence of contract offers and jobmoves described by iterated applications of Fincludes possibly complex adjustments Hospi-tals that lose a doctor may seek several replace-ments Hospitals whose doctors receive contractoffers may retain those doctors by offering bet-ter terms or may hire a different doctor and laterrehire the original doctor at a new contract Allalong the way the doctors find themselveschoosing from more and better options and thehospitals find themselves marching down theirpreference lists by offering costlier terms pay-ing higher wages or making offers to otherdoctors whom they had earlier rejected

III Law of Aggregate Demand

We now introduce a second restriction onpreferences that allows us to prove the next tworesults about the structure of the set of stablematches We call this restriction the law ofaggregate demand Roughly this law states that

as the price falls agents should demand more ofa good Here price falls correspond to morecontracts being available and more demandcorresponds to taking on (weakly) more con-tracts We formalize this intuition with the fol-lowing definition

DEFINITION The preferences of hospital h H satisfy the law of aggregate demand if for allX X Ch(X) Ch(X)

According to this definition if the set ofpossible contracts expands (analogous to a de-crease in some doctorsrsquo wages) then the totalnumber of contracts chosen by hospital h eitherrises or stays the same The corresponding prop-erty for doctor preferences is implied by re-vealed preference because each doctor choosesat most one contract Just as for the substitutescondition when wages are endogenous we in-terpret the definition as applying to the domainof wage vectors for which the hospitalrsquos opti-mum is unique

The next theorem shows the important rela-tionship between profit maximization substi-tutes and the law of aggregate demand

THEOREM 7 If hospital hrsquos preferences arequasi-linear and satisfy the substitutes condi-tion then they satisfy the law of aggregatedemand

Below we use the law of aggregate demandto characterize both necessary and sufficientconditions for the rural hospitalsrsquo property andensure that truthful revelation is a dominantstrategy for the doctors Previously in matchingmodels without money the dominant strategyresult was known only for responsive prefer-ences with capacity constraints (Abdulkadiro-glu 2003) We subsume that result with ourtheorem

A Rural Hospitals Theorem

In the match between doctors and hospitalscertain rural hospitals often had trouble fillingall their positions raising the question ofwhether there are other core matches at whichthe rural hospitals might do better Roth (1986)analyzed this question for the case of X D

9 The theorem does not claim and it is not generally truethat this new point must be the new doctor-best stable set ofcontracts

923VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

H and responsive preferences and found thatthe answer is no every hospital that has unfilledpositions at some stable match is assigned ex-actly the same doctors at every stable match Inparticular every hospital hires the same numberof doctors at every stable match

In this section we show by an example thatthis last conclusion does not generalize to thefull set of environments in which contracts aresubstitutes10 We then prove that if preferencessatisfy the law of aggregate demand and substi-tutes then the last conclusion of Rothrsquos theoremholds every hospital signs exactly the samenumber of contracts at every point in the corealthough the doctors assigned and the terms ofemployment can vary Finally we show thatany violation of the law of aggregate demandimplies that preferences exist such that theabove conclusion does not hold

Suppose that H h1 h2 and D d1 d2d3 For hospital h1 suppose its choices maxi-mize where d3 d1 d2 d1 d2 A d1 d3 d2 d3 This prefer-ence satisfies substitutes11 Suppose h2 has oneposition with its preferences given by d1 d2 d3 A Finally suppose d1 and d2prefer h1 to h2 while d3 has the reverse prefer-ence Then the matches X (h1 d3) (h2 d1)and X (h1 d1) (h1 d2) (h2 d3) are bothstable but hospital h1 employs a different num-ber of doctors and the set of doctors assigneddiffers between the two matches

This example involves a failure of the law ofaggregate demand because as the set of con-tracts available to h1 expands by the addition of(h1 d3) to the set (h1 d1) (h1 d2) the numberof doctors demanded declines from two to oneWhen the law of aggregate demand holds how-ever we have the following result

THEOREM 8 If hospital preferences satisfysubstitutes and the law of aggregate demandthen for every stable allocation (XD XH) andevery d D and h H Cd(XD) Cd(X D)

and Ch(XH) Ch(X H) That is every doctorand hospital signs the same number of contractsat every stable collection of contracts

The next theorem verifies that the counterex-amples developed above can always be gener-alized whenever any hospitalrsquos preferencesviolate the law of aggregate demand

THEOREM 9 If there exists a hospital h setsX X X such that Ch(X) Ch(X) andat least one other hospital then there existsingleton preferences for the other hospitalsand doctors such that the number of doctorsemployed by h is different for two stablematches

Theorem 9 establishes that the law of aggre-gate demand is not only a sufficient conditionfor the rural hospitals result of Theorem 8 butin a particular sense a necessary one as well

B Truthful Revelation as a DominantStrategy

The main result of this section concerns doc-torsrsquo incentives to report their preferences truth-fully For the doctor-offering algorithm ifhospital preferences satisfy the law of aggregatedemand and the substitutes condition then it isdominant strategy for doctors to reveal truth-fully their preferences over contracts12 We fur-ther show that both preference conditions playessential roles in the conclusion

We will show the positive incentive result forthe doctor-offering algorithm in two stepswhich highlight the different roles of the twopreference assumptions First we show that thesubstitutes condition by itself guarantees thatdoctors cannot benefit by exaggerating the rank-ing of an unattainable contract More preciselyif there exists a preferences list for a doctor dsuch that d obtains contract x by submitting thislist then d can also obtain x by submitting apreference list that includes only contract xSecond we will show that adding the law of

10 A similar example appears in Ruth Martınez et al(2000)

11 These preferences however do not display the ldquosingleimprovement propertyrdquo that Gul and Stacchetti (1999) in-troduce and show is characteristic of substitutes preferencesin models with quasi-linear utility

12 It is of course not a dominant strategy for hospitals totruthfully reveal nor would it be so even if we consideredthe hospital-offering algorithm For further discussion ofthis point see Roth and Sotomayor (1990)

924 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

aggregate demand guarantees that a doctor doesat least as well as reporting truthfully as byreporting any singleton Together these are thedominant strategy result

To understand why submitting unattainedcontracts cannot help a doctor d consider thefollowing Let x be the most-preferred contractthat d can obtain by submitting any preferencelist (holding all other submitted preferencesfixed) Note that all that d accomplishes whenreporting that certain contracts are preferred to xis to make it easier for some coalition to blockoutcomes involving x Thus if x is attainablewith any report it is attainable with the reportPd x that ranks x as the only acceptable con-tract This intuition is captured in the followingtheorem

THEOREM 10 Let hospitalsrsquo preferences sat-isfy the substitutes condition and let the match-ing algorithm produce the doctor-optimalmatch Fixing the preferences of hospitals andof doctors besides d let x be the outcome that dobtains by reporting preferences Pd z1 dz2 d

d zn d x Then the outcome that dobtains by reporting preferences Pd x is also x

Some other doctors may be strictly better offwhen d submits her shorter preference list thereare fewer collections of contracts that d nowobjects to so the core may become larger andthe doctor-optimal point of the enlarged coremakes all doctors weakly better off and maymake some strictly better off

Without the law of aggregate demand how-ever it may still be in a doctorrsquos interest toconceal her preferences for unattainable posi-tions To see this consider the case with twohospitals and three doctors where contracts aresimply elements of D H and let preferences be

(12) Pd1 h1 h2

Ph1 d3 d1 d2 d1 d2

Pd2 h2 h1

Ph2 d1 d2 d3

Pd3 h2 h1

With these preferences the only stable matchis (d1 h2) (d3 h1) which leaves d2 unem-ployed However if d2 were to reverse herranking of the two hospitals then (d1 h1) (d2h1) (d3 h2) would be chosen by the doctor-offering algorithm leaving d2 better off Essen-tially by offering a contract to h2 d2 haschanged the number of positions availableWhen the preferences of the hospitals satisfythe law of aggregate demand however mak-ing more offers to the hospitals (weakly) in-creases the number of contracts the hospitalsaccept

THEOREM 11 Let hospitalsrsquo preferences sat-isfy substitutes and the law of aggregate de-mand and let the matching algorithm producethe doctor-optimal match Then fixing the pref-erences of the other doctors and of all thehospitals let x be the contract that d obtains bysubmitting the set of preferences Pd z1 dz2 d

d zn d x Then the preferences Pd y1 y2 yn x yn131 yN

obtain a contract that is Pd-preferred or indif-ferent to x

According to this theorem when a doctorrsquostrue preferences are Pd the doctor can never dobetter according to these true preferences thanby reporting the preferences truthfully

In fact the law of aggregate demand is ldquoal-mostrdquo a necessary condition as well The excep-tions can arise because certain violations of thelaw of aggregate demand are unobservable fromthe choice data of the algorithm and these can-not affect incentives Thus consider an examplewhere terms t are included in the contract andwhere a hospital h has preferences (d1 ht1) (d1 h t1) (d2 h t2) (d1 h t1) (d2 h t2) Although these preferences violatethe law of aggregate demand the algorithm willnever ldquoseerdquo the violation as either (d1 h t1) d1

(d1 h t1) or (d1 h t1) d1(d1 h t1) Thus

whichever terms that d1 first offers will deter-mine a conditional set of preferences for thehospital that does satisfy the law of aggregatedemand (The hospital will never reject an offerof either (d1 h t1) or (d1 h t1))

The next theorem says that if some hospitalrsquospreferences violate the law of aggregate demandin a way that can even potentially be observed

925VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

from the hospitalrsquos choices then there existpreferences for the other agents such that it isnot a dominant strategy for doctors to reporttruthfully even when the other assumptions wehave used are satisfied

THEOREM 12 Let hospital h have prefer-ences such that Ch(X) Ch(X x) and letthere exist two contracts y z such that yD zD xD yD and y z Rh(X x) Rh(X)Then if another hospital h exists there existsingleton preferences for the hospitals besides hand preferences for the doctors such that it isnot a dominant strategy for all doctors to revealtheir preferences truthfully

Thus to the extent that the law of aggregatedemand for hospital preferences has observableconsequences for the progress of the doctor-offering algorithm it is an indispensable condi-tion to ensure the dominant strategy property fordoctors

IV Classes of Conforming Preferences

Although the class of substitutes valuations isquite limited13 it is broader than the set ofresponsive preferences in useful ways Thesubstitutes valuations accommodate all the af-firmative action and subspecialty constraints de-scribed above and allow a doctorrsquos marginalproduct to depend on which other doctors thehospital attracts

In this section we introduce a parameterizedclass of quasi-linear substitutes valuations forhospitals evaluating sets of new hires The val-uations are based on an endowed assignmentmodel according to which hospitals have a set

of jobs to fill and an existing endowment ofdoctors while doctorsrsquo productivities varyamong jobs A hospital values new doctors ac-cording to the their incremental value in theassignment problem

From a general job assignment perspectivethe key restrictions of endowed assignment val-uations are that each doctor can do one and onlyone job and that the hospitalrsquos output is the sumof outputs of its various jobs A hospital cannotuse one doctor for two jobs nor can it combinethe skills of two doctors in the same job Alsothere is no interaction in the productivity ofdoctors in different jobs Given this mathemat-ical structure if a doctor is lost it will always beoptimal for the hospital to retain all of its otherdoctors although it may choose to reassignsome of the retained doctors to fill vacatedpositions

Another way to describe the set of endowedassignment valuations VEA is to build it upfrom three properties as follows First a sin-gleton valuation is one of the form v(S) maxdSd for some nonnegative vector Sin-gleton valuations represent the possible valua-tions by a hospital with just one opening andVEA includes all singleton valuations Second ifa hospital is composed of two units j 1 2each of which has a valuation vj VEA then thehospitalrsquos maximum value from assigningworkers between its units denoted by (v1 v2)(S) maxRSv1(R) 13 v2(S R) is also inthe set We call this property closure underaggregation Third if a hospitalrsquos value is de-rived from a value in VEA by endowing thehospital with a set of doctors T then the hospi-talrsquos incremental value for extra doctorsv(ST) v(S T) v(T) is also in the set VEAWe call this property closure under endowmentFinally two valuations v1 and v2 are calledequivalent if they differ by an additive con-stant For example for any fixed set of doctorsT v( T) is equivalent to v( T)

THEOREM 13 Let VEA denote the smallestfamily of valuations of sets of doctors that in-cludes all the singleton valuations and is closedunder aggregation and endowment Then foreach v VEA there exists a set of jobs J a setof doctors T and a (D 13 T) J-matrix [ij]such that v is equivalent to the following

13 Hans Reijnierse et al (2002) (see also Yuan-ChuanLien and Jun Yan 2003) have characterized the valuationfunctions that satisfy the substitutes condition as followsLet v(S) be the hospitalrsquos value of doctor set S and letvS(T) v(S T) v(S) denote the incremental value of theset of doctors T Then doctors are substitutes if for every setS and three other doctors d1 d2 and d3 there is no uniquemaximum in vS(d1) 13 vS(d2 d3) vS(d2) 13 vS(d1 d3)vS(d3) 13 vS(d1 d2)

926 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

(13) vSJ T maxz

d S

djzdj subject to

d S

zdj 1 for j J

j J

zdj 1 for d S T0 for d S T

zdj 0 1 for all d j

Conversely for every such J T and v( J T) VEA

We dub this family of valuations the endowedassignment valuations because of the form ofoptimization (13) The family VEA is an exten-sion of the assignment valuations derived byLloyd Shapley (1962) used by Roth (19841985b) in models of matching with wages andexplicit job assignments and emphasized in astudy of package bidding by Lehmann et al(2001) The endowed assignment valuations arequite useful for applications They also fit nicelywith the theory reported in previous sections forthe following reason

THEOREM 14 Every endowed assignmentvaluation v( J T) VEA is a substitutesvaluation

To the best of our knowledge all of thesubstitutes valuations that have been used orproposed for practical applications are includedamong the endowed assignment valuations In-deed the question of whether all substitutesvaluations are endowed assignment valuationsis an open one Here we review some of themost popular valuations to show how they fitinto the class

The most commonly studied class of prefer-ences for matching problems like the Match forwhich employment terms are exogenouslyfixed are the responsive preferences Thesespecify that each hospital h has a fixed numberof openings nh a set of acceptable doctors Dh

A D and a strict ordering h of the acceptabledoctors When a doctor is unacceptable thatmeans that hiring the doctor is always worsethan leaving her position unfilled Given any setof available doctors the hospital hires its nh

most preferred acceptable doctors if that manyare available and otherwise hires all of theacceptable doctors

To map responsive preferences into the as-signment problem framework define a utilityfunction uh D3 to represent h and set theminimum acceptable utility to zero Formally(1) if d d Dh

A then d h dN uh(d) uh(d)and (2) d Dh

AN uh(d) 0 Using this utilitywe specify an assignment problem as followsJ 1 nh and dj uh(d) 13 1 and fix thewage at 1 Using a positive wage is a device toensure that the hospital strictly prefers not tohire a doctor it plans not to assign to any job Itis evident that with this valuation preferencethe hospital most prefers to hire the set of avail-able acceptable doctors with the highest rank-ing according to h

Among the extensions of responsive prefer-ences that have been most important in practiceare ones to accommodate quotas of variouskinds For example one use of quotas is tomanage subspecialties of internal medicine inwhich a certain number of positions are to befilled by doctors planning that subspecialty ifenough acceptable doctors are available Onecan reserve ms jobs for subspecialty s by pro-viding that there are ms jobs in which doctors inthat subspecialty have their productivity in-creased by a large constant M Then if msdoctors in subspecialty s are available at leastthat many will be demanded at the optimalsolution to (13) If that many qualified doctorsare not available the jobs will be filled by otherdoctors according to their productivities

Another use of quotas is for an affirmativeaction policy that absolutely reserves jobs formembers of certain target groups For each af-firmative action group G define a correspond-ing set of jobs JG and let J G JG Specifythat for any doctor d G and job j JG dj uh(d) and otherwise dj 0 One can alsointroduce an unrestricted category of jobs j thatany doctor can fill with productivity dj uh(d) This obviously ensures that a certainnumber of jobs are reserved for each targetgroup

A recent treatment of affirmative action byRoth (1991) extended by Abdulkadiroglu(2003) uses the class of responsive preferenceswith capacity constraints This class requires

927VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

that the set of doctors be partitioned into a finitenumber of affirmative action groups and that foreach group G the hospital has a capacity mG thatlimits the number of doctors who can be hiredfrom that group In addition at most nh doctorsin total can be hired

To represent such preferences using endowedassignment valuations let us specify that thereare mG jobs of type G and yenG mG jobs in totalThe hospital is endowed with nh yenG mGdoctors The endowed doctors have productivityij M in every job where M is a largenumber This ensures that at most nh new doc-tors will be hired at any optimum For thenonendowed doctors we calculate productivi-ties uh(d) in the same fashion as for the respon-sive preferences and set dj uh(d) for jobs j oftype G and dj 0 for all other jobs Thisensures that at most mG doctors will be hiredfrom group G By inspection this specificationrepresents Abdulkadiroglursquos affirmative actionpreferences

Unlike the specifications used for the currentNational Resident Matching Program algo-rithm the endowed assignment valuations per-mit overlapping affirmative action categoriesFor example suppose that a small hospital has atarget of hiring one female and one minoritydoctor In the endowed assignment structurethe hospital may assign a minority female doc-tor to fill either a minority slot or a female slotbut not both This is necessary to retain thesubstitutes demand structure for otherwisemaking a minority female doctor availablecould lead the hospital to hire a nonminoritymale doctor whom it would otherwise reject

Endowed assignment valuations thus providea flexible parameterized way for hospitals torepresent their preferences for matching with orwithout wages using a class of quasi-linear pref-erences that satisfies the substitutes conditionand the law of aggregate demand

V Cumulative Offer Processes and Auctions

The algorithms described by the system (9)with different starting points have the propertythat they can terminate only at a stable set ofcontracts Nevertheless unless preferences sat-isfy the substitutes condition the system is notguaranteed to converge at all even when a fixed

point exists In this section we offer a differentcharacterization of the Gale-Shapley doctor-offering algorithm that will prove especiallywell suited to situations in which contracts maynot be substitutes but in which there is just oneldquohospitalrdquo the auctioneer For now we allowthe possibility that there are several hospitals

The alternative representation is constructedby replacing the system of equations (9) by thefollowing system

(14) XD t X RH XH t 1

XH t XH t 1 CD XD t

We call the algorithm that begins with XD(0) X and XH(0) A and obeys (14) a cumulativeoffer process because the formalism capturesthe idea that hospitals accumulate offers fromdoctors in the set XH(t) and hold their bestchoices CH(XH(t)) from the accumulated setThere is no assumption of consistency imposedon the algorithm so it is possible that severalhospitals are ldquoholdingrdquo contract offers from thesame doctor The corresponding allocation is ofcourse infeasible since each doctor can ulti-mately accept just one contract

At each round t of the cumulative offer pro-cess all doctors make their best offers from theset of not-yet-rejected choices XD(t) but anydoctor d for whom a contract is being heldsimply repeats one of its earlier offers Thusnew offers are made only by doctors who havebeen rejected

To see why this is so let x CH(XH(t)) be acontract that is being held and consider thecorresponding doctor xD d By revealed pref-erence doctor d strictly prefers x to any contractthat she has not yet offered since those con-tracts were available to offer at the time that xwas offered Since drsquos most preferred contractin Xd(t) at the current time must be weaklypreferred to x it must be coincide with one ofdrsquos earlier offers

The second equation of system (14) is the onethat distinguishes the cumulative offer processfrom the system in (9) In the cumulative offerprocess without any assumptions about hospi-talsrsquo preferences XH(t) grows monotonicallyfrom round to round so the sequence of setsconverges In contrast the earlier process was

928 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

guaranteed to converge only when contracts aresubstitutes for the hospitals

When contracts are substitutes the two sys-tems of equations are equivalent

THEOREM 15 Suppose that contracts aresubstitutes for the hospitals and that XD(0) Xand XH(0) A Then the sequences of pairs(XD(t) XH(t)) generated by the two laws ofmotion (9) and (14) are identical

Even with the initial condition XD(0) X andXH(0) A the algorithms described by (9) and(14) may differ when contracts are not substi-tutes In that case by inspection of the system(14) the cumulative offer process still con-verges because XH(t) is bounded by the finiteset X and grows monotonically from round toround What is at issue is whether the hospitalrsquoschoice from its final search set in the cumulativeoffer process is a feasible and stable set ofcontracts

We will find below that when there is a singlehospital the outcome is indeed a feasible andstable set of contracts In that case the cumu-lative offer process coincides with the general-ized proxy auction of Ausubel and Milgrom(2002) Those authors analyze in detail the casewhen a bid consists of a price and a subset of theset of goods that the bidder wishes to buy Ateach round the seller ldquoholdsrdquo the collection ofbids that maximizes its total revenues subject tothe constraint that each good can be sold onlyonce The generalized proxy auction howeveris not limited to the sale of goods and in fact isidentical in scope to our present model ofmatching with contracts In particular the auc-tioneer may impose a variety of constraints onthe feasible collections of bids and may weighnonprice factors either exclusively or in com-bination with prices to decide which collectionof bids to hold Bidders for their part maymake bids that include factors besides price andmay not include price at all

To illustrate the role of general contracts inthis auction setting consider the auction designsuggested by Paul Brewer and Charles Plott(1996) in which bidders seek to buy access to arailroad track In that application a bid specifiesa trainrsquos direction of travel departure and ar-rival times and price offered It is assumed that

trains travel at a uniform speed along the trackIn this setting the contract terms must includethe direction and the two times and the seller isconstrained to hold only combinations of bidssuch that trains maintain safe distances fromone another at all times

A second example of the generalized proxyprocess is a procurement auction in which thebuyer scores suppliers on the basis of suchfactors as quality excess capacity credit ratingand historical reliability as well as price and inwhich the buyer prefers to set aside someamount of its purchase for minority contractorsor to maintain geographic diversity of supply toreduce the chance of supply disruptions In anasset sale the seller may weigh the probabilitythat the sale will be completed for example dueto financing contingencies or because a union orantitrust regulators must approve the sale

The cumulative offer process model withgeneral contracts accommodates all of thesepossibilities The auctioneer in the model cor-responds to a single ldquohospitalrdquomdashhereafter theauctioneermdashwith a choice function CH thatselects her most preferred collection of contractproposals We have the following result (whichis first stated using different notation than in theAusubel-Milgrom paper)

THEOREM 16 When the doctor-offering cu-mulative offer process with a single hospitalterminates at time t with outcome (XD(t) XH(t))the hospitalrsquos choice CH(XH(t)) is a stable col-lection of contracts

Cumulative offer processes connect the the-ory of matching with contracts to the emergingtheory of package auctions and auctions withcomplex constraints

VI Conclusion

We have introduced a general model ofmatching with bilateral contracts that encom-passes and extends two-sided matching modelswith and without money and certain auctionmodels The new formulation allows some con-tract terms to be exogenously fixed and others tobe endogenous in any combinations In thisvery general framework we characterize stable

929VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

collections of contracts in terms of the solutionto a certain system of equations

The key to the analysis is to extend twoconcepts of demand theory to models with orwithout prices The first concept to be extendedis the notion of substitutes Our definition ap-plies essentially the Roth-Sotomayor substitut-able preferences condition to a more generalclass of contracts contracts are substitutes ifwhenever the set of feasible bilateral contractsexpands the set of contracts that the firm rejectsalso expands We show that (a) our definitioncoincides with the usual demand theory condi-tion when both apply (b) when contracts aresubstitutes a stable collection of contracts ex-ists and (c) if any hospital or firm has prefer-ences that are not substitutes then there arepreferences with single openings for each otherfirm such that no stable allocation exists Wefurther show that when the substitute conditionapplies (a) both the doctor-offering and hospi-tal-offering Gale-Shapley algorithms can berepresented as iterated operations of the sameoperator (starting from different initial condi-tions) and (b) starting at a stable allocationfrom which a doctor retires a natural marketdynamic mimics the Gale-Shapley process tofind a new stable allocation

The second relevant demand theory conceptis the law of demand which we extend both toinclude heterogeneous inputs and to encompassmodels with or without prices The law of ag-gregate demand condition holds that when theset of feasible contracts expands the number ofcontracts that the firm chooses to sign weaklyincreases In terms of traditional demand theorythis means that for example when the wages ofsome of a heterogeneous group of workers fallsif the workers are substitutes then the totalnumber of workers employed rises We showthat (a) when inputs are substitutes the choicesof a profit-maximizing firmhospital satisfy thelaw of aggregate demand Moreover when thechoices of every hospitalfirm satisfy the law ofaggregate demand and the substitutes conditionthen (b) the set of workersdoctors employed isthe same at every stable allocation (c) the num-ber employed by each firmhospital is also thesame and (d) truthful reporting is a dominantstrategy for doctors in the doctor-offering algo-rithm Moreover we prove (e) that if the law of

aggregate demand fails in any potentially ob-servable way then the preceding dominantstrategy property does not hold

For these results to be useful for practicalmechanism design one needs to account forhow preferences especially hospital prefer-ences are to be reported to the mechanismThere needs to be a convenient way for hospi-tals to express a rich array of preferences andone needs to know whether the preferences be-ing reported actually satisfy the conditions ofthe various theorems Toward that end we in-troduce a parametric form that we call extendedassignment valuations which strictly general-izes several existing specifications and whichalways satisfies both the substitutes and law ofaggregate demand conditions

Finally we introduce an alternative treatmentof the doctor-offering algorithm the cumulativeoffer process We show that when contracts aresubstitutes the previously characterized doctor-offering algorithm coincides exactly with a cu-mulative offer process When contracts are notsubstitutes but there is just one hospital (theldquoauctioneerrdquo) the cumulative offer process co-incides with the Ausubel-Milgrom ascendingproxy auction This identity clarifies the con-nection between these algorithms and com-bined with the dominant strategy theoremreported above generalizes the Ausubel-Milgromdominant strategy theorem for the proxyauctions

Our new approach reveals deep similaritiesamong several of the most successful auctionand matching designs in current use and amongthe environmental conditions in which theoret-ically the mechanisms should perform at theirbest Understanding these similarities can helpus to understand the limitations of these mech-anisms paving the way for new designs

APPENDIX

PROOF OF THEOREM 1Let (XD XH) X2 be a solution to (3) Then

XD XH XD RD(XD) CD(XD) andsimilarly XH XD XH RH(XH) CH(XH)so XH XD CH(XH) CD(XD)

Next we show that X XH XD is a stableset of contracts Since X CH(XH) CD(XD)it follows by revealed preference that X

930 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

CH(X) CD(X) so condition (i) of the defi-nition of stability is satisfied

Consider any hospital h and set of contractsX CD(X X) naming hospital h Since X CD(XD) revealed preference of the doctorsimplies that X XD CD(XD) and hence thatX RD(XD) X XD RD(XD) CD(XD) RD(XD) A Thus X X RD(XD) XHby (3) So if X Ch(X) then by the revealedpreference of hospital h X h Ch(XH) Ch(X) Hence X Ch(X X) so condition(ii) is satisfied So the set of contracts X isunblocked

For the converse suppose that X is a stablecollection of contracts Then CD(X) X LetXH be the set of contracts that the doctorsweakly prefer to X and XD the set of contractsthat doctors weakly disprefer By constructionX XH X XD X is a partition of X

To obtain (3) observe first that if there issome h such that Ch(XH) Xh then X Ch(XH) violates stability condition (ii) SoCh(XH) Xh for all h that is CH(XH) X Itfollows that X RH(XH) X (XH X) X (X XD) XD and that X RD(XD) X (XD CD(XD)) X (XD X) XH

Hence (XD XH) satisfies (3) and XH XD X

PROOF OF THEOREM 2Let i j ( j wj) C(w) and wi wi Define

Z(w) ( j wj)wj wj Then Z(wi wi) Z(w) If contracts are substitutes then R(Z(wiwi)) R(Z(w)) By (6) since ( j wj) C(w)it follows that ( j wj) C(Z(w)) so ( j wj) R(Z(w)) Hence ( j wj) R(Z(wi wi)) So ( jwj) Z(wi wi) R(Z(wi wi)) C(Z(wiwi)) and thus (j wj) C(wi wi) by assumption(6) Thus C satisfies demand theory substitutes

Conversely suppose contracts are not substi-tutes Then there exists a set X an element (iwi) X and ( j wj) R(X) such that ( j wj) R(X) where X X (i wi) Using (6)wi Wi(X) Let w W(X) and wi Wi(X)Then wi wi and ( j wj) C(w) but ( j wj) C(wi wi) so C does not satisfy the demandtheory substitutes condition

PROOF OF THEOREM 5We may limit attention to the case with

exactly two hospitals by specifying that

the doctors find the other hospitals to beunacceptable

Suppose Rh is not isotone Then there existssome x y X and X X such that for all x X xH h and such that x Rh(X) Rh(X y) By construction since x y Ch(X y) contracts x and y specify different doctorssay d1 xD yD d2 Let x and y denote thecorresponding contracts for doctors d1 and d2 inwhich hospital h is substituted for h

We specify preferences as follows first forhospital h we take x h y h A and allother contracts are unacceptable Second doc-tors in xD(CH(X) CH(X y)) d1 d2prefer their elements of CH(X) CH(X y)to any other contract Third d1 has x d1

x and ranks all other contracts lower Fourthd2 has y d2

y and ranks all other con-tracts lower Finally the remaining doctors findall contracts from hospitals h and h to beunacceptable

Consider a feasible acceptable allocation Xsuch that y X Since h and d2 can have onlyone contract in X x y X Then hrsquos con-tracts in X form a subset of X so x is notincluded and d1 has a contract less preferredthan x Then the deviation by (d1 h) to xblocks X

Consider a feasible acceptable allocation Xsuch that y X Then either x y X or Xis blocked by a coalition including h d1 and d2using the contracts x and y However if x y X then a deviation by (d2 h) to contract yblocks X

Since all feasible allocations are blockedthere exists no stable set of contracts

PROOF OF THEOREM 7Suppose X D H W and let Z(w) ( j

wj)wj wj Then the law of aggregate de-mand is the statement that for any wage vectorsw w satisfying w w such that the choices setsare singletons C(Z(w)) C(Z(w)) The proofis by contradiction Suppose the law of aggre-gate demand does not hold Then there exists awage vector w and a doctor d such that for some(and hence all) 0 C(Z(wd 13 wd)) C(Z(wd wd)) Since hrsquos preferences arequasi-linear changing doctor drsquos wage can af-fect the hiring of other doctors only if it affectsthe hiring of doctor d It follows that there are

931VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

exactly two optimal choices for the hospital atwage vector w these are C(Z(wd wd)) atwhich doctor d is hired and C(Z(wd 13 wd))at which d is not hired but such that two otherdoctors are hired that is there exist doctors dd C(Z(wd 13 wd)) C(Z(wd wd))Let the corresponding payoff for the hospital(when faced with wage vector w) be

Consider the wage vector w (wd wd 2 wdd) For positive and suffi-ciently small the hospitalrsquos payoff at wage vec-tor w is 13 2 if it chooses C(Z(wd 13 wd))and it is 13 if it chooses C(Z(wd wd))and one of these choices must be optimal SoC(w) C(Z(wd 13 wd)) But then raisingthe wage of doctor d from wd 2 to wd whileholding the other wages at wd reduces the de-mand for doctor d from one to zero in violationof the demand theory substitutes condition

PROOF OF THEOREM 8By definition XD X D so by revealed pref-

erence Cd(X D) Cd(XD) Also X H XH soby the law of aggregate demand Ch(X H) Ch(XH) By Theorem 1 CD(XD) CH(XH)and CD(X D) CH(X H) so yendD Cd(XD) yenhH Ch(XH) and yendD Cd(XD) yenhH Ch(XH)Combining these leads to yendD Cd(X D) yendD Cd(XD) yenhH Ch(XH) yenhH Ch(XH) yendD Cd(XD) which begins and ends with the samesum Hence none of the inequalities can bestrict

PROOF OF THEOREM 9Since Ch(X) Ch(X) there exists some

set Y X Y X and contract x such thatCh(Y) Ch(Y x) Since x Ch(Y x)(as otherwise Ch(Y) Ch(Y x) for thepreferences to be rationalizable) there must ex-ist two contracts y z Rh(Y x) Rh(Y)such that y x z y Moreover since y z Ch(Y) yD zD

Denoting by h the second hospital whose exis-tence is hypothesized by the theorem we specifypreferences as follows Let all the doctors with con-tracts in Y have those contracts be their most favoredand let all other doctors find any contract with hunacceptable Let all doctors find any contract notinvolving hospital h or h to be unacceptable

In principle there are three casesIf xD yD then let PxD

y x and PzD z

Then there exist two stable matches Ch(Y x) and Ch(Y) with zD employed in the firstmatch but not in the second

The case xD zD is symmetricFinally if yD xD zD then let x y z

denote contracts with hospital h where the doc-tors (and any other terms) are the same as in xy z respectively Specify the remaining prefer-ences by PxD

x x PyD y y PzD

z z and Ph y x A z Thenthere exist two different stable matches x Ch(Y) and y Ch(Y x) with zD em-ployed in the first match but not in the second

PROOF OF THEOREM 10Let X denote the collection of contracts cho-

sen by the algorithm when doctor d submitspreference Pd If this collection which is stableunder the reported preferences is not stableunder Pd then there exists a blocking coalitionThis blocking coalition must contain d as noother doctorrsquos preferences have changed butthat is impossible since x is drsquos favorite con-tract according to the preferences Pd Since X isstable under Pd the doctor-optimal stable matchunder Pd (the existence of which is guaranteedby Theorem 2) must make every doctor(weakly) better off than at X In particulardoctor d must obtain x

PROOF OF THEOREM 11From Theorem 10 Pd x also obtains x

Hence by the rural hospitals theorem d is em-ployed at every point in the core when Pd x issubmitted So every allocation X at which d isunemployed is blocked by some coalition andset of contracts when d submits Pd Conse-quently if d submits the preferences Pd y1 y2 yn x then every allocation at whichd is unemployed is still blocked by the samecoalition and set of contracts Since the doctor-best stable allocation is one at which d gets aPd-acceptable contract that allocation is weaklyPd-preferred to x Finally the doctor-optimalmatch when Pd is submitted is still the doctor-optimal match when Pd is submitted as drsquospreferences over contracts less preferred than xcannot be used to block a match where shereceives a contract weakly preferred to x

932 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

PROOF OF THEOREM 12Consider contracts x y and z such that

xD xD yD yD zD zD and xH yH zH h Let the preferences of the three identified bePxD

x x PyD y y and PzD

z z andlet those of h be Ph y z x Forthe other contracts x Y Ch(X) let x be xDrsquosmost favored contract For the remaining doctorslet any contract with h or h be unacceptable

With the preceding preferences the only sta-ble allocation includes contracts x and y leav-ing doctor zD unemployed If however zDmisrepresents her preferences and reports PzD

z z then the doctor-optimal stable matchincludes z leaving doctor zD better off

PROOF OF THEOREM 13Setting J 1 and T A it is clear by

inspection that this family includes all singletonvaluations

The family is closed under endowment be-cause given any such valuation v( J T)endowing a set of doctors T simply creates thevaluation v( J T T))

To verify that the family is closed underaggregation consider any two valuations v( J T) and v( J T) Since J and T are justindex sets we may assume without loss ofgenerality that T T J J A DefineT T T and J J J Let

(15) ij ij if i D T j Jij if i D T j J0 otherwise

By inspection of the optimization problems v( J T) v( J T) v( J T)

For the converse consider the valuation v( J T) given by (13) We derive it construc-tively from the singleton valuations aggrega-tion and endowment as follows Let vj be thesingleton valuation associated with row j inmatrix [ij] for j 1 J Since VEA isclosed under aggregation v1 vJ v( J A) VEA Since VEA is also closed underendowment we may endow the doctors in T toobtain v( J T) VEA

PROOF OF THEOREM 14L Shapley (1962) (see also Lehmann et al

2001) had already proved that every assignment

valuation without endowments v( J A) is asubstitutes valuation Ausubel and Milgrom(2002) prove that a valuation v is a substitutesvaluation if and only if the corresponding indi-rect profit function ((p) v(S) yendS pd) issubmodular Let be the indirect profit func-tion corresponding to v( J A) Then theindirect profit function corresponding to v( J T) is (p1 pN) (p1 pN 0 0)Since is the profit function of the substitutesvaluation vh it is submodular and hence issubmodular as well

PROOF OF THEOREM 15Suppose that contracts are substitutes for the

hospitals We proceed by induction The initialcondition specifies that the sequences are iden-tical through time t 0 Denote the sequencecorresponding to the cumulative offer processby a superscript C and denote the alternativeprocess defined by (9) with no superscript As-sume the inductive hypothesis that the se-quences are the same up to round t 1 andsuppress the corresponding superscripts for thevalues at that round Then XD(t) X RH(XH(t 1)) XD

C(t) This also implies that

(16) X XH t 1 XD t

To complete the proof we must show thatXH

C(t) XH(t) or equivalently that XH(t 1) CD(XD(t)) X RD(XD(t))

For t 2 XHC(t 2) XH

C(t 1) by con-struction so by the inductive hypothesis XH(t 2) XH(t 1) Since contracts are substitutesRH is isotone so X RH(XH(t 1)) X RH(XH(t 2)) and hence XD(t) XD(t 1)For t 1 the inclusion XD(t) XD(t 1) isimplied by the initial condition XD(0) X

Recall that by revealed preference RD isisotone It follows that RD(XD(t)) RD(XD(t 1)) and hence using (9) that XH(t 1) X RD(XD(t 1)) X RD(XD(t)) XH(t) ThusXH(t 1) XH(t 1) (X RD(XD(t))) XH(t 1) RD(XD(t)) So XH(t 1) CD(XD(t)) XH(t 1) (XD(t) RD(XD(t))) (XH(t 1) RD(XD(t))) (XD(t) RD(XD(t))) (XH(t 1) XD(t)) RD(XD(t)) X RD(XD(t)) where the last stepequality follows from (16)

933VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

PROOF OF THEOREM 16By construction any contract not in XH(t) is

less preferred by some doctor d than everycorresponding contract in XH(t) (because doctord offers her most preferred contracts in se-quence) So any collection of contracts thatincludes some not in XH(t) must be strictly lesspreferred by one of the doctors Any profitablecoalitional deviation must use only contracts inXH(t)

By construction the one hospitalauctioneermust be part of any deviating coalition andCH(XH(t)) is its strictly most preferred collectionof contracts in XH(t) so there is no profitablecoalitional deviation using just contracts in XH(t)

REFERENCES

Abdulkadiroglu Atila ldquoCollege Admissionswith Affirmative Actionrdquo Unpublished Pa-per 2003

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoBoston Public School MatchingrdquoAmerican Economic Review 2005a (Papersand Proceedings) 95(2) pp 368ndash71

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoThe New York City High SchoolMatchrdquo American Economic Review 2005b(Papers and Proceedings) 95(2) pp 364ndash67

Abdulkadiroglu Atila and Sonmez TayfunldquoSchool Choice A Mechanism Design Ap-proachrdquo American Economic Review 200393(3) pp 729ndash47

Adachi Hiroyuki ldquoOn a Characterization of Sta-ble Matchingsrdquo Economics Letters 200068(1) pp 43ndash49

Alkan Ahmet and Gale David ldquoStable ScheduleMatching under Revealed Preferencerdquo Jour-nal of Economic Theory 2003 112(2) pp289ndash306

Ausubel Lawrence M Cramton Peter and Mil-grom Paul R ldquoThe Clock-Poxy Auction APractical Combinatorial Auction Designrdquo inPeter Cramton Yoav Shoham and RichardSteinberg eds Combinatorial auctionsCambridge MA MIT Press 2005 ch 5

Ausubel Lawrence M and Milgrom Paul RldquoAscending Auctions with Package Bid-dingrdquo Frontiers of Theoretical Economics2002 1(1) Article 1

Blum Yosef Roth Alvin E and Rothblum UrielG ldquoVacancy Chains and Equilibration in Se-nior-Level Labor Marketsrdquo Journal of Eco-nomic Theory 1997 76(2) pp 362ndash411

Brewer Paul J and Plott Charles R ldquoA BinaryConflict Ascending Price (Bicap) Mechanismfor the Decentralized Allocation of the Rightto Use Railroad Tracksrdquo International Jour-nal of Industrial Organization 1996 14(6)pp 857ndash86

Bulow Jeremy and Levin Jonathan ldquoMatchingand Price Competitionrdquo Stanford UniversityStanford Economics Working Paper No1818 2003

Cramton Peter Shoham Yoav and SteinbergRichard Combinatorial auctions Cam-bridge MA MIT Press (forthcoming)

Crawford Vincent P and Knoer Elsie M ldquoJobMatching with Heterogeneous Firms andWorkersrdquo Econometrica 1981 49(2) pp437ndash50

Demange Gabrielle and Gale David ldquoThe Strat-egy Structure of Two-Sided Matching Mar-ketsrdquo Econometrica 1985 53(4) pp 873ndash88

Dubins Lester and Freedman David ldquoMachia-velli and the Gale-Shapley Algorithmrdquo Na-val Research Logistics Quarterly 198188(7) pp 485ndash94

Echenique Federico and Oviedo Jorge ldquoCoreMany-to-One Matchings by Fixed-PointMethodsrdquo Journal of Economic Theory2004 115(2) pp 358ndash76

Fleiner Tamas ldquoA Fixed-Point Approach toStable Matchings and Some ApplicationsrdquoMathematics of Operations Research 200328(1) pp 103ndash26

Gale David and Shapley Lloyd ldquoCollege Ad-missions and the Stability of MarriagerdquoAmerican Mathematical Monthly 196269(1) pp 9ndash15

Gul Faruk and Stacchetti Ennio ldquoWalrasianEquilibrium with Gross Substitutesrdquo Journalof Economic Theory 1999 87(1) pp 95ndash124

Kelso Alexander and Crawford Vincent P ldquoJobMatching Coalition Formation and GrossSubstitutesrdquo Econometrica 1982 50(6) pp1483ndash504

Lehmann Benny Lehmann Daniel and NisanNoam ldquoCombinatorial Auctions with De-

934 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

creasing Marginal Utilityrdquo Games and Eco-nomic Behavior 2005 (forthcoming)

Lien Yuan-Chuan and Yan Jun ldquoOn the GrossSubstitutes Conditionrdquo Unpublished Paper2003 httpwwwstamfordeduyclienTerm_Paper_Lien_Yanpdf

Martınez Ruth Masso Jordi Neme Alejandroand Oviedo Jorge ldquoSingle Agents and the Setof Many-to-One Stable Matchingsrdquo Journalof Economic Theory 2000 91(1) pp 91ndash105

Milgrom Paul R Putting auction theory towork Cambridge Cambridge UniversityPress 2004

Milgrom Paul R ldquoPutting Auction Theory toWork The Simultaneous Ascending Auc-tionrdquo Journal of Political Economy 2000108(2) pp 245ndash72

Porter David Rassenti Stephen RoopnarineAnil and Smith Vernon ldquoCombinatorial Auc-tion Designrdquo Proceedings of the NationalAcademy of Sciences 2003 100(19) pp11153ndash57

Reijnierse Hans van Gellekom Anita and PottersJos A M ldquoVerifying Gross SubstitutabilityrdquoEconomic Theory 2002 20(4) pp 767ndash76

Roth Alvin E ldquoThe Economics of Matching Sta-bility and Incentivesrdquo Mathematics of Opera-tions Research 1982 7(4) pp 617ndash28

Roth Alvin E ldquoStability and Polarization ofInterests in Job Matchingrdquo Econometrica1984 52(1) pp 47ndash57

Roth Alvin E ldquoThe College Admissions Prob-lem Is Not Equivalent to the Marriage Prob-lemrdquo Journal of Economic Theory 1985a36(2) pp 277ndash88

Roth Alvin E ldquoConflict and Coincidence ofInterest in Job Matching Some New Resultsand Open Questionsrdquo Mathematics of Oper-ations Research 1985b 10(3) pp 379ndash89

Roth Alvin E ldquoOn the Allocation of Residentsto Rural Hospitals A General Property ofTwo-Sided Matching Marketsrdquo Economet-rica 1986 54(2) pp 425ndash27

Roth Alvin E ldquoA Natural Experiment in theOrganization of Entry-Level Labor MarketsRegional Markets for New Physicians andSurgeons in the United Kingdomrdquo AmericanEconomic Review 1991 81(3) pp 415ndash40

Roth Alvin E and Peranson Elliott ldquoThe Rede-sign of the Matching Market for AmericanPhysicians Some Engineering Aspects ofEconomic Designrdquo American Economic Re-view 1999 89(4) pp 748ndash80

Roth Alvin E and Sotomayor Marilda Two-sided matching A study in game-theoreticmodeling and analysis Cambridge Cam-bridge University Press 1990

Sen Amartya Collective choice and social wel-fare San Francisco Holden-Day Inc 1970

Shapley Lloyd ldquoComplements and Substitutesin the Optimal Assignment Problemrdquo NavalResearch Logistics Quarterly 1962 9(1) pp45ndash48

935VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

Page 11: Matching with Contracts - Stanford Universityweb.stanford.edu/~milgrom/publishedarticles/Matching with... · 2005. 10. 22. · Gale-Shapley matching algorithm. Hence, the Gale-Shapley

If contracts are substitutes for the hospitalsthen F is isotone and since F(XD XH) (XDXH) it follows that F(XD XH) (XD XH)Then since (XD(0) XH(0)) (XD XH) we have(XD(1) XH(1)) F(XD(0) XH(0)) (XD(0)XH(0)) Iterating (XD(n) XH(n)) F(XD(n 1) XH(n 1)) (XD(n 1) XH(n 1)) thedoctors accumulate offers and the contracts thatare potentially available to the hospitals shrinkA fixed point is reached and by Theorem 1 itcorresponds to a stable collection of contracts

THEOREM 6 Suppose that contracts are sub-stitutes and that (XD XH) is a stable set ofcontracts Suppose that a doctor retires and thatthe ensuing adjustment process is described by(XD(0) XH(0)) (XD XH) and (XD(t) XH(t)) F(XD(t 1) XH(t 1)) Then the sequence(XD(t) XH(t)) converges to a stable collectionof contracts at which all the unretired doctorsare weakly better off and all the hospitals areweakly worse off than at the initial state (XDXH)9

The sequence of contract offers and jobmoves described by iterated applications of Fincludes possibly complex adjustments Hospi-tals that lose a doctor may seek several replace-ments Hospitals whose doctors receive contractoffers may retain those doctors by offering bet-ter terms or may hire a different doctor and laterrehire the original doctor at a new contract Allalong the way the doctors find themselveschoosing from more and better options and thehospitals find themselves marching down theirpreference lists by offering costlier terms pay-ing higher wages or making offers to otherdoctors whom they had earlier rejected

III Law of Aggregate Demand

We now introduce a second restriction onpreferences that allows us to prove the next tworesults about the structure of the set of stablematches We call this restriction the law ofaggregate demand Roughly this law states that

as the price falls agents should demand more ofa good Here price falls correspond to morecontracts being available and more demandcorresponds to taking on (weakly) more con-tracts We formalize this intuition with the fol-lowing definition

DEFINITION The preferences of hospital h H satisfy the law of aggregate demand if for allX X Ch(X) Ch(X)

According to this definition if the set ofpossible contracts expands (analogous to a de-crease in some doctorsrsquo wages) then the totalnumber of contracts chosen by hospital h eitherrises or stays the same The corresponding prop-erty for doctor preferences is implied by re-vealed preference because each doctor choosesat most one contract Just as for the substitutescondition when wages are endogenous we in-terpret the definition as applying to the domainof wage vectors for which the hospitalrsquos opti-mum is unique

The next theorem shows the important rela-tionship between profit maximization substi-tutes and the law of aggregate demand

THEOREM 7 If hospital hrsquos preferences arequasi-linear and satisfy the substitutes condi-tion then they satisfy the law of aggregatedemand

Below we use the law of aggregate demandto characterize both necessary and sufficientconditions for the rural hospitalsrsquo property andensure that truthful revelation is a dominantstrategy for the doctors Previously in matchingmodels without money the dominant strategyresult was known only for responsive prefer-ences with capacity constraints (Abdulkadiro-glu 2003) We subsume that result with ourtheorem

A Rural Hospitals Theorem

In the match between doctors and hospitalscertain rural hospitals often had trouble fillingall their positions raising the question ofwhether there are other core matches at whichthe rural hospitals might do better Roth (1986)analyzed this question for the case of X D

9 The theorem does not claim and it is not generally truethat this new point must be the new doctor-best stable set ofcontracts

923VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

H and responsive preferences and found thatthe answer is no every hospital that has unfilledpositions at some stable match is assigned ex-actly the same doctors at every stable match Inparticular every hospital hires the same numberof doctors at every stable match

In this section we show by an example thatthis last conclusion does not generalize to thefull set of environments in which contracts aresubstitutes10 We then prove that if preferencessatisfy the law of aggregate demand and substi-tutes then the last conclusion of Rothrsquos theoremholds every hospital signs exactly the samenumber of contracts at every point in the corealthough the doctors assigned and the terms ofemployment can vary Finally we show thatany violation of the law of aggregate demandimplies that preferences exist such that theabove conclusion does not hold

Suppose that H h1 h2 and D d1 d2d3 For hospital h1 suppose its choices maxi-mize where d3 d1 d2 d1 d2 A d1 d3 d2 d3 This prefer-ence satisfies substitutes11 Suppose h2 has oneposition with its preferences given by d1 d2 d3 A Finally suppose d1 and d2prefer h1 to h2 while d3 has the reverse prefer-ence Then the matches X (h1 d3) (h2 d1)and X (h1 d1) (h1 d2) (h2 d3) are bothstable but hospital h1 employs a different num-ber of doctors and the set of doctors assigneddiffers between the two matches

This example involves a failure of the law ofaggregate demand because as the set of con-tracts available to h1 expands by the addition of(h1 d3) to the set (h1 d1) (h1 d2) the numberof doctors demanded declines from two to oneWhen the law of aggregate demand holds how-ever we have the following result

THEOREM 8 If hospital preferences satisfysubstitutes and the law of aggregate demandthen for every stable allocation (XD XH) andevery d D and h H Cd(XD) Cd(X D)

and Ch(XH) Ch(X H) That is every doctorand hospital signs the same number of contractsat every stable collection of contracts

The next theorem verifies that the counterex-amples developed above can always be gener-alized whenever any hospitalrsquos preferencesviolate the law of aggregate demand

THEOREM 9 If there exists a hospital h setsX X X such that Ch(X) Ch(X) andat least one other hospital then there existsingleton preferences for the other hospitalsand doctors such that the number of doctorsemployed by h is different for two stablematches

Theorem 9 establishes that the law of aggre-gate demand is not only a sufficient conditionfor the rural hospitals result of Theorem 8 butin a particular sense a necessary one as well

B Truthful Revelation as a DominantStrategy

The main result of this section concerns doc-torsrsquo incentives to report their preferences truth-fully For the doctor-offering algorithm ifhospital preferences satisfy the law of aggregatedemand and the substitutes condition then it isdominant strategy for doctors to reveal truth-fully their preferences over contracts12 We fur-ther show that both preference conditions playessential roles in the conclusion

We will show the positive incentive result forthe doctor-offering algorithm in two stepswhich highlight the different roles of the twopreference assumptions First we show that thesubstitutes condition by itself guarantees thatdoctors cannot benefit by exaggerating the rank-ing of an unattainable contract More preciselyif there exists a preferences list for a doctor dsuch that d obtains contract x by submitting thislist then d can also obtain x by submitting apreference list that includes only contract xSecond we will show that adding the law of

10 A similar example appears in Ruth Martınez et al(2000)

11 These preferences however do not display the ldquosingleimprovement propertyrdquo that Gul and Stacchetti (1999) in-troduce and show is characteristic of substitutes preferencesin models with quasi-linear utility

12 It is of course not a dominant strategy for hospitals totruthfully reveal nor would it be so even if we consideredthe hospital-offering algorithm For further discussion ofthis point see Roth and Sotomayor (1990)

924 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

aggregate demand guarantees that a doctor doesat least as well as reporting truthfully as byreporting any singleton Together these are thedominant strategy result

To understand why submitting unattainedcontracts cannot help a doctor d consider thefollowing Let x be the most-preferred contractthat d can obtain by submitting any preferencelist (holding all other submitted preferencesfixed) Note that all that d accomplishes whenreporting that certain contracts are preferred to xis to make it easier for some coalition to blockoutcomes involving x Thus if x is attainablewith any report it is attainable with the reportPd x that ranks x as the only acceptable con-tract This intuition is captured in the followingtheorem

THEOREM 10 Let hospitalsrsquo preferences sat-isfy the substitutes condition and let the match-ing algorithm produce the doctor-optimalmatch Fixing the preferences of hospitals andof doctors besides d let x be the outcome that dobtains by reporting preferences Pd z1 dz2 d

d zn d x Then the outcome that dobtains by reporting preferences Pd x is also x

Some other doctors may be strictly better offwhen d submits her shorter preference list thereare fewer collections of contracts that d nowobjects to so the core may become larger andthe doctor-optimal point of the enlarged coremakes all doctors weakly better off and maymake some strictly better off

Without the law of aggregate demand how-ever it may still be in a doctorrsquos interest toconceal her preferences for unattainable posi-tions To see this consider the case with twohospitals and three doctors where contracts aresimply elements of D H and let preferences be

(12) Pd1 h1 h2

Ph1 d3 d1 d2 d1 d2

Pd2 h2 h1

Ph2 d1 d2 d3

Pd3 h2 h1

With these preferences the only stable matchis (d1 h2) (d3 h1) which leaves d2 unem-ployed However if d2 were to reverse herranking of the two hospitals then (d1 h1) (d2h1) (d3 h2) would be chosen by the doctor-offering algorithm leaving d2 better off Essen-tially by offering a contract to h2 d2 haschanged the number of positions availableWhen the preferences of the hospitals satisfythe law of aggregate demand however mak-ing more offers to the hospitals (weakly) in-creases the number of contracts the hospitalsaccept

THEOREM 11 Let hospitalsrsquo preferences sat-isfy substitutes and the law of aggregate de-mand and let the matching algorithm producethe doctor-optimal match Then fixing the pref-erences of the other doctors and of all thehospitals let x be the contract that d obtains bysubmitting the set of preferences Pd z1 dz2 d

d zn d x Then the preferences Pd y1 y2 yn x yn131 yN

obtain a contract that is Pd-preferred or indif-ferent to x

According to this theorem when a doctorrsquostrue preferences are Pd the doctor can never dobetter according to these true preferences thanby reporting the preferences truthfully

In fact the law of aggregate demand is ldquoal-mostrdquo a necessary condition as well The excep-tions can arise because certain violations of thelaw of aggregate demand are unobservable fromthe choice data of the algorithm and these can-not affect incentives Thus consider an examplewhere terms t are included in the contract andwhere a hospital h has preferences (d1 ht1) (d1 h t1) (d2 h t2) (d1 h t1) (d2 h t2) Although these preferences violatethe law of aggregate demand the algorithm willnever ldquoseerdquo the violation as either (d1 h t1) d1

(d1 h t1) or (d1 h t1) d1(d1 h t1) Thus

whichever terms that d1 first offers will deter-mine a conditional set of preferences for thehospital that does satisfy the law of aggregatedemand (The hospital will never reject an offerof either (d1 h t1) or (d1 h t1))

The next theorem says that if some hospitalrsquospreferences violate the law of aggregate demandin a way that can even potentially be observed

925VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

from the hospitalrsquos choices then there existpreferences for the other agents such that it isnot a dominant strategy for doctors to reporttruthfully even when the other assumptions wehave used are satisfied

THEOREM 12 Let hospital h have prefer-ences such that Ch(X) Ch(X x) and letthere exist two contracts y z such that yD zD xD yD and y z Rh(X x) Rh(X)Then if another hospital h exists there existsingleton preferences for the hospitals besides hand preferences for the doctors such that it isnot a dominant strategy for all doctors to revealtheir preferences truthfully

Thus to the extent that the law of aggregatedemand for hospital preferences has observableconsequences for the progress of the doctor-offering algorithm it is an indispensable condi-tion to ensure the dominant strategy property fordoctors

IV Classes of Conforming Preferences

Although the class of substitutes valuations isquite limited13 it is broader than the set ofresponsive preferences in useful ways Thesubstitutes valuations accommodate all the af-firmative action and subspecialty constraints de-scribed above and allow a doctorrsquos marginalproduct to depend on which other doctors thehospital attracts

In this section we introduce a parameterizedclass of quasi-linear substitutes valuations forhospitals evaluating sets of new hires The val-uations are based on an endowed assignmentmodel according to which hospitals have a set

of jobs to fill and an existing endowment ofdoctors while doctorsrsquo productivities varyamong jobs A hospital values new doctors ac-cording to the their incremental value in theassignment problem

From a general job assignment perspectivethe key restrictions of endowed assignment val-uations are that each doctor can do one and onlyone job and that the hospitalrsquos output is the sumof outputs of its various jobs A hospital cannotuse one doctor for two jobs nor can it combinethe skills of two doctors in the same job Alsothere is no interaction in the productivity ofdoctors in different jobs Given this mathemat-ical structure if a doctor is lost it will always beoptimal for the hospital to retain all of its otherdoctors although it may choose to reassignsome of the retained doctors to fill vacatedpositions

Another way to describe the set of endowedassignment valuations VEA is to build it upfrom three properties as follows First a sin-gleton valuation is one of the form v(S) maxdSd for some nonnegative vector Sin-gleton valuations represent the possible valua-tions by a hospital with just one opening andVEA includes all singleton valuations Second ifa hospital is composed of two units j 1 2each of which has a valuation vj VEA then thehospitalrsquos maximum value from assigningworkers between its units denoted by (v1 v2)(S) maxRSv1(R) 13 v2(S R) is also inthe set We call this property closure underaggregation Third if a hospitalrsquos value is de-rived from a value in VEA by endowing thehospital with a set of doctors T then the hospi-talrsquos incremental value for extra doctorsv(ST) v(S T) v(T) is also in the set VEAWe call this property closure under endowmentFinally two valuations v1 and v2 are calledequivalent if they differ by an additive con-stant For example for any fixed set of doctorsT v( T) is equivalent to v( T)

THEOREM 13 Let VEA denote the smallestfamily of valuations of sets of doctors that in-cludes all the singleton valuations and is closedunder aggregation and endowment Then foreach v VEA there exists a set of jobs J a setof doctors T and a (D 13 T) J-matrix [ij]such that v is equivalent to the following

13 Hans Reijnierse et al (2002) (see also Yuan-ChuanLien and Jun Yan 2003) have characterized the valuationfunctions that satisfy the substitutes condition as followsLet v(S) be the hospitalrsquos value of doctor set S and letvS(T) v(S T) v(S) denote the incremental value of theset of doctors T Then doctors are substitutes if for every setS and three other doctors d1 d2 and d3 there is no uniquemaximum in vS(d1) 13 vS(d2 d3) vS(d2) 13 vS(d1 d3)vS(d3) 13 vS(d1 d2)

926 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

(13) vSJ T maxz

d S

djzdj subject to

d S

zdj 1 for j J

j J

zdj 1 for d S T0 for d S T

zdj 0 1 for all d j

Conversely for every such J T and v( J T) VEA

We dub this family of valuations the endowedassignment valuations because of the form ofoptimization (13) The family VEA is an exten-sion of the assignment valuations derived byLloyd Shapley (1962) used by Roth (19841985b) in models of matching with wages andexplicit job assignments and emphasized in astudy of package bidding by Lehmann et al(2001) The endowed assignment valuations arequite useful for applications They also fit nicelywith the theory reported in previous sections forthe following reason

THEOREM 14 Every endowed assignmentvaluation v( J T) VEA is a substitutesvaluation

To the best of our knowledge all of thesubstitutes valuations that have been used orproposed for practical applications are includedamong the endowed assignment valuations In-deed the question of whether all substitutesvaluations are endowed assignment valuationsis an open one Here we review some of themost popular valuations to show how they fitinto the class

The most commonly studied class of prefer-ences for matching problems like the Match forwhich employment terms are exogenouslyfixed are the responsive preferences Thesespecify that each hospital h has a fixed numberof openings nh a set of acceptable doctors Dh

A D and a strict ordering h of the acceptabledoctors When a doctor is unacceptable thatmeans that hiring the doctor is always worsethan leaving her position unfilled Given any setof available doctors the hospital hires its nh

most preferred acceptable doctors if that manyare available and otherwise hires all of theacceptable doctors

To map responsive preferences into the as-signment problem framework define a utilityfunction uh D3 to represent h and set theminimum acceptable utility to zero Formally(1) if d d Dh

A then d h dN uh(d) uh(d)and (2) d Dh

AN uh(d) 0 Using this utilitywe specify an assignment problem as followsJ 1 nh and dj uh(d) 13 1 and fix thewage at 1 Using a positive wage is a device toensure that the hospital strictly prefers not tohire a doctor it plans not to assign to any job Itis evident that with this valuation preferencethe hospital most prefers to hire the set of avail-able acceptable doctors with the highest rank-ing according to h

Among the extensions of responsive prefer-ences that have been most important in practiceare ones to accommodate quotas of variouskinds For example one use of quotas is tomanage subspecialties of internal medicine inwhich a certain number of positions are to befilled by doctors planning that subspecialty ifenough acceptable doctors are available Onecan reserve ms jobs for subspecialty s by pro-viding that there are ms jobs in which doctors inthat subspecialty have their productivity in-creased by a large constant M Then if msdoctors in subspecialty s are available at leastthat many will be demanded at the optimalsolution to (13) If that many qualified doctorsare not available the jobs will be filled by otherdoctors according to their productivities

Another use of quotas is for an affirmativeaction policy that absolutely reserves jobs formembers of certain target groups For each af-firmative action group G define a correspond-ing set of jobs JG and let J G JG Specifythat for any doctor d G and job j JG dj uh(d) and otherwise dj 0 One can alsointroduce an unrestricted category of jobs j thatany doctor can fill with productivity dj uh(d) This obviously ensures that a certainnumber of jobs are reserved for each targetgroup

A recent treatment of affirmative action byRoth (1991) extended by Abdulkadiroglu(2003) uses the class of responsive preferenceswith capacity constraints This class requires

927VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

that the set of doctors be partitioned into a finitenumber of affirmative action groups and that foreach group G the hospital has a capacity mG thatlimits the number of doctors who can be hiredfrom that group In addition at most nh doctorsin total can be hired

To represent such preferences using endowedassignment valuations let us specify that thereare mG jobs of type G and yenG mG jobs in totalThe hospital is endowed with nh yenG mGdoctors The endowed doctors have productivityij M in every job where M is a largenumber This ensures that at most nh new doc-tors will be hired at any optimum For thenonendowed doctors we calculate productivi-ties uh(d) in the same fashion as for the respon-sive preferences and set dj uh(d) for jobs j oftype G and dj 0 for all other jobs Thisensures that at most mG doctors will be hiredfrom group G By inspection this specificationrepresents Abdulkadiroglursquos affirmative actionpreferences

Unlike the specifications used for the currentNational Resident Matching Program algo-rithm the endowed assignment valuations per-mit overlapping affirmative action categoriesFor example suppose that a small hospital has atarget of hiring one female and one minoritydoctor In the endowed assignment structurethe hospital may assign a minority female doc-tor to fill either a minority slot or a female slotbut not both This is necessary to retain thesubstitutes demand structure for otherwisemaking a minority female doctor availablecould lead the hospital to hire a nonminoritymale doctor whom it would otherwise reject

Endowed assignment valuations thus providea flexible parameterized way for hospitals torepresent their preferences for matching with orwithout wages using a class of quasi-linear pref-erences that satisfies the substitutes conditionand the law of aggregate demand

V Cumulative Offer Processes and Auctions

The algorithms described by the system (9)with different starting points have the propertythat they can terminate only at a stable set ofcontracts Nevertheless unless preferences sat-isfy the substitutes condition the system is notguaranteed to converge at all even when a fixed

point exists In this section we offer a differentcharacterization of the Gale-Shapley doctor-offering algorithm that will prove especiallywell suited to situations in which contracts maynot be substitutes but in which there is just oneldquohospitalrdquo the auctioneer For now we allowthe possibility that there are several hospitals

The alternative representation is constructedby replacing the system of equations (9) by thefollowing system

(14) XD t X RH XH t 1

XH t XH t 1 CD XD t

We call the algorithm that begins with XD(0) X and XH(0) A and obeys (14) a cumulativeoffer process because the formalism capturesthe idea that hospitals accumulate offers fromdoctors in the set XH(t) and hold their bestchoices CH(XH(t)) from the accumulated setThere is no assumption of consistency imposedon the algorithm so it is possible that severalhospitals are ldquoholdingrdquo contract offers from thesame doctor The corresponding allocation is ofcourse infeasible since each doctor can ulti-mately accept just one contract

At each round t of the cumulative offer pro-cess all doctors make their best offers from theset of not-yet-rejected choices XD(t) but anydoctor d for whom a contract is being heldsimply repeats one of its earlier offers Thusnew offers are made only by doctors who havebeen rejected

To see why this is so let x CH(XH(t)) be acontract that is being held and consider thecorresponding doctor xD d By revealed pref-erence doctor d strictly prefers x to any contractthat she has not yet offered since those con-tracts were available to offer at the time that xwas offered Since drsquos most preferred contractin Xd(t) at the current time must be weaklypreferred to x it must be coincide with one ofdrsquos earlier offers

The second equation of system (14) is the onethat distinguishes the cumulative offer processfrom the system in (9) In the cumulative offerprocess without any assumptions about hospi-talsrsquo preferences XH(t) grows monotonicallyfrom round to round so the sequence of setsconverges In contrast the earlier process was

928 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

guaranteed to converge only when contracts aresubstitutes for the hospitals

When contracts are substitutes the two sys-tems of equations are equivalent

THEOREM 15 Suppose that contracts aresubstitutes for the hospitals and that XD(0) Xand XH(0) A Then the sequences of pairs(XD(t) XH(t)) generated by the two laws ofmotion (9) and (14) are identical

Even with the initial condition XD(0) X andXH(0) A the algorithms described by (9) and(14) may differ when contracts are not substi-tutes In that case by inspection of the system(14) the cumulative offer process still con-verges because XH(t) is bounded by the finiteset X and grows monotonically from round toround What is at issue is whether the hospitalrsquoschoice from its final search set in the cumulativeoffer process is a feasible and stable set ofcontracts

We will find below that when there is a singlehospital the outcome is indeed a feasible andstable set of contracts In that case the cumu-lative offer process coincides with the general-ized proxy auction of Ausubel and Milgrom(2002) Those authors analyze in detail the casewhen a bid consists of a price and a subset of theset of goods that the bidder wishes to buy Ateach round the seller ldquoholdsrdquo the collection ofbids that maximizes its total revenues subject tothe constraint that each good can be sold onlyonce The generalized proxy auction howeveris not limited to the sale of goods and in fact isidentical in scope to our present model ofmatching with contracts In particular the auc-tioneer may impose a variety of constraints onthe feasible collections of bids and may weighnonprice factors either exclusively or in com-bination with prices to decide which collectionof bids to hold Bidders for their part maymake bids that include factors besides price andmay not include price at all

To illustrate the role of general contracts inthis auction setting consider the auction designsuggested by Paul Brewer and Charles Plott(1996) in which bidders seek to buy access to arailroad track In that application a bid specifiesa trainrsquos direction of travel departure and ar-rival times and price offered It is assumed that

trains travel at a uniform speed along the trackIn this setting the contract terms must includethe direction and the two times and the seller isconstrained to hold only combinations of bidssuch that trains maintain safe distances fromone another at all times

A second example of the generalized proxyprocess is a procurement auction in which thebuyer scores suppliers on the basis of suchfactors as quality excess capacity credit ratingand historical reliability as well as price and inwhich the buyer prefers to set aside someamount of its purchase for minority contractorsor to maintain geographic diversity of supply toreduce the chance of supply disruptions In anasset sale the seller may weigh the probabilitythat the sale will be completed for example dueto financing contingencies or because a union orantitrust regulators must approve the sale

The cumulative offer process model withgeneral contracts accommodates all of thesepossibilities The auctioneer in the model cor-responds to a single ldquohospitalrdquomdashhereafter theauctioneermdashwith a choice function CH thatselects her most preferred collection of contractproposals We have the following result (whichis first stated using different notation than in theAusubel-Milgrom paper)

THEOREM 16 When the doctor-offering cu-mulative offer process with a single hospitalterminates at time t with outcome (XD(t) XH(t))the hospitalrsquos choice CH(XH(t)) is a stable col-lection of contracts

Cumulative offer processes connect the the-ory of matching with contracts to the emergingtheory of package auctions and auctions withcomplex constraints

VI Conclusion

We have introduced a general model ofmatching with bilateral contracts that encom-passes and extends two-sided matching modelswith and without money and certain auctionmodels The new formulation allows some con-tract terms to be exogenously fixed and others tobe endogenous in any combinations In thisvery general framework we characterize stable

929VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

collections of contracts in terms of the solutionto a certain system of equations

The key to the analysis is to extend twoconcepts of demand theory to models with orwithout prices The first concept to be extendedis the notion of substitutes Our definition ap-plies essentially the Roth-Sotomayor substitut-able preferences condition to a more generalclass of contracts contracts are substitutes ifwhenever the set of feasible bilateral contractsexpands the set of contracts that the firm rejectsalso expands We show that (a) our definitioncoincides with the usual demand theory condi-tion when both apply (b) when contracts aresubstitutes a stable collection of contracts ex-ists and (c) if any hospital or firm has prefer-ences that are not substitutes then there arepreferences with single openings for each otherfirm such that no stable allocation exists Wefurther show that when the substitute conditionapplies (a) both the doctor-offering and hospi-tal-offering Gale-Shapley algorithms can berepresented as iterated operations of the sameoperator (starting from different initial condi-tions) and (b) starting at a stable allocationfrom which a doctor retires a natural marketdynamic mimics the Gale-Shapley process tofind a new stable allocation

The second relevant demand theory conceptis the law of demand which we extend both toinclude heterogeneous inputs and to encompassmodels with or without prices The law of ag-gregate demand condition holds that when theset of feasible contracts expands the number ofcontracts that the firm chooses to sign weaklyincreases In terms of traditional demand theorythis means that for example when the wages ofsome of a heterogeneous group of workers fallsif the workers are substitutes then the totalnumber of workers employed rises We showthat (a) when inputs are substitutes the choicesof a profit-maximizing firmhospital satisfy thelaw of aggregate demand Moreover when thechoices of every hospitalfirm satisfy the law ofaggregate demand and the substitutes conditionthen (b) the set of workersdoctors employed isthe same at every stable allocation (c) the num-ber employed by each firmhospital is also thesame and (d) truthful reporting is a dominantstrategy for doctors in the doctor-offering algo-rithm Moreover we prove (e) that if the law of

aggregate demand fails in any potentially ob-servable way then the preceding dominantstrategy property does not hold

For these results to be useful for practicalmechanism design one needs to account forhow preferences especially hospital prefer-ences are to be reported to the mechanismThere needs to be a convenient way for hospi-tals to express a rich array of preferences andone needs to know whether the preferences be-ing reported actually satisfy the conditions ofthe various theorems Toward that end we in-troduce a parametric form that we call extendedassignment valuations which strictly general-izes several existing specifications and whichalways satisfies both the substitutes and law ofaggregate demand conditions

Finally we introduce an alternative treatmentof the doctor-offering algorithm the cumulativeoffer process We show that when contracts aresubstitutes the previously characterized doctor-offering algorithm coincides exactly with a cu-mulative offer process When contracts are notsubstitutes but there is just one hospital (theldquoauctioneerrdquo) the cumulative offer process co-incides with the Ausubel-Milgrom ascendingproxy auction This identity clarifies the con-nection between these algorithms and com-bined with the dominant strategy theoremreported above generalizes the Ausubel-Milgromdominant strategy theorem for the proxyauctions

Our new approach reveals deep similaritiesamong several of the most successful auctionand matching designs in current use and amongthe environmental conditions in which theoret-ically the mechanisms should perform at theirbest Understanding these similarities can helpus to understand the limitations of these mech-anisms paving the way for new designs

APPENDIX

PROOF OF THEOREM 1Let (XD XH) X2 be a solution to (3) Then

XD XH XD RD(XD) CD(XD) andsimilarly XH XD XH RH(XH) CH(XH)so XH XD CH(XH) CD(XD)

Next we show that X XH XD is a stableset of contracts Since X CH(XH) CD(XD)it follows by revealed preference that X

930 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

CH(X) CD(X) so condition (i) of the defi-nition of stability is satisfied

Consider any hospital h and set of contractsX CD(X X) naming hospital h Since X CD(XD) revealed preference of the doctorsimplies that X XD CD(XD) and hence thatX RD(XD) X XD RD(XD) CD(XD) RD(XD) A Thus X X RD(XD) XHby (3) So if X Ch(X) then by the revealedpreference of hospital h X h Ch(XH) Ch(X) Hence X Ch(X X) so condition(ii) is satisfied So the set of contracts X isunblocked

For the converse suppose that X is a stablecollection of contracts Then CD(X) X LetXH be the set of contracts that the doctorsweakly prefer to X and XD the set of contractsthat doctors weakly disprefer By constructionX XH X XD X is a partition of X

To obtain (3) observe first that if there issome h such that Ch(XH) Xh then X Ch(XH) violates stability condition (ii) SoCh(XH) Xh for all h that is CH(XH) X Itfollows that X RH(XH) X (XH X) X (X XD) XD and that X RD(XD) X (XD CD(XD)) X (XD X) XH

Hence (XD XH) satisfies (3) and XH XD X

PROOF OF THEOREM 2Let i j ( j wj) C(w) and wi wi Define

Z(w) ( j wj)wj wj Then Z(wi wi) Z(w) If contracts are substitutes then R(Z(wiwi)) R(Z(w)) By (6) since ( j wj) C(w)it follows that ( j wj) C(Z(w)) so ( j wj) R(Z(w)) Hence ( j wj) R(Z(wi wi)) So ( jwj) Z(wi wi) R(Z(wi wi)) C(Z(wiwi)) and thus (j wj) C(wi wi) by assumption(6) Thus C satisfies demand theory substitutes

Conversely suppose contracts are not substi-tutes Then there exists a set X an element (iwi) X and ( j wj) R(X) such that ( j wj) R(X) where X X (i wi) Using (6)wi Wi(X) Let w W(X) and wi Wi(X)Then wi wi and ( j wj) C(w) but ( j wj) C(wi wi) so C does not satisfy the demandtheory substitutes condition

PROOF OF THEOREM 5We may limit attention to the case with

exactly two hospitals by specifying that

the doctors find the other hospitals to beunacceptable

Suppose Rh is not isotone Then there existssome x y X and X X such that for all x X xH h and such that x Rh(X) Rh(X y) By construction since x y Ch(X y) contracts x and y specify different doctorssay d1 xD yD d2 Let x and y denote thecorresponding contracts for doctors d1 and d2 inwhich hospital h is substituted for h

We specify preferences as follows first forhospital h we take x h y h A and allother contracts are unacceptable Second doc-tors in xD(CH(X) CH(X y)) d1 d2prefer their elements of CH(X) CH(X y)to any other contract Third d1 has x d1

x and ranks all other contracts lower Fourthd2 has y d2

y and ranks all other con-tracts lower Finally the remaining doctors findall contracts from hospitals h and h to beunacceptable

Consider a feasible acceptable allocation Xsuch that y X Since h and d2 can have onlyone contract in X x y X Then hrsquos con-tracts in X form a subset of X so x is notincluded and d1 has a contract less preferredthan x Then the deviation by (d1 h) to xblocks X

Consider a feasible acceptable allocation Xsuch that y X Then either x y X or Xis blocked by a coalition including h d1 and d2using the contracts x and y However if x y X then a deviation by (d2 h) to contract yblocks X

Since all feasible allocations are blockedthere exists no stable set of contracts

PROOF OF THEOREM 7Suppose X D H W and let Z(w) ( j

wj)wj wj Then the law of aggregate de-mand is the statement that for any wage vectorsw w satisfying w w such that the choices setsare singletons C(Z(w)) C(Z(w)) The proofis by contradiction Suppose the law of aggre-gate demand does not hold Then there exists awage vector w and a doctor d such that for some(and hence all) 0 C(Z(wd 13 wd)) C(Z(wd wd)) Since hrsquos preferences arequasi-linear changing doctor drsquos wage can af-fect the hiring of other doctors only if it affectsthe hiring of doctor d It follows that there are

931VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

exactly two optimal choices for the hospital atwage vector w these are C(Z(wd wd)) atwhich doctor d is hired and C(Z(wd 13 wd))at which d is not hired but such that two otherdoctors are hired that is there exist doctors dd C(Z(wd 13 wd)) C(Z(wd wd))Let the corresponding payoff for the hospital(when faced with wage vector w) be

Consider the wage vector w (wd wd 2 wdd) For positive and suffi-ciently small the hospitalrsquos payoff at wage vec-tor w is 13 2 if it chooses C(Z(wd 13 wd))and it is 13 if it chooses C(Z(wd wd))and one of these choices must be optimal SoC(w) C(Z(wd 13 wd)) But then raisingthe wage of doctor d from wd 2 to wd whileholding the other wages at wd reduces the de-mand for doctor d from one to zero in violationof the demand theory substitutes condition

PROOF OF THEOREM 8By definition XD X D so by revealed pref-

erence Cd(X D) Cd(XD) Also X H XH soby the law of aggregate demand Ch(X H) Ch(XH) By Theorem 1 CD(XD) CH(XH)and CD(X D) CH(X H) so yendD Cd(XD) yenhH Ch(XH) and yendD Cd(XD) yenhH Ch(XH)Combining these leads to yendD Cd(X D) yendD Cd(XD) yenhH Ch(XH) yenhH Ch(XH) yendD Cd(XD) which begins and ends with the samesum Hence none of the inequalities can bestrict

PROOF OF THEOREM 9Since Ch(X) Ch(X) there exists some

set Y X Y X and contract x such thatCh(Y) Ch(Y x) Since x Ch(Y x)(as otherwise Ch(Y) Ch(Y x) for thepreferences to be rationalizable) there must ex-ist two contracts y z Rh(Y x) Rh(Y)such that y x z y Moreover since y z Ch(Y) yD zD

Denoting by h the second hospital whose exis-tence is hypothesized by the theorem we specifypreferences as follows Let all the doctors with con-tracts in Y have those contracts be their most favoredand let all other doctors find any contract with hunacceptable Let all doctors find any contract notinvolving hospital h or h to be unacceptable

In principle there are three casesIf xD yD then let PxD

y x and PzD z

Then there exist two stable matches Ch(Y x) and Ch(Y) with zD employed in the firstmatch but not in the second

The case xD zD is symmetricFinally if yD xD zD then let x y z

denote contracts with hospital h where the doc-tors (and any other terms) are the same as in xy z respectively Specify the remaining prefer-ences by PxD

x x PyD y y PzD

z z and Ph y x A z Thenthere exist two different stable matches x Ch(Y) and y Ch(Y x) with zD em-ployed in the first match but not in the second

PROOF OF THEOREM 10Let X denote the collection of contracts cho-

sen by the algorithm when doctor d submitspreference Pd If this collection which is stableunder the reported preferences is not stableunder Pd then there exists a blocking coalitionThis blocking coalition must contain d as noother doctorrsquos preferences have changed butthat is impossible since x is drsquos favorite con-tract according to the preferences Pd Since X isstable under Pd the doctor-optimal stable matchunder Pd (the existence of which is guaranteedby Theorem 2) must make every doctor(weakly) better off than at X In particulardoctor d must obtain x

PROOF OF THEOREM 11From Theorem 10 Pd x also obtains x

Hence by the rural hospitals theorem d is em-ployed at every point in the core when Pd x issubmitted So every allocation X at which d isunemployed is blocked by some coalition andset of contracts when d submits Pd Conse-quently if d submits the preferences Pd y1 y2 yn x then every allocation at whichd is unemployed is still blocked by the samecoalition and set of contracts Since the doctor-best stable allocation is one at which d gets aPd-acceptable contract that allocation is weaklyPd-preferred to x Finally the doctor-optimalmatch when Pd is submitted is still the doctor-optimal match when Pd is submitted as drsquospreferences over contracts less preferred than xcannot be used to block a match where shereceives a contract weakly preferred to x

932 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

PROOF OF THEOREM 12Consider contracts x y and z such that

xD xD yD yD zD zD and xH yH zH h Let the preferences of the three identified bePxD

x x PyD y y and PzD

z z andlet those of h be Ph y z x Forthe other contracts x Y Ch(X) let x be xDrsquosmost favored contract For the remaining doctorslet any contract with h or h be unacceptable

With the preceding preferences the only sta-ble allocation includes contracts x and y leav-ing doctor zD unemployed If however zDmisrepresents her preferences and reports PzD

z z then the doctor-optimal stable matchincludes z leaving doctor zD better off

PROOF OF THEOREM 13Setting J 1 and T A it is clear by

inspection that this family includes all singletonvaluations

The family is closed under endowment be-cause given any such valuation v( J T)endowing a set of doctors T simply creates thevaluation v( J T T))

To verify that the family is closed underaggregation consider any two valuations v( J T) and v( J T) Since J and T are justindex sets we may assume without loss ofgenerality that T T J J A DefineT T T and J J J Let

(15) ij ij if i D T j Jij if i D T j J0 otherwise

By inspection of the optimization problems v( J T) v( J T) v( J T)

For the converse consider the valuation v( J T) given by (13) We derive it construc-tively from the singleton valuations aggrega-tion and endowment as follows Let vj be thesingleton valuation associated with row j inmatrix [ij] for j 1 J Since VEA isclosed under aggregation v1 vJ v( J A) VEA Since VEA is also closed underendowment we may endow the doctors in T toobtain v( J T) VEA

PROOF OF THEOREM 14L Shapley (1962) (see also Lehmann et al

2001) had already proved that every assignment

valuation without endowments v( J A) is asubstitutes valuation Ausubel and Milgrom(2002) prove that a valuation v is a substitutesvaluation if and only if the corresponding indi-rect profit function ((p) v(S) yendS pd) issubmodular Let be the indirect profit func-tion corresponding to v( J A) Then theindirect profit function corresponding to v( J T) is (p1 pN) (p1 pN 0 0)Since is the profit function of the substitutesvaluation vh it is submodular and hence issubmodular as well

PROOF OF THEOREM 15Suppose that contracts are substitutes for the

hospitals We proceed by induction The initialcondition specifies that the sequences are iden-tical through time t 0 Denote the sequencecorresponding to the cumulative offer processby a superscript C and denote the alternativeprocess defined by (9) with no superscript As-sume the inductive hypothesis that the se-quences are the same up to round t 1 andsuppress the corresponding superscripts for thevalues at that round Then XD(t) X RH(XH(t 1)) XD

C(t) This also implies that

(16) X XH t 1 XD t

To complete the proof we must show thatXH

C(t) XH(t) or equivalently that XH(t 1) CD(XD(t)) X RD(XD(t))

For t 2 XHC(t 2) XH

C(t 1) by con-struction so by the inductive hypothesis XH(t 2) XH(t 1) Since contracts are substitutesRH is isotone so X RH(XH(t 1)) X RH(XH(t 2)) and hence XD(t) XD(t 1)For t 1 the inclusion XD(t) XD(t 1) isimplied by the initial condition XD(0) X

Recall that by revealed preference RD isisotone It follows that RD(XD(t)) RD(XD(t 1)) and hence using (9) that XH(t 1) X RD(XD(t 1)) X RD(XD(t)) XH(t) ThusXH(t 1) XH(t 1) (X RD(XD(t))) XH(t 1) RD(XD(t)) So XH(t 1) CD(XD(t)) XH(t 1) (XD(t) RD(XD(t))) (XH(t 1) RD(XD(t))) (XD(t) RD(XD(t))) (XH(t 1) XD(t)) RD(XD(t)) X RD(XD(t)) where the last stepequality follows from (16)

933VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

PROOF OF THEOREM 16By construction any contract not in XH(t) is

less preferred by some doctor d than everycorresponding contract in XH(t) (because doctord offers her most preferred contracts in se-quence) So any collection of contracts thatincludes some not in XH(t) must be strictly lesspreferred by one of the doctors Any profitablecoalitional deviation must use only contracts inXH(t)

By construction the one hospitalauctioneermust be part of any deviating coalition andCH(XH(t)) is its strictly most preferred collectionof contracts in XH(t) so there is no profitablecoalitional deviation using just contracts in XH(t)

REFERENCES

Abdulkadiroglu Atila ldquoCollege Admissionswith Affirmative Actionrdquo Unpublished Pa-per 2003

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoBoston Public School MatchingrdquoAmerican Economic Review 2005a (Papersand Proceedings) 95(2) pp 368ndash71

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoThe New York City High SchoolMatchrdquo American Economic Review 2005b(Papers and Proceedings) 95(2) pp 364ndash67

Abdulkadiroglu Atila and Sonmez TayfunldquoSchool Choice A Mechanism Design Ap-proachrdquo American Economic Review 200393(3) pp 729ndash47

Adachi Hiroyuki ldquoOn a Characterization of Sta-ble Matchingsrdquo Economics Letters 200068(1) pp 43ndash49

Alkan Ahmet and Gale David ldquoStable ScheduleMatching under Revealed Preferencerdquo Jour-nal of Economic Theory 2003 112(2) pp289ndash306

Ausubel Lawrence M Cramton Peter and Mil-grom Paul R ldquoThe Clock-Poxy Auction APractical Combinatorial Auction Designrdquo inPeter Cramton Yoav Shoham and RichardSteinberg eds Combinatorial auctionsCambridge MA MIT Press 2005 ch 5

Ausubel Lawrence M and Milgrom Paul RldquoAscending Auctions with Package Bid-dingrdquo Frontiers of Theoretical Economics2002 1(1) Article 1

Blum Yosef Roth Alvin E and Rothblum UrielG ldquoVacancy Chains and Equilibration in Se-nior-Level Labor Marketsrdquo Journal of Eco-nomic Theory 1997 76(2) pp 362ndash411

Brewer Paul J and Plott Charles R ldquoA BinaryConflict Ascending Price (Bicap) Mechanismfor the Decentralized Allocation of the Rightto Use Railroad Tracksrdquo International Jour-nal of Industrial Organization 1996 14(6)pp 857ndash86

Bulow Jeremy and Levin Jonathan ldquoMatchingand Price Competitionrdquo Stanford UniversityStanford Economics Working Paper No1818 2003

Cramton Peter Shoham Yoav and SteinbergRichard Combinatorial auctions Cam-bridge MA MIT Press (forthcoming)

Crawford Vincent P and Knoer Elsie M ldquoJobMatching with Heterogeneous Firms andWorkersrdquo Econometrica 1981 49(2) pp437ndash50

Demange Gabrielle and Gale David ldquoThe Strat-egy Structure of Two-Sided Matching Mar-ketsrdquo Econometrica 1985 53(4) pp 873ndash88

Dubins Lester and Freedman David ldquoMachia-velli and the Gale-Shapley Algorithmrdquo Na-val Research Logistics Quarterly 198188(7) pp 485ndash94

Echenique Federico and Oviedo Jorge ldquoCoreMany-to-One Matchings by Fixed-PointMethodsrdquo Journal of Economic Theory2004 115(2) pp 358ndash76

Fleiner Tamas ldquoA Fixed-Point Approach toStable Matchings and Some ApplicationsrdquoMathematics of Operations Research 200328(1) pp 103ndash26

Gale David and Shapley Lloyd ldquoCollege Ad-missions and the Stability of MarriagerdquoAmerican Mathematical Monthly 196269(1) pp 9ndash15

Gul Faruk and Stacchetti Ennio ldquoWalrasianEquilibrium with Gross Substitutesrdquo Journalof Economic Theory 1999 87(1) pp 95ndash124

Kelso Alexander and Crawford Vincent P ldquoJobMatching Coalition Formation and GrossSubstitutesrdquo Econometrica 1982 50(6) pp1483ndash504

Lehmann Benny Lehmann Daniel and NisanNoam ldquoCombinatorial Auctions with De-

934 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

creasing Marginal Utilityrdquo Games and Eco-nomic Behavior 2005 (forthcoming)

Lien Yuan-Chuan and Yan Jun ldquoOn the GrossSubstitutes Conditionrdquo Unpublished Paper2003 httpwwwstamfordeduyclienTerm_Paper_Lien_Yanpdf

Martınez Ruth Masso Jordi Neme Alejandroand Oviedo Jorge ldquoSingle Agents and the Setof Many-to-One Stable Matchingsrdquo Journalof Economic Theory 2000 91(1) pp 91ndash105

Milgrom Paul R Putting auction theory towork Cambridge Cambridge UniversityPress 2004

Milgrom Paul R ldquoPutting Auction Theory toWork The Simultaneous Ascending Auc-tionrdquo Journal of Political Economy 2000108(2) pp 245ndash72

Porter David Rassenti Stephen RoopnarineAnil and Smith Vernon ldquoCombinatorial Auc-tion Designrdquo Proceedings of the NationalAcademy of Sciences 2003 100(19) pp11153ndash57

Reijnierse Hans van Gellekom Anita and PottersJos A M ldquoVerifying Gross SubstitutabilityrdquoEconomic Theory 2002 20(4) pp 767ndash76

Roth Alvin E ldquoThe Economics of Matching Sta-bility and Incentivesrdquo Mathematics of Opera-tions Research 1982 7(4) pp 617ndash28

Roth Alvin E ldquoStability and Polarization ofInterests in Job Matchingrdquo Econometrica1984 52(1) pp 47ndash57

Roth Alvin E ldquoThe College Admissions Prob-lem Is Not Equivalent to the Marriage Prob-lemrdquo Journal of Economic Theory 1985a36(2) pp 277ndash88

Roth Alvin E ldquoConflict and Coincidence ofInterest in Job Matching Some New Resultsand Open Questionsrdquo Mathematics of Oper-ations Research 1985b 10(3) pp 379ndash89

Roth Alvin E ldquoOn the Allocation of Residentsto Rural Hospitals A General Property ofTwo-Sided Matching Marketsrdquo Economet-rica 1986 54(2) pp 425ndash27

Roth Alvin E ldquoA Natural Experiment in theOrganization of Entry-Level Labor MarketsRegional Markets for New Physicians andSurgeons in the United Kingdomrdquo AmericanEconomic Review 1991 81(3) pp 415ndash40

Roth Alvin E and Peranson Elliott ldquoThe Rede-sign of the Matching Market for AmericanPhysicians Some Engineering Aspects ofEconomic Designrdquo American Economic Re-view 1999 89(4) pp 748ndash80

Roth Alvin E and Sotomayor Marilda Two-sided matching A study in game-theoreticmodeling and analysis Cambridge Cam-bridge University Press 1990

Sen Amartya Collective choice and social wel-fare San Francisco Holden-Day Inc 1970

Shapley Lloyd ldquoComplements and Substitutesin the Optimal Assignment Problemrdquo NavalResearch Logistics Quarterly 1962 9(1) pp45ndash48

935VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

Page 12: Matching with Contracts - Stanford Universityweb.stanford.edu/~milgrom/publishedarticles/Matching with... · 2005. 10. 22. · Gale-Shapley matching algorithm. Hence, the Gale-Shapley

H and responsive preferences and found thatthe answer is no every hospital that has unfilledpositions at some stable match is assigned ex-actly the same doctors at every stable match Inparticular every hospital hires the same numberof doctors at every stable match

In this section we show by an example thatthis last conclusion does not generalize to thefull set of environments in which contracts aresubstitutes10 We then prove that if preferencessatisfy the law of aggregate demand and substi-tutes then the last conclusion of Rothrsquos theoremholds every hospital signs exactly the samenumber of contracts at every point in the corealthough the doctors assigned and the terms ofemployment can vary Finally we show thatany violation of the law of aggregate demandimplies that preferences exist such that theabove conclusion does not hold

Suppose that H h1 h2 and D d1 d2d3 For hospital h1 suppose its choices maxi-mize where d3 d1 d2 d1 d2 A d1 d3 d2 d3 This prefer-ence satisfies substitutes11 Suppose h2 has oneposition with its preferences given by d1 d2 d3 A Finally suppose d1 and d2prefer h1 to h2 while d3 has the reverse prefer-ence Then the matches X (h1 d3) (h2 d1)and X (h1 d1) (h1 d2) (h2 d3) are bothstable but hospital h1 employs a different num-ber of doctors and the set of doctors assigneddiffers between the two matches

This example involves a failure of the law ofaggregate demand because as the set of con-tracts available to h1 expands by the addition of(h1 d3) to the set (h1 d1) (h1 d2) the numberof doctors demanded declines from two to oneWhen the law of aggregate demand holds how-ever we have the following result

THEOREM 8 If hospital preferences satisfysubstitutes and the law of aggregate demandthen for every stable allocation (XD XH) andevery d D and h H Cd(XD) Cd(X D)

and Ch(XH) Ch(X H) That is every doctorand hospital signs the same number of contractsat every stable collection of contracts

The next theorem verifies that the counterex-amples developed above can always be gener-alized whenever any hospitalrsquos preferencesviolate the law of aggregate demand

THEOREM 9 If there exists a hospital h setsX X X such that Ch(X) Ch(X) andat least one other hospital then there existsingleton preferences for the other hospitalsand doctors such that the number of doctorsemployed by h is different for two stablematches

Theorem 9 establishes that the law of aggre-gate demand is not only a sufficient conditionfor the rural hospitals result of Theorem 8 butin a particular sense a necessary one as well

B Truthful Revelation as a DominantStrategy

The main result of this section concerns doc-torsrsquo incentives to report their preferences truth-fully For the doctor-offering algorithm ifhospital preferences satisfy the law of aggregatedemand and the substitutes condition then it isdominant strategy for doctors to reveal truth-fully their preferences over contracts12 We fur-ther show that both preference conditions playessential roles in the conclusion

We will show the positive incentive result forthe doctor-offering algorithm in two stepswhich highlight the different roles of the twopreference assumptions First we show that thesubstitutes condition by itself guarantees thatdoctors cannot benefit by exaggerating the rank-ing of an unattainable contract More preciselyif there exists a preferences list for a doctor dsuch that d obtains contract x by submitting thislist then d can also obtain x by submitting apreference list that includes only contract xSecond we will show that adding the law of

10 A similar example appears in Ruth Martınez et al(2000)

11 These preferences however do not display the ldquosingleimprovement propertyrdquo that Gul and Stacchetti (1999) in-troduce and show is characteristic of substitutes preferencesin models with quasi-linear utility

12 It is of course not a dominant strategy for hospitals totruthfully reveal nor would it be so even if we consideredthe hospital-offering algorithm For further discussion ofthis point see Roth and Sotomayor (1990)

924 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

aggregate demand guarantees that a doctor doesat least as well as reporting truthfully as byreporting any singleton Together these are thedominant strategy result

To understand why submitting unattainedcontracts cannot help a doctor d consider thefollowing Let x be the most-preferred contractthat d can obtain by submitting any preferencelist (holding all other submitted preferencesfixed) Note that all that d accomplishes whenreporting that certain contracts are preferred to xis to make it easier for some coalition to blockoutcomes involving x Thus if x is attainablewith any report it is attainable with the reportPd x that ranks x as the only acceptable con-tract This intuition is captured in the followingtheorem

THEOREM 10 Let hospitalsrsquo preferences sat-isfy the substitutes condition and let the match-ing algorithm produce the doctor-optimalmatch Fixing the preferences of hospitals andof doctors besides d let x be the outcome that dobtains by reporting preferences Pd z1 dz2 d

d zn d x Then the outcome that dobtains by reporting preferences Pd x is also x

Some other doctors may be strictly better offwhen d submits her shorter preference list thereare fewer collections of contracts that d nowobjects to so the core may become larger andthe doctor-optimal point of the enlarged coremakes all doctors weakly better off and maymake some strictly better off

Without the law of aggregate demand how-ever it may still be in a doctorrsquos interest toconceal her preferences for unattainable posi-tions To see this consider the case with twohospitals and three doctors where contracts aresimply elements of D H and let preferences be

(12) Pd1 h1 h2

Ph1 d3 d1 d2 d1 d2

Pd2 h2 h1

Ph2 d1 d2 d3

Pd3 h2 h1

With these preferences the only stable matchis (d1 h2) (d3 h1) which leaves d2 unem-ployed However if d2 were to reverse herranking of the two hospitals then (d1 h1) (d2h1) (d3 h2) would be chosen by the doctor-offering algorithm leaving d2 better off Essen-tially by offering a contract to h2 d2 haschanged the number of positions availableWhen the preferences of the hospitals satisfythe law of aggregate demand however mak-ing more offers to the hospitals (weakly) in-creases the number of contracts the hospitalsaccept

THEOREM 11 Let hospitalsrsquo preferences sat-isfy substitutes and the law of aggregate de-mand and let the matching algorithm producethe doctor-optimal match Then fixing the pref-erences of the other doctors and of all thehospitals let x be the contract that d obtains bysubmitting the set of preferences Pd z1 dz2 d

d zn d x Then the preferences Pd y1 y2 yn x yn131 yN

obtain a contract that is Pd-preferred or indif-ferent to x

According to this theorem when a doctorrsquostrue preferences are Pd the doctor can never dobetter according to these true preferences thanby reporting the preferences truthfully

In fact the law of aggregate demand is ldquoal-mostrdquo a necessary condition as well The excep-tions can arise because certain violations of thelaw of aggregate demand are unobservable fromthe choice data of the algorithm and these can-not affect incentives Thus consider an examplewhere terms t are included in the contract andwhere a hospital h has preferences (d1 ht1) (d1 h t1) (d2 h t2) (d1 h t1) (d2 h t2) Although these preferences violatethe law of aggregate demand the algorithm willnever ldquoseerdquo the violation as either (d1 h t1) d1

(d1 h t1) or (d1 h t1) d1(d1 h t1) Thus

whichever terms that d1 first offers will deter-mine a conditional set of preferences for thehospital that does satisfy the law of aggregatedemand (The hospital will never reject an offerof either (d1 h t1) or (d1 h t1))

The next theorem says that if some hospitalrsquospreferences violate the law of aggregate demandin a way that can even potentially be observed

925VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

from the hospitalrsquos choices then there existpreferences for the other agents such that it isnot a dominant strategy for doctors to reporttruthfully even when the other assumptions wehave used are satisfied

THEOREM 12 Let hospital h have prefer-ences such that Ch(X) Ch(X x) and letthere exist two contracts y z such that yD zD xD yD and y z Rh(X x) Rh(X)Then if another hospital h exists there existsingleton preferences for the hospitals besides hand preferences for the doctors such that it isnot a dominant strategy for all doctors to revealtheir preferences truthfully

Thus to the extent that the law of aggregatedemand for hospital preferences has observableconsequences for the progress of the doctor-offering algorithm it is an indispensable condi-tion to ensure the dominant strategy property fordoctors

IV Classes of Conforming Preferences

Although the class of substitutes valuations isquite limited13 it is broader than the set ofresponsive preferences in useful ways Thesubstitutes valuations accommodate all the af-firmative action and subspecialty constraints de-scribed above and allow a doctorrsquos marginalproduct to depend on which other doctors thehospital attracts

In this section we introduce a parameterizedclass of quasi-linear substitutes valuations forhospitals evaluating sets of new hires The val-uations are based on an endowed assignmentmodel according to which hospitals have a set

of jobs to fill and an existing endowment ofdoctors while doctorsrsquo productivities varyamong jobs A hospital values new doctors ac-cording to the their incremental value in theassignment problem

From a general job assignment perspectivethe key restrictions of endowed assignment val-uations are that each doctor can do one and onlyone job and that the hospitalrsquos output is the sumof outputs of its various jobs A hospital cannotuse one doctor for two jobs nor can it combinethe skills of two doctors in the same job Alsothere is no interaction in the productivity ofdoctors in different jobs Given this mathemat-ical structure if a doctor is lost it will always beoptimal for the hospital to retain all of its otherdoctors although it may choose to reassignsome of the retained doctors to fill vacatedpositions

Another way to describe the set of endowedassignment valuations VEA is to build it upfrom three properties as follows First a sin-gleton valuation is one of the form v(S) maxdSd for some nonnegative vector Sin-gleton valuations represent the possible valua-tions by a hospital with just one opening andVEA includes all singleton valuations Second ifa hospital is composed of two units j 1 2each of which has a valuation vj VEA then thehospitalrsquos maximum value from assigningworkers between its units denoted by (v1 v2)(S) maxRSv1(R) 13 v2(S R) is also inthe set We call this property closure underaggregation Third if a hospitalrsquos value is de-rived from a value in VEA by endowing thehospital with a set of doctors T then the hospi-talrsquos incremental value for extra doctorsv(ST) v(S T) v(T) is also in the set VEAWe call this property closure under endowmentFinally two valuations v1 and v2 are calledequivalent if they differ by an additive con-stant For example for any fixed set of doctorsT v( T) is equivalent to v( T)

THEOREM 13 Let VEA denote the smallestfamily of valuations of sets of doctors that in-cludes all the singleton valuations and is closedunder aggregation and endowment Then foreach v VEA there exists a set of jobs J a setof doctors T and a (D 13 T) J-matrix [ij]such that v is equivalent to the following

13 Hans Reijnierse et al (2002) (see also Yuan-ChuanLien and Jun Yan 2003) have characterized the valuationfunctions that satisfy the substitutes condition as followsLet v(S) be the hospitalrsquos value of doctor set S and letvS(T) v(S T) v(S) denote the incremental value of theset of doctors T Then doctors are substitutes if for every setS and three other doctors d1 d2 and d3 there is no uniquemaximum in vS(d1) 13 vS(d2 d3) vS(d2) 13 vS(d1 d3)vS(d3) 13 vS(d1 d2)

926 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

(13) vSJ T maxz

d S

djzdj subject to

d S

zdj 1 for j J

j J

zdj 1 for d S T0 for d S T

zdj 0 1 for all d j

Conversely for every such J T and v( J T) VEA

We dub this family of valuations the endowedassignment valuations because of the form ofoptimization (13) The family VEA is an exten-sion of the assignment valuations derived byLloyd Shapley (1962) used by Roth (19841985b) in models of matching with wages andexplicit job assignments and emphasized in astudy of package bidding by Lehmann et al(2001) The endowed assignment valuations arequite useful for applications They also fit nicelywith the theory reported in previous sections forthe following reason

THEOREM 14 Every endowed assignmentvaluation v( J T) VEA is a substitutesvaluation

To the best of our knowledge all of thesubstitutes valuations that have been used orproposed for practical applications are includedamong the endowed assignment valuations In-deed the question of whether all substitutesvaluations are endowed assignment valuationsis an open one Here we review some of themost popular valuations to show how they fitinto the class

The most commonly studied class of prefer-ences for matching problems like the Match forwhich employment terms are exogenouslyfixed are the responsive preferences Thesespecify that each hospital h has a fixed numberof openings nh a set of acceptable doctors Dh

A D and a strict ordering h of the acceptabledoctors When a doctor is unacceptable thatmeans that hiring the doctor is always worsethan leaving her position unfilled Given any setof available doctors the hospital hires its nh

most preferred acceptable doctors if that manyare available and otherwise hires all of theacceptable doctors

To map responsive preferences into the as-signment problem framework define a utilityfunction uh D3 to represent h and set theminimum acceptable utility to zero Formally(1) if d d Dh

A then d h dN uh(d) uh(d)and (2) d Dh

AN uh(d) 0 Using this utilitywe specify an assignment problem as followsJ 1 nh and dj uh(d) 13 1 and fix thewage at 1 Using a positive wage is a device toensure that the hospital strictly prefers not tohire a doctor it plans not to assign to any job Itis evident that with this valuation preferencethe hospital most prefers to hire the set of avail-able acceptable doctors with the highest rank-ing according to h

Among the extensions of responsive prefer-ences that have been most important in practiceare ones to accommodate quotas of variouskinds For example one use of quotas is tomanage subspecialties of internal medicine inwhich a certain number of positions are to befilled by doctors planning that subspecialty ifenough acceptable doctors are available Onecan reserve ms jobs for subspecialty s by pro-viding that there are ms jobs in which doctors inthat subspecialty have their productivity in-creased by a large constant M Then if msdoctors in subspecialty s are available at leastthat many will be demanded at the optimalsolution to (13) If that many qualified doctorsare not available the jobs will be filled by otherdoctors according to their productivities

Another use of quotas is for an affirmativeaction policy that absolutely reserves jobs formembers of certain target groups For each af-firmative action group G define a correspond-ing set of jobs JG and let J G JG Specifythat for any doctor d G and job j JG dj uh(d) and otherwise dj 0 One can alsointroduce an unrestricted category of jobs j thatany doctor can fill with productivity dj uh(d) This obviously ensures that a certainnumber of jobs are reserved for each targetgroup

A recent treatment of affirmative action byRoth (1991) extended by Abdulkadiroglu(2003) uses the class of responsive preferenceswith capacity constraints This class requires

927VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

that the set of doctors be partitioned into a finitenumber of affirmative action groups and that foreach group G the hospital has a capacity mG thatlimits the number of doctors who can be hiredfrom that group In addition at most nh doctorsin total can be hired

To represent such preferences using endowedassignment valuations let us specify that thereare mG jobs of type G and yenG mG jobs in totalThe hospital is endowed with nh yenG mGdoctors The endowed doctors have productivityij M in every job where M is a largenumber This ensures that at most nh new doc-tors will be hired at any optimum For thenonendowed doctors we calculate productivi-ties uh(d) in the same fashion as for the respon-sive preferences and set dj uh(d) for jobs j oftype G and dj 0 for all other jobs Thisensures that at most mG doctors will be hiredfrom group G By inspection this specificationrepresents Abdulkadiroglursquos affirmative actionpreferences

Unlike the specifications used for the currentNational Resident Matching Program algo-rithm the endowed assignment valuations per-mit overlapping affirmative action categoriesFor example suppose that a small hospital has atarget of hiring one female and one minoritydoctor In the endowed assignment structurethe hospital may assign a minority female doc-tor to fill either a minority slot or a female slotbut not both This is necessary to retain thesubstitutes demand structure for otherwisemaking a minority female doctor availablecould lead the hospital to hire a nonminoritymale doctor whom it would otherwise reject

Endowed assignment valuations thus providea flexible parameterized way for hospitals torepresent their preferences for matching with orwithout wages using a class of quasi-linear pref-erences that satisfies the substitutes conditionand the law of aggregate demand

V Cumulative Offer Processes and Auctions

The algorithms described by the system (9)with different starting points have the propertythat they can terminate only at a stable set ofcontracts Nevertheless unless preferences sat-isfy the substitutes condition the system is notguaranteed to converge at all even when a fixed

point exists In this section we offer a differentcharacterization of the Gale-Shapley doctor-offering algorithm that will prove especiallywell suited to situations in which contracts maynot be substitutes but in which there is just oneldquohospitalrdquo the auctioneer For now we allowthe possibility that there are several hospitals

The alternative representation is constructedby replacing the system of equations (9) by thefollowing system

(14) XD t X RH XH t 1

XH t XH t 1 CD XD t

We call the algorithm that begins with XD(0) X and XH(0) A and obeys (14) a cumulativeoffer process because the formalism capturesthe idea that hospitals accumulate offers fromdoctors in the set XH(t) and hold their bestchoices CH(XH(t)) from the accumulated setThere is no assumption of consistency imposedon the algorithm so it is possible that severalhospitals are ldquoholdingrdquo contract offers from thesame doctor The corresponding allocation is ofcourse infeasible since each doctor can ulti-mately accept just one contract

At each round t of the cumulative offer pro-cess all doctors make their best offers from theset of not-yet-rejected choices XD(t) but anydoctor d for whom a contract is being heldsimply repeats one of its earlier offers Thusnew offers are made only by doctors who havebeen rejected

To see why this is so let x CH(XH(t)) be acontract that is being held and consider thecorresponding doctor xD d By revealed pref-erence doctor d strictly prefers x to any contractthat she has not yet offered since those con-tracts were available to offer at the time that xwas offered Since drsquos most preferred contractin Xd(t) at the current time must be weaklypreferred to x it must be coincide with one ofdrsquos earlier offers

The second equation of system (14) is the onethat distinguishes the cumulative offer processfrom the system in (9) In the cumulative offerprocess without any assumptions about hospi-talsrsquo preferences XH(t) grows monotonicallyfrom round to round so the sequence of setsconverges In contrast the earlier process was

928 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

guaranteed to converge only when contracts aresubstitutes for the hospitals

When contracts are substitutes the two sys-tems of equations are equivalent

THEOREM 15 Suppose that contracts aresubstitutes for the hospitals and that XD(0) Xand XH(0) A Then the sequences of pairs(XD(t) XH(t)) generated by the two laws ofmotion (9) and (14) are identical

Even with the initial condition XD(0) X andXH(0) A the algorithms described by (9) and(14) may differ when contracts are not substi-tutes In that case by inspection of the system(14) the cumulative offer process still con-verges because XH(t) is bounded by the finiteset X and grows monotonically from round toround What is at issue is whether the hospitalrsquoschoice from its final search set in the cumulativeoffer process is a feasible and stable set ofcontracts

We will find below that when there is a singlehospital the outcome is indeed a feasible andstable set of contracts In that case the cumu-lative offer process coincides with the general-ized proxy auction of Ausubel and Milgrom(2002) Those authors analyze in detail the casewhen a bid consists of a price and a subset of theset of goods that the bidder wishes to buy Ateach round the seller ldquoholdsrdquo the collection ofbids that maximizes its total revenues subject tothe constraint that each good can be sold onlyonce The generalized proxy auction howeveris not limited to the sale of goods and in fact isidentical in scope to our present model ofmatching with contracts In particular the auc-tioneer may impose a variety of constraints onthe feasible collections of bids and may weighnonprice factors either exclusively or in com-bination with prices to decide which collectionof bids to hold Bidders for their part maymake bids that include factors besides price andmay not include price at all

To illustrate the role of general contracts inthis auction setting consider the auction designsuggested by Paul Brewer and Charles Plott(1996) in which bidders seek to buy access to arailroad track In that application a bid specifiesa trainrsquos direction of travel departure and ar-rival times and price offered It is assumed that

trains travel at a uniform speed along the trackIn this setting the contract terms must includethe direction and the two times and the seller isconstrained to hold only combinations of bidssuch that trains maintain safe distances fromone another at all times

A second example of the generalized proxyprocess is a procurement auction in which thebuyer scores suppliers on the basis of suchfactors as quality excess capacity credit ratingand historical reliability as well as price and inwhich the buyer prefers to set aside someamount of its purchase for minority contractorsor to maintain geographic diversity of supply toreduce the chance of supply disruptions In anasset sale the seller may weigh the probabilitythat the sale will be completed for example dueto financing contingencies or because a union orantitrust regulators must approve the sale

The cumulative offer process model withgeneral contracts accommodates all of thesepossibilities The auctioneer in the model cor-responds to a single ldquohospitalrdquomdashhereafter theauctioneermdashwith a choice function CH thatselects her most preferred collection of contractproposals We have the following result (whichis first stated using different notation than in theAusubel-Milgrom paper)

THEOREM 16 When the doctor-offering cu-mulative offer process with a single hospitalterminates at time t with outcome (XD(t) XH(t))the hospitalrsquos choice CH(XH(t)) is a stable col-lection of contracts

Cumulative offer processes connect the the-ory of matching with contracts to the emergingtheory of package auctions and auctions withcomplex constraints

VI Conclusion

We have introduced a general model ofmatching with bilateral contracts that encom-passes and extends two-sided matching modelswith and without money and certain auctionmodels The new formulation allows some con-tract terms to be exogenously fixed and others tobe endogenous in any combinations In thisvery general framework we characterize stable

929VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

collections of contracts in terms of the solutionto a certain system of equations

The key to the analysis is to extend twoconcepts of demand theory to models with orwithout prices The first concept to be extendedis the notion of substitutes Our definition ap-plies essentially the Roth-Sotomayor substitut-able preferences condition to a more generalclass of contracts contracts are substitutes ifwhenever the set of feasible bilateral contractsexpands the set of contracts that the firm rejectsalso expands We show that (a) our definitioncoincides with the usual demand theory condi-tion when both apply (b) when contracts aresubstitutes a stable collection of contracts ex-ists and (c) if any hospital or firm has prefer-ences that are not substitutes then there arepreferences with single openings for each otherfirm such that no stable allocation exists Wefurther show that when the substitute conditionapplies (a) both the doctor-offering and hospi-tal-offering Gale-Shapley algorithms can berepresented as iterated operations of the sameoperator (starting from different initial condi-tions) and (b) starting at a stable allocationfrom which a doctor retires a natural marketdynamic mimics the Gale-Shapley process tofind a new stable allocation

The second relevant demand theory conceptis the law of demand which we extend both toinclude heterogeneous inputs and to encompassmodels with or without prices The law of ag-gregate demand condition holds that when theset of feasible contracts expands the number ofcontracts that the firm chooses to sign weaklyincreases In terms of traditional demand theorythis means that for example when the wages ofsome of a heterogeneous group of workers fallsif the workers are substitutes then the totalnumber of workers employed rises We showthat (a) when inputs are substitutes the choicesof a profit-maximizing firmhospital satisfy thelaw of aggregate demand Moreover when thechoices of every hospitalfirm satisfy the law ofaggregate demand and the substitutes conditionthen (b) the set of workersdoctors employed isthe same at every stable allocation (c) the num-ber employed by each firmhospital is also thesame and (d) truthful reporting is a dominantstrategy for doctors in the doctor-offering algo-rithm Moreover we prove (e) that if the law of

aggregate demand fails in any potentially ob-servable way then the preceding dominantstrategy property does not hold

For these results to be useful for practicalmechanism design one needs to account forhow preferences especially hospital prefer-ences are to be reported to the mechanismThere needs to be a convenient way for hospi-tals to express a rich array of preferences andone needs to know whether the preferences be-ing reported actually satisfy the conditions ofthe various theorems Toward that end we in-troduce a parametric form that we call extendedassignment valuations which strictly general-izes several existing specifications and whichalways satisfies both the substitutes and law ofaggregate demand conditions

Finally we introduce an alternative treatmentof the doctor-offering algorithm the cumulativeoffer process We show that when contracts aresubstitutes the previously characterized doctor-offering algorithm coincides exactly with a cu-mulative offer process When contracts are notsubstitutes but there is just one hospital (theldquoauctioneerrdquo) the cumulative offer process co-incides with the Ausubel-Milgrom ascendingproxy auction This identity clarifies the con-nection between these algorithms and com-bined with the dominant strategy theoremreported above generalizes the Ausubel-Milgromdominant strategy theorem for the proxyauctions

Our new approach reveals deep similaritiesamong several of the most successful auctionand matching designs in current use and amongthe environmental conditions in which theoret-ically the mechanisms should perform at theirbest Understanding these similarities can helpus to understand the limitations of these mech-anisms paving the way for new designs

APPENDIX

PROOF OF THEOREM 1Let (XD XH) X2 be a solution to (3) Then

XD XH XD RD(XD) CD(XD) andsimilarly XH XD XH RH(XH) CH(XH)so XH XD CH(XH) CD(XD)

Next we show that X XH XD is a stableset of contracts Since X CH(XH) CD(XD)it follows by revealed preference that X

930 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

CH(X) CD(X) so condition (i) of the defi-nition of stability is satisfied

Consider any hospital h and set of contractsX CD(X X) naming hospital h Since X CD(XD) revealed preference of the doctorsimplies that X XD CD(XD) and hence thatX RD(XD) X XD RD(XD) CD(XD) RD(XD) A Thus X X RD(XD) XHby (3) So if X Ch(X) then by the revealedpreference of hospital h X h Ch(XH) Ch(X) Hence X Ch(X X) so condition(ii) is satisfied So the set of contracts X isunblocked

For the converse suppose that X is a stablecollection of contracts Then CD(X) X LetXH be the set of contracts that the doctorsweakly prefer to X and XD the set of contractsthat doctors weakly disprefer By constructionX XH X XD X is a partition of X

To obtain (3) observe first that if there issome h such that Ch(XH) Xh then X Ch(XH) violates stability condition (ii) SoCh(XH) Xh for all h that is CH(XH) X Itfollows that X RH(XH) X (XH X) X (X XD) XD and that X RD(XD) X (XD CD(XD)) X (XD X) XH

Hence (XD XH) satisfies (3) and XH XD X

PROOF OF THEOREM 2Let i j ( j wj) C(w) and wi wi Define

Z(w) ( j wj)wj wj Then Z(wi wi) Z(w) If contracts are substitutes then R(Z(wiwi)) R(Z(w)) By (6) since ( j wj) C(w)it follows that ( j wj) C(Z(w)) so ( j wj) R(Z(w)) Hence ( j wj) R(Z(wi wi)) So ( jwj) Z(wi wi) R(Z(wi wi)) C(Z(wiwi)) and thus (j wj) C(wi wi) by assumption(6) Thus C satisfies demand theory substitutes

Conversely suppose contracts are not substi-tutes Then there exists a set X an element (iwi) X and ( j wj) R(X) such that ( j wj) R(X) where X X (i wi) Using (6)wi Wi(X) Let w W(X) and wi Wi(X)Then wi wi and ( j wj) C(w) but ( j wj) C(wi wi) so C does not satisfy the demandtheory substitutes condition

PROOF OF THEOREM 5We may limit attention to the case with

exactly two hospitals by specifying that

the doctors find the other hospitals to beunacceptable

Suppose Rh is not isotone Then there existssome x y X and X X such that for all x X xH h and such that x Rh(X) Rh(X y) By construction since x y Ch(X y) contracts x and y specify different doctorssay d1 xD yD d2 Let x and y denote thecorresponding contracts for doctors d1 and d2 inwhich hospital h is substituted for h

We specify preferences as follows first forhospital h we take x h y h A and allother contracts are unacceptable Second doc-tors in xD(CH(X) CH(X y)) d1 d2prefer their elements of CH(X) CH(X y)to any other contract Third d1 has x d1

x and ranks all other contracts lower Fourthd2 has y d2

y and ranks all other con-tracts lower Finally the remaining doctors findall contracts from hospitals h and h to beunacceptable

Consider a feasible acceptable allocation Xsuch that y X Since h and d2 can have onlyone contract in X x y X Then hrsquos con-tracts in X form a subset of X so x is notincluded and d1 has a contract less preferredthan x Then the deviation by (d1 h) to xblocks X

Consider a feasible acceptable allocation Xsuch that y X Then either x y X or Xis blocked by a coalition including h d1 and d2using the contracts x and y However if x y X then a deviation by (d2 h) to contract yblocks X

Since all feasible allocations are blockedthere exists no stable set of contracts

PROOF OF THEOREM 7Suppose X D H W and let Z(w) ( j

wj)wj wj Then the law of aggregate de-mand is the statement that for any wage vectorsw w satisfying w w such that the choices setsare singletons C(Z(w)) C(Z(w)) The proofis by contradiction Suppose the law of aggre-gate demand does not hold Then there exists awage vector w and a doctor d such that for some(and hence all) 0 C(Z(wd 13 wd)) C(Z(wd wd)) Since hrsquos preferences arequasi-linear changing doctor drsquos wage can af-fect the hiring of other doctors only if it affectsthe hiring of doctor d It follows that there are

931VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

exactly two optimal choices for the hospital atwage vector w these are C(Z(wd wd)) atwhich doctor d is hired and C(Z(wd 13 wd))at which d is not hired but such that two otherdoctors are hired that is there exist doctors dd C(Z(wd 13 wd)) C(Z(wd wd))Let the corresponding payoff for the hospital(when faced with wage vector w) be

Consider the wage vector w (wd wd 2 wdd) For positive and suffi-ciently small the hospitalrsquos payoff at wage vec-tor w is 13 2 if it chooses C(Z(wd 13 wd))and it is 13 if it chooses C(Z(wd wd))and one of these choices must be optimal SoC(w) C(Z(wd 13 wd)) But then raisingthe wage of doctor d from wd 2 to wd whileholding the other wages at wd reduces the de-mand for doctor d from one to zero in violationof the demand theory substitutes condition

PROOF OF THEOREM 8By definition XD X D so by revealed pref-

erence Cd(X D) Cd(XD) Also X H XH soby the law of aggregate demand Ch(X H) Ch(XH) By Theorem 1 CD(XD) CH(XH)and CD(X D) CH(X H) so yendD Cd(XD) yenhH Ch(XH) and yendD Cd(XD) yenhH Ch(XH)Combining these leads to yendD Cd(X D) yendD Cd(XD) yenhH Ch(XH) yenhH Ch(XH) yendD Cd(XD) which begins and ends with the samesum Hence none of the inequalities can bestrict

PROOF OF THEOREM 9Since Ch(X) Ch(X) there exists some

set Y X Y X and contract x such thatCh(Y) Ch(Y x) Since x Ch(Y x)(as otherwise Ch(Y) Ch(Y x) for thepreferences to be rationalizable) there must ex-ist two contracts y z Rh(Y x) Rh(Y)such that y x z y Moreover since y z Ch(Y) yD zD

Denoting by h the second hospital whose exis-tence is hypothesized by the theorem we specifypreferences as follows Let all the doctors with con-tracts in Y have those contracts be their most favoredand let all other doctors find any contract with hunacceptable Let all doctors find any contract notinvolving hospital h or h to be unacceptable

In principle there are three casesIf xD yD then let PxD

y x and PzD z

Then there exist two stable matches Ch(Y x) and Ch(Y) with zD employed in the firstmatch but not in the second

The case xD zD is symmetricFinally if yD xD zD then let x y z

denote contracts with hospital h where the doc-tors (and any other terms) are the same as in xy z respectively Specify the remaining prefer-ences by PxD

x x PyD y y PzD

z z and Ph y x A z Thenthere exist two different stable matches x Ch(Y) and y Ch(Y x) with zD em-ployed in the first match but not in the second

PROOF OF THEOREM 10Let X denote the collection of contracts cho-

sen by the algorithm when doctor d submitspreference Pd If this collection which is stableunder the reported preferences is not stableunder Pd then there exists a blocking coalitionThis blocking coalition must contain d as noother doctorrsquos preferences have changed butthat is impossible since x is drsquos favorite con-tract according to the preferences Pd Since X isstable under Pd the doctor-optimal stable matchunder Pd (the existence of which is guaranteedby Theorem 2) must make every doctor(weakly) better off than at X In particulardoctor d must obtain x

PROOF OF THEOREM 11From Theorem 10 Pd x also obtains x

Hence by the rural hospitals theorem d is em-ployed at every point in the core when Pd x issubmitted So every allocation X at which d isunemployed is blocked by some coalition andset of contracts when d submits Pd Conse-quently if d submits the preferences Pd y1 y2 yn x then every allocation at whichd is unemployed is still blocked by the samecoalition and set of contracts Since the doctor-best stable allocation is one at which d gets aPd-acceptable contract that allocation is weaklyPd-preferred to x Finally the doctor-optimalmatch when Pd is submitted is still the doctor-optimal match when Pd is submitted as drsquospreferences over contracts less preferred than xcannot be used to block a match where shereceives a contract weakly preferred to x

932 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

PROOF OF THEOREM 12Consider contracts x y and z such that

xD xD yD yD zD zD and xH yH zH h Let the preferences of the three identified bePxD

x x PyD y y and PzD

z z andlet those of h be Ph y z x Forthe other contracts x Y Ch(X) let x be xDrsquosmost favored contract For the remaining doctorslet any contract with h or h be unacceptable

With the preceding preferences the only sta-ble allocation includes contracts x and y leav-ing doctor zD unemployed If however zDmisrepresents her preferences and reports PzD

z z then the doctor-optimal stable matchincludes z leaving doctor zD better off

PROOF OF THEOREM 13Setting J 1 and T A it is clear by

inspection that this family includes all singletonvaluations

The family is closed under endowment be-cause given any such valuation v( J T)endowing a set of doctors T simply creates thevaluation v( J T T))

To verify that the family is closed underaggregation consider any two valuations v( J T) and v( J T) Since J and T are justindex sets we may assume without loss ofgenerality that T T J J A DefineT T T and J J J Let

(15) ij ij if i D T j Jij if i D T j J0 otherwise

By inspection of the optimization problems v( J T) v( J T) v( J T)

For the converse consider the valuation v( J T) given by (13) We derive it construc-tively from the singleton valuations aggrega-tion and endowment as follows Let vj be thesingleton valuation associated with row j inmatrix [ij] for j 1 J Since VEA isclosed under aggregation v1 vJ v( J A) VEA Since VEA is also closed underendowment we may endow the doctors in T toobtain v( J T) VEA

PROOF OF THEOREM 14L Shapley (1962) (see also Lehmann et al

2001) had already proved that every assignment

valuation without endowments v( J A) is asubstitutes valuation Ausubel and Milgrom(2002) prove that a valuation v is a substitutesvaluation if and only if the corresponding indi-rect profit function ((p) v(S) yendS pd) issubmodular Let be the indirect profit func-tion corresponding to v( J A) Then theindirect profit function corresponding to v( J T) is (p1 pN) (p1 pN 0 0)Since is the profit function of the substitutesvaluation vh it is submodular and hence issubmodular as well

PROOF OF THEOREM 15Suppose that contracts are substitutes for the

hospitals We proceed by induction The initialcondition specifies that the sequences are iden-tical through time t 0 Denote the sequencecorresponding to the cumulative offer processby a superscript C and denote the alternativeprocess defined by (9) with no superscript As-sume the inductive hypothesis that the se-quences are the same up to round t 1 andsuppress the corresponding superscripts for thevalues at that round Then XD(t) X RH(XH(t 1)) XD

C(t) This also implies that

(16) X XH t 1 XD t

To complete the proof we must show thatXH

C(t) XH(t) or equivalently that XH(t 1) CD(XD(t)) X RD(XD(t))

For t 2 XHC(t 2) XH

C(t 1) by con-struction so by the inductive hypothesis XH(t 2) XH(t 1) Since contracts are substitutesRH is isotone so X RH(XH(t 1)) X RH(XH(t 2)) and hence XD(t) XD(t 1)For t 1 the inclusion XD(t) XD(t 1) isimplied by the initial condition XD(0) X

Recall that by revealed preference RD isisotone It follows that RD(XD(t)) RD(XD(t 1)) and hence using (9) that XH(t 1) X RD(XD(t 1)) X RD(XD(t)) XH(t) ThusXH(t 1) XH(t 1) (X RD(XD(t))) XH(t 1) RD(XD(t)) So XH(t 1) CD(XD(t)) XH(t 1) (XD(t) RD(XD(t))) (XH(t 1) RD(XD(t))) (XD(t) RD(XD(t))) (XH(t 1) XD(t)) RD(XD(t)) X RD(XD(t)) where the last stepequality follows from (16)

933VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

PROOF OF THEOREM 16By construction any contract not in XH(t) is

less preferred by some doctor d than everycorresponding contract in XH(t) (because doctord offers her most preferred contracts in se-quence) So any collection of contracts thatincludes some not in XH(t) must be strictly lesspreferred by one of the doctors Any profitablecoalitional deviation must use only contracts inXH(t)

By construction the one hospitalauctioneermust be part of any deviating coalition andCH(XH(t)) is its strictly most preferred collectionof contracts in XH(t) so there is no profitablecoalitional deviation using just contracts in XH(t)

REFERENCES

Abdulkadiroglu Atila ldquoCollege Admissionswith Affirmative Actionrdquo Unpublished Pa-per 2003

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoBoston Public School MatchingrdquoAmerican Economic Review 2005a (Papersand Proceedings) 95(2) pp 368ndash71

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoThe New York City High SchoolMatchrdquo American Economic Review 2005b(Papers and Proceedings) 95(2) pp 364ndash67

Abdulkadiroglu Atila and Sonmez TayfunldquoSchool Choice A Mechanism Design Ap-proachrdquo American Economic Review 200393(3) pp 729ndash47

Adachi Hiroyuki ldquoOn a Characterization of Sta-ble Matchingsrdquo Economics Letters 200068(1) pp 43ndash49

Alkan Ahmet and Gale David ldquoStable ScheduleMatching under Revealed Preferencerdquo Jour-nal of Economic Theory 2003 112(2) pp289ndash306

Ausubel Lawrence M Cramton Peter and Mil-grom Paul R ldquoThe Clock-Poxy Auction APractical Combinatorial Auction Designrdquo inPeter Cramton Yoav Shoham and RichardSteinberg eds Combinatorial auctionsCambridge MA MIT Press 2005 ch 5

Ausubel Lawrence M and Milgrom Paul RldquoAscending Auctions with Package Bid-dingrdquo Frontiers of Theoretical Economics2002 1(1) Article 1

Blum Yosef Roth Alvin E and Rothblum UrielG ldquoVacancy Chains and Equilibration in Se-nior-Level Labor Marketsrdquo Journal of Eco-nomic Theory 1997 76(2) pp 362ndash411

Brewer Paul J and Plott Charles R ldquoA BinaryConflict Ascending Price (Bicap) Mechanismfor the Decentralized Allocation of the Rightto Use Railroad Tracksrdquo International Jour-nal of Industrial Organization 1996 14(6)pp 857ndash86

Bulow Jeremy and Levin Jonathan ldquoMatchingand Price Competitionrdquo Stanford UniversityStanford Economics Working Paper No1818 2003

Cramton Peter Shoham Yoav and SteinbergRichard Combinatorial auctions Cam-bridge MA MIT Press (forthcoming)

Crawford Vincent P and Knoer Elsie M ldquoJobMatching with Heterogeneous Firms andWorkersrdquo Econometrica 1981 49(2) pp437ndash50

Demange Gabrielle and Gale David ldquoThe Strat-egy Structure of Two-Sided Matching Mar-ketsrdquo Econometrica 1985 53(4) pp 873ndash88

Dubins Lester and Freedman David ldquoMachia-velli and the Gale-Shapley Algorithmrdquo Na-val Research Logistics Quarterly 198188(7) pp 485ndash94

Echenique Federico and Oviedo Jorge ldquoCoreMany-to-One Matchings by Fixed-PointMethodsrdquo Journal of Economic Theory2004 115(2) pp 358ndash76

Fleiner Tamas ldquoA Fixed-Point Approach toStable Matchings and Some ApplicationsrdquoMathematics of Operations Research 200328(1) pp 103ndash26

Gale David and Shapley Lloyd ldquoCollege Ad-missions and the Stability of MarriagerdquoAmerican Mathematical Monthly 196269(1) pp 9ndash15

Gul Faruk and Stacchetti Ennio ldquoWalrasianEquilibrium with Gross Substitutesrdquo Journalof Economic Theory 1999 87(1) pp 95ndash124

Kelso Alexander and Crawford Vincent P ldquoJobMatching Coalition Formation and GrossSubstitutesrdquo Econometrica 1982 50(6) pp1483ndash504

Lehmann Benny Lehmann Daniel and NisanNoam ldquoCombinatorial Auctions with De-

934 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

creasing Marginal Utilityrdquo Games and Eco-nomic Behavior 2005 (forthcoming)

Lien Yuan-Chuan and Yan Jun ldquoOn the GrossSubstitutes Conditionrdquo Unpublished Paper2003 httpwwwstamfordeduyclienTerm_Paper_Lien_Yanpdf

Martınez Ruth Masso Jordi Neme Alejandroand Oviedo Jorge ldquoSingle Agents and the Setof Many-to-One Stable Matchingsrdquo Journalof Economic Theory 2000 91(1) pp 91ndash105

Milgrom Paul R Putting auction theory towork Cambridge Cambridge UniversityPress 2004

Milgrom Paul R ldquoPutting Auction Theory toWork The Simultaneous Ascending Auc-tionrdquo Journal of Political Economy 2000108(2) pp 245ndash72

Porter David Rassenti Stephen RoopnarineAnil and Smith Vernon ldquoCombinatorial Auc-tion Designrdquo Proceedings of the NationalAcademy of Sciences 2003 100(19) pp11153ndash57

Reijnierse Hans van Gellekom Anita and PottersJos A M ldquoVerifying Gross SubstitutabilityrdquoEconomic Theory 2002 20(4) pp 767ndash76

Roth Alvin E ldquoThe Economics of Matching Sta-bility and Incentivesrdquo Mathematics of Opera-tions Research 1982 7(4) pp 617ndash28

Roth Alvin E ldquoStability and Polarization ofInterests in Job Matchingrdquo Econometrica1984 52(1) pp 47ndash57

Roth Alvin E ldquoThe College Admissions Prob-lem Is Not Equivalent to the Marriage Prob-lemrdquo Journal of Economic Theory 1985a36(2) pp 277ndash88

Roth Alvin E ldquoConflict and Coincidence ofInterest in Job Matching Some New Resultsand Open Questionsrdquo Mathematics of Oper-ations Research 1985b 10(3) pp 379ndash89

Roth Alvin E ldquoOn the Allocation of Residentsto Rural Hospitals A General Property ofTwo-Sided Matching Marketsrdquo Economet-rica 1986 54(2) pp 425ndash27

Roth Alvin E ldquoA Natural Experiment in theOrganization of Entry-Level Labor MarketsRegional Markets for New Physicians andSurgeons in the United Kingdomrdquo AmericanEconomic Review 1991 81(3) pp 415ndash40

Roth Alvin E and Peranson Elliott ldquoThe Rede-sign of the Matching Market for AmericanPhysicians Some Engineering Aspects ofEconomic Designrdquo American Economic Re-view 1999 89(4) pp 748ndash80

Roth Alvin E and Sotomayor Marilda Two-sided matching A study in game-theoreticmodeling and analysis Cambridge Cam-bridge University Press 1990

Sen Amartya Collective choice and social wel-fare San Francisco Holden-Day Inc 1970

Shapley Lloyd ldquoComplements and Substitutesin the Optimal Assignment Problemrdquo NavalResearch Logistics Quarterly 1962 9(1) pp45ndash48

935VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

Page 13: Matching with Contracts - Stanford Universityweb.stanford.edu/~milgrom/publishedarticles/Matching with... · 2005. 10. 22. · Gale-Shapley matching algorithm. Hence, the Gale-Shapley

aggregate demand guarantees that a doctor doesat least as well as reporting truthfully as byreporting any singleton Together these are thedominant strategy result

To understand why submitting unattainedcontracts cannot help a doctor d consider thefollowing Let x be the most-preferred contractthat d can obtain by submitting any preferencelist (holding all other submitted preferencesfixed) Note that all that d accomplishes whenreporting that certain contracts are preferred to xis to make it easier for some coalition to blockoutcomes involving x Thus if x is attainablewith any report it is attainable with the reportPd x that ranks x as the only acceptable con-tract This intuition is captured in the followingtheorem

THEOREM 10 Let hospitalsrsquo preferences sat-isfy the substitutes condition and let the match-ing algorithm produce the doctor-optimalmatch Fixing the preferences of hospitals andof doctors besides d let x be the outcome that dobtains by reporting preferences Pd z1 dz2 d

d zn d x Then the outcome that dobtains by reporting preferences Pd x is also x

Some other doctors may be strictly better offwhen d submits her shorter preference list thereare fewer collections of contracts that d nowobjects to so the core may become larger andthe doctor-optimal point of the enlarged coremakes all doctors weakly better off and maymake some strictly better off

Without the law of aggregate demand how-ever it may still be in a doctorrsquos interest toconceal her preferences for unattainable posi-tions To see this consider the case with twohospitals and three doctors where contracts aresimply elements of D H and let preferences be

(12) Pd1 h1 h2

Ph1 d3 d1 d2 d1 d2

Pd2 h2 h1

Ph2 d1 d2 d3

Pd3 h2 h1

With these preferences the only stable matchis (d1 h2) (d3 h1) which leaves d2 unem-ployed However if d2 were to reverse herranking of the two hospitals then (d1 h1) (d2h1) (d3 h2) would be chosen by the doctor-offering algorithm leaving d2 better off Essen-tially by offering a contract to h2 d2 haschanged the number of positions availableWhen the preferences of the hospitals satisfythe law of aggregate demand however mak-ing more offers to the hospitals (weakly) in-creases the number of contracts the hospitalsaccept

THEOREM 11 Let hospitalsrsquo preferences sat-isfy substitutes and the law of aggregate de-mand and let the matching algorithm producethe doctor-optimal match Then fixing the pref-erences of the other doctors and of all thehospitals let x be the contract that d obtains bysubmitting the set of preferences Pd z1 dz2 d

d zn d x Then the preferences Pd y1 y2 yn x yn131 yN

obtain a contract that is Pd-preferred or indif-ferent to x

According to this theorem when a doctorrsquostrue preferences are Pd the doctor can never dobetter according to these true preferences thanby reporting the preferences truthfully

In fact the law of aggregate demand is ldquoal-mostrdquo a necessary condition as well The excep-tions can arise because certain violations of thelaw of aggregate demand are unobservable fromthe choice data of the algorithm and these can-not affect incentives Thus consider an examplewhere terms t are included in the contract andwhere a hospital h has preferences (d1 ht1) (d1 h t1) (d2 h t2) (d1 h t1) (d2 h t2) Although these preferences violatethe law of aggregate demand the algorithm willnever ldquoseerdquo the violation as either (d1 h t1) d1

(d1 h t1) or (d1 h t1) d1(d1 h t1) Thus

whichever terms that d1 first offers will deter-mine a conditional set of preferences for thehospital that does satisfy the law of aggregatedemand (The hospital will never reject an offerof either (d1 h t1) or (d1 h t1))

The next theorem says that if some hospitalrsquospreferences violate the law of aggregate demandin a way that can even potentially be observed

925VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

from the hospitalrsquos choices then there existpreferences for the other agents such that it isnot a dominant strategy for doctors to reporttruthfully even when the other assumptions wehave used are satisfied

THEOREM 12 Let hospital h have prefer-ences such that Ch(X) Ch(X x) and letthere exist two contracts y z such that yD zD xD yD and y z Rh(X x) Rh(X)Then if another hospital h exists there existsingleton preferences for the hospitals besides hand preferences for the doctors such that it isnot a dominant strategy for all doctors to revealtheir preferences truthfully

Thus to the extent that the law of aggregatedemand for hospital preferences has observableconsequences for the progress of the doctor-offering algorithm it is an indispensable condi-tion to ensure the dominant strategy property fordoctors

IV Classes of Conforming Preferences

Although the class of substitutes valuations isquite limited13 it is broader than the set ofresponsive preferences in useful ways Thesubstitutes valuations accommodate all the af-firmative action and subspecialty constraints de-scribed above and allow a doctorrsquos marginalproduct to depend on which other doctors thehospital attracts

In this section we introduce a parameterizedclass of quasi-linear substitutes valuations forhospitals evaluating sets of new hires The val-uations are based on an endowed assignmentmodel according to which hospitals have a set

of jobs to fill and an existing endowment ofdoctors while doctorsrsquo productivities varyamong jobs A hospital values new doctors ac-cording to the their incremental value in theassignment problem

From a general job assignment perspectivethe key restrictions of endowed assignment val-uations are that each doctor can do one and onlyone job and that the hospitalrsquos output is the sumof outputs of its various jobs A hospital cannotuse one doctor for two jobs nor can it combinethe skills of two doctors in the same job Alsothere is no interaction in the productivity ofdoctors in different jobs Given this mathemat-ical structure if a doctor is lost it will always beoptimal for the hospital to retain all of its otherdoctors although it may choose to reassignsome of the retained doctors to fill vacatedpositions

Another way to describe the set of endowedassignment valuations VEA is to build it upfrom three properties as follows First a sin-gleton valuation is one of the form v(S) maxdSd for some nonnegative vector Sin-gleton valuations represent the possible valua-tions by a hospital with just one opening andVEA includes all singleton valuations Second ifa hospital is composed of two units j 1 2each of which has a valuation vj VEA then thehospitalrsquos maximum value from assigningworkers between its units denoted by (v1 v2)(S) maxRSv1(R) 13 v2(S R) is also inthe set We call this property closure underaggregation Third if a hospitalrsquos value is de-rived from a value in VEA by endowing thehospital with a set of doctors T then the hospi-talrsquos incremental value for extra doctorsv(ST) v(S T) v(T) is also in the set VEAWe call this property closure under endowmentFinally two valuations v1 and v2 are calledequivalent if they differ by an additive con-stant For example for any fixed set of doctorsT v( T) is equivalent to v( T)

THEOREM 13 Let VEA denote the smallestfamily of valuations of sets of doctors that in-cludes all the singleton valuations and is closedunder aggregation and endowment Then foreach v VEA there exists a set of jobs J a setof doctors T and a (D 13 T) J-matrix [ij]such that v is equivalent to the following

13 Hans Reijnierse et al (2002) (see also Yuan-ChuanLien and Jun Yan 2003) have characterized the valuationfunctions that satisfy the substitutes condition as followsLet v(S) be the hospitalrsquos value of doctor set S and letvS(T) v(S T) v(S) denote the incremental value of theset of doctors T Then doctors are substitutes if for every setS and three other doctors d1 d2 and d3 there is no uniquemaximum in vS(d1) 13 vS(d2 d3) vS(d2) 13 vS(d1 d3)vS(d3) 13 vS(d1 d2)

926 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

(13) vSJ T maxz

d S

djzdj subject to

d S

zdj 1 for j J

j J

zdj 1 for d S T0 for d S T

zdj 0 1 for all d j

Conversely for every such J T and v( J T) VEA

We dub this family of valuations the endowedassignment valuations because of the form ofoptimization (13) The family VEA is an exten-sion of the assignment valuations derived byLloyd Shapley (1962) used by Roth (19841985b) in models of matching with wages andexplicit job assignments and emphasized in astudy of package bidding by Lehmann et al(2001) The endowed assignment valuations arequite useful for applications They also fit nicelywith the theory reported in previous sections forthe following reason

THEOREM 14 Every endowed assignmentvaluation v( J T) VEA is a substitutesvaluation

To the best of our knowledge all of thesubstitutes valuations that have been used orproposed for practical applications are includedamong the endowed assignment valuations In-deed the question of whether all substitutesvaluations are endowed assignment valuationsis an open one Here we review some of themost popular valuations to show how they fitinto the class

The most commonly studied class of prefer-ences for matching problems like the Match forwhich employment terms are exogenouslyfixed are the responsive preferences Thesespecify that each hospital h has a fixed numberof openings nh a set of acceptable doctors Dh

A D and a strict ordering h of the acceptabledoctors When a doctor is unacceptable thatmeans that hiring the doctor is always worsethan leaving her position unfilled Given any setof available doctors the hospital hires its nh

most preferred acceptable doctors if that manyare available and otherwise hires all of theacceptable doctors

To map responsive preferences into the as-signment problem framework define a utilityfunction uh D3 to represent h and set theminimum acceptable utility to zero Formally(1) if d d Dh

A then d h dN uh(d) uh(d)and (2) d Dh

AN uh(d) 0 Using this utilitywe specify an assignment problem as followsJ 1 nh and dj uh(d) 13 1 and fix thewage at 1 Using a positive wage is a device toensure that the hospital strictly prefers not tohire a doctor it plans not to assign to any job Itis evident that with this valuation preferencethe hospital most prefers to hire the set of avail-able acceptable doctors with the highest rank-ing according to h

Among the extensions of responsive prefer-ences that have been most important in practiceare ones to accommodate quotas of variouskinds For example one use of quotas is tomanage subspecialties of internal medicine inwhich a certain number of positions are to befilled by doctors planning that subspecialty ifenough acceptable doctors are available Onecan reserve ms jobs for subspecialty s by pro-viding that there are ms jobs in which doctors inthat subspecialty have their productivity in-creased by a large constant M Then if msdoctors in subspecialty s are available at leastthat many will be demanded at the optimalsolution to (13) If that many qualified doctorsare not available the jobs will be filled by otherdoctors according to their productivities

Another use of quotas is for an affirmativeaction policy that absolutely reserves jobs formembers of certain target groups For each af-firmative action group G define a correspond-ing set of jobs JG and let J G JG Specifythat for any doctor d G and job j JG dj uh(d) and otherwise dj 0 One can alsointroduce an unrestricted category of jobs j thatany doctor can fill with productivity dj uh(d) This obviously ensures that a certainnumber of jobs are reserved for each targetgroup

A recent treatment of affirmative action byRoth (1991) extended by Abdulkadiroglu(2003) uses the class of responsive preferenceswith capacity constraints This class requires

927VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

that the set of doctors be partitioned into a finitenumber of affirmative action groups and that foreach group G the hospital has a capacity mG thatlimits the number of doctors who can be hiredfrom that group In addition at most nh doctorsin total can be hired

To represent such preferences using endowedassignment valuations let us specify that thereare mG jobs of type G and yenG mG jobs in totalThe hospital is endowed with nh yenG mGdoctors The endowed doctors have productivityij M in every job where M is a largenumber This ensures that at most nh new doc-tors will be hired at any optimum For thenonendowed doctors we calculate productivi-ties uh(d) in the same fashion as for the respon-sive preferences and set dj uh(d) for jobs j oftype G and dj 0 for all other jobs Thisensures that at most mG doctors will be hiredfrom group G By inspection this specificationrepresents Abdulkadiroglursquos affirmative actionpreferences

Unlike the specifications used for the currentNational Resident Matching Program algo-rithm the endowed assignment valuations per-mit overlapping affirmative action categoriesFor example suppose that a small hospital has atarget of hiring one female and one minoritydoctor In the endowed assignment structurethe hospital may assign a minority female doc-tor to fill either a minority slot or a female slotbut not both This is necessary to retain thesubstitutes demand structure for otherwisemaking a minority female doctor availablecould lead the hospital to hire a nonminoritymale doctor whom it would otherwise reject

Endowed assignment valuations thus providea flexible parameterized way for hospitals torepresent their preferences for matching with orwithout wages using a class of quasi-linear pref-erences that satisfies the substitutes conditionand the law of aggregate demand

V Cumulative Offer Processes and Auctions

The algorithms described by the system (9)with different starting points have the propertythat they can terminate only at a stable set ofcontracts Nevertheless unless preferences sat-isfy the substitutes condition the system is notguaranteed to converge at all even when a fixed

point exists In this section we offer a differentcharacterization of the Gale-Shapley doctor-offering algorithm that will prove especiallywell suited to situations in which contracts maynot be substitutes but in which there is just oneldquohospitalrdquo the auctioneer For now we allowthe possibility that there are several hospitals

The alternative representation is constructedby replacing the system of equations (9) by thefollowing system

(14) XD t X RH XH t 1

XH t XH t 1 CD XD t

We call the algorithm that begins with XD(0) X and XH(0) A and obeys (14) a cumulativeoffer process because the formalism capturesthe idea that hospitals accumulate offers fromdoctors in the set XH(t) and hold their bestchoices CH(XH(t)) from the accumulated setThere is no assumption of consistency imposedon the algorithm so it is possible that severalhospitals are ldquoholdingrdquo contract offers from thesame doctor The corresponding allocation is ofcourse infeasible since each doctor can ulti-mately accept just one contract

At each round t of the cumulative offer pro-cess all doctors make their best offers from theset of not-yet-rejected choices XD(t) but anydoctor d for whom a contract is being heldsimply repeats one of its earlier offers Thusnew offers are made only by doctors who havebeen rejected

To see why this is so let x CH(XH(t)) be acontract that is being held and consider thecorresponding doctor xD d By revealed pref-erence doctor d strictly prefers x to any contractthat she has not yet offered since those con-tracts were available to offer at the time that xwas offered Since drsquos most preferred contractin Xd(t) at the current time must be weaklypreferred to x it must be coincide with one ofdrsquos earlier offers

The second equation of system (14) is the onethat distinguishes the cumulative offer processfrom the system in (9) In the cumulative offerprocess without any assumptions about hospi-talsrsquo preferences XH(t) grows monotonicallyfrom round to round so the sequence of setsconverges In contrast the earlier process was

928 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

guaranteed to converge only when contracts aresubstitutes for the hospitals

When contracts are substitutes the two sys-tems of equations are equivalent

THEOREM 15 Suppose that contracts aresubstitutes for the hospitals and that XD(0) Xand XH(0) A Then the sequences of pairs(XD(t) XH(t)) generated by the two laws ofmotion (9) and (14) are identical

Even with the initial condition XD(0) X andXH(0) A the algorithms described by (9) and(14) may differ when contracts are not substi-tutes In that case by inspection of the system(14) the cumulative offer process still con-verges because XH(t) is bounded by the finiteset X and grows monotonically from round toround What is at issue is whether the hospitalrsquoschoice from its final search set in the cumulativeoffer process is a feasible and stable set ofcontracts

We will find below that when there is a singlehospital the outcome is indeed a feasible andstable set of contracts In that case the cumu-lative offer process coincides with the general-ized proxy auction of Ausubel and Milgrom(2002) Those authors analyze in detail the casewhen a bid consists of a price and a subset of theset of goods that the bidder wishes to buy Ateach round the seller ldquoholdsrdquo the collection ofbids that maximizes its total revenues subject tothe constraint that each good can be sold onlyonce The generalized proxy auction howeveris not limited to the sale of goods and in fact isidentical in scope to our present model ofmatching with contracts In particular the auc-tioneer may impose a variety of constraints onthe feasible collections of bids and may weighnonprice factors either exclusively or in com-bination with prices to decide which collectionof bids to hold Bidders for their part maymake bids that include factors besides price andmay not include price at all

To illustrate the role of general contracts inthis auction setting consider the auction designsuggested by Paul Brewer and Charles Plott(1996) in which bidders seek to buy access to arailroad track In that application a bid specifiesa trainrsquos direction of travel departure and ar-rival times and price offered It is assumed that

trains travel at a uniform speed along the trackIn this setting the contract terms must includethe direction and the two times and the seller isconstrained to hold only combinations of bidssuch that trains maintain safe distances fromone another at all times

A second example of the generalized proxyprocess is a procurement auction in which thebuyer scores suppliers on the basis of suchfactors as quality excess capacity credit ratingand historical reliability as well as price and inwhich the buyer prefers to set aside someamount of its purchase for minority contractorsor to maintain geographic diversity of supply toreduce the chance of supply disruptions In anasset sale the seller may weigh the probabilitythat the sale will be completed for example dueto financing contingencies or because a union orantitrust regulators must approve the sale

The cumulative offer process model withgeneral contracts accommodates all of thesepossibilities The auctioneer in the model cor-responds to a single ldquohospitalrdquomdashhereafter theauctioneermdashwith a choice function CH thatselects her most preferred collection of contractproposals We have the following result (whichis first stated using different notation than in theAusubel-Milgrom paper)

THEOREM 16 When the doctor-offering cu-mulative offer process with a single hospitalterminates at time t with outcome (XD(t) XH(t))the hospitalrsquos choice CH(XH(t)) is a stable col-lection of contracts

Cumulative offer processes connect the the-ory of matching with contracts to the emergingtheory of package auctions and auctions withcomplex constraints

VI Conclusion

We have introduced a general model ofmatching with bilateral contracts that encom-passes and extends two-sided matching modelswith and without money and certain auctionmodels The new formulation allows some con-tract terms to be exogenously fixed and others tobe endogenous in any combinations In thisvery general framework we characterize stable

929VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

collections of contracts in terms of the solutionto a certain system of equations

The key to the analysis is to extend twoconcepts of demand theory to models with orwithout prices The first concept to be extendedis the notion of substitutes Our definition ap-plies essentially the Roth-Sotomayor substitut-able preferences condition to a more generalclass of contracts contracts are substitutes ifwhenever the set of feasible bilateral contractsexpands the set of contracts that the firm rejectsalso expands We show that (a) our definitioncoincides with the usual demand theory condi-tion when both apply (b) when contracts aresubstitutes a stable collection of contracts ex-ists and (c) if any hospital or firm has prefer-ences that are not substitutes then there arepreferences with single openings for each otherfirm such that no stable allocation exists Wefurther show that when the substitute conditionapplies (a) both the doctor-offering and hospi-tal-offering Gale-Shapley algorithms can berepresented as iterated operations of the sameoperator (starting from different initial condi-tions) and (b) starting at a stable allocationfrom which a doctor retires a natural marketdynamic mimics the Gale-Shapley process tofind a new stable allocation

The second relevant demand theory conceptis the law of demand which we extend both toinclude heterogeneous inputs and to encompassmodels with or without prices The law of ag-gregate demand condition holds that when theset of feasible contracts expands the number ofcontracts that the firm chooses to sign weaklyincreases In terms of traditional demand theorythis means that for example when the wages ofsome of a heterogeneous group of workers fallsif the workers are substitutes then the totalnumber of workers employed rises We showthat (a) when inputs are substitutes the choicesof a profit-maximizing firmhospital satisfy thelaw of aggregate demand Moreover when thechoices of every hospitalfirm satisfy the law ofaggregate demand and the substitutes conditionthen (b) the set of workersdoctors employed isthe same at every stable allocation (c) the num-ber employed by each firmhospital is also thesame and (d) truthful reporting is a dominantstrategy for doctors in the doctor-offering algo-rithm Moreover we prove (e) that if the law of

aggregate demand fails in any potentially ob-servable way then the preceding dominantstrategy property does not hold

For these results to be useful for practicalmechanism design one needs to account forhow preferences especially hospital prefer-ences are to be reported to the mechanismThere needs to be a convenient way for hospi-tals to express a rich array of preferences andone needs to know whether the preferences be-ing reported actually satisfy the conditions ofthe various theorems Toward that end we in-troduce a parametric form that we call extendedassignment valuations which strictly general-izes several existing specifications and whichalways satisfies both the substitutes and law ofaggregate demand conditions

Finally we introduce an alternative treatmentof the doctor-offering algorithm the cumulativeoffer process We show that when contracts aresubstitutes the previously characterized doctor-offering algorithm coincides exactly with a cu-mulative offer process When contracts are notsubstitutes but there is just one hospital (theldquoauctioneerrdquo) the cumulative offer process co-incides with the Ausubel-Milgrom ascendingproxy auction This identity clarifies the con-nection between these algorithms and com-bined with the dominant strategy theoremreported above generalizes the Ausubel-Milgromdominant strategy theorem for the proxyauctions

Our new approach reveals deep similaritiesamong several of the most successful auctionand matching designs in current use and amongthe environmental conditions in which theoret-ically the mechanisms should perform at theirbest Understanding these similarities can helpus to understand the limitations of these mech-anisms paving the way for new designs

APPENDIX

PROOF OF THEOREM 1Let (XD XH) X2 be a solution to (3) Then

XD XH XD RD(XD) CD(XD) andsimilarly XH XD XH RH(XH) CH(XH)so XH XD CH(XH) CD(XD)

Next we show that X XH XD is a stableset of contracts Since X CH(XH) CD(XD)it follows by revealed preference that X

930 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

CH(X) CD(X) so condition (i) of the defi-nition of stability is satisfied

Consider any hospital h and set of contractsX CD(X X) naming hospital h Since X CD(XD) revealed preference of the doctorsimplies that X XD CD(XD) and hence thatX RD(XD) X XD RD(XD) CD(XD) RD(XD) A Thus X X RD(XD) XHby (3) So if X Ch(X) then by the revealedpreference of hospital h X h Ch(XH) Ch(X) Hence X Ch(X X) so condition(ii) is satisfied So the set of contracts X isunblocked

For the converse suppose that X is a stablecollection of contracts Then CD(X) X LetXH be the set of contracts that the doctorsweakly prefer to X and XD the set of contractsthat doctors weakly disprefer By constructionX XH X XD X is a partition of X

To obtain (3) observe first that if there issome h such that Ch(XH) Xh then X Ch(XH) violates stability condition (ii) SoCh(XH) Xh for all h that is CH(XH) X Itfollows that X RH(XH) X (XH X) X (X XD) XD and that X RD(XD) X (XD CD(XD)) X (XD X) XH

Hence (XD XH) satisfies (3) and XH XD X

PROOF OF THEOREM 2Let i j ( j wj) C(w) and wi wi Define

Z(w) ( j wj)wj wj Then Z(wi wi) Z(w) If contracts are substitutes then R(Z(wiwi)) R(Z(w)) By (6) since ( j wj) C(w)it follows that ( j wj) C(Z(w)) so ( j wj) R(Z(w)) Hence ( j wj) R(Z(wi wi)) So ( jwj) Z(wi wi) R(Z(wi wi)) C(Z(wiwi)) and thus (j wj) C(wi wi) by assumption(6) Thus C satisfies demand theory substitutes

Conversely suppose contracts are not substi-tutes Then there exists a set X an element (iwi) X and ( j wj) R(X) such that ( j wj) R(X) where X X (i wi) Using (6)wi Wi(X) Let w W(X) and wi Wi(X)Then wi wi and ( j wj) C(w) but ( j wj) C(wi wi) so C does not satisfy the demandtheory substitutes condition

PROOF OF THEOREM 5We may limit attention to the case with

exactly two hospitals by specifying that

the doctors find the other hospitals to beunacceptable

Suppose Rh is not isotone Then there existssome x y X and X X such that for all x X xH h and such that x Rh(X) Rh(X y) By construction since x y Ch(X y) contracts x and y specify different doctorssay d1 xD yD d2 Let x and y denote thecorresponding contracts for doctors d1 and d2 inwhich hospital h is substituted for h

We specify preferences as follows first forhospital h we take x h y h A and allother contracts are unacceptable Second doc-tors in xD(CH(X) CH(X y)) d1 d2prefer their elements of CH(X) CH(X y)to any other contract Third d1 has x d1

x and ranks all other contracts lower Fourthd2 has y d2

y and ranks all other con-tracts lower Finally the remaining doctors findall contracts from hospitals h and h to beunacceptable

Consider a feasible acceptable allocation Xsuch that y X Since h and d2 can have onlyone contract in X x y X Then hrsquos con-tracts in X form a subset of X so x is notincluded and d1 has a contract less preferredthan x Then the deviation by (d1 h) to xblocks X

Consider a feasible acceptable allocation Xsuch that y X Then either x y X or Xis blocked by a coalition including h d1 and d2using the contracts x and y However if x y X then a deviation by (d2 h) to contract yblocks X

Since all feasible allocations are blockedthere exists no stable set of contracts

PROOF OF THEOREM 7Suppose X D H W and let Z(w) ( j

wj)wj wj Then the law of aggregate de-mand is the statement that for any wage vectorsw w satisfying w w such that the choices setsare singletons C(Z(w)) C(Z(w)) The proofis by contradiction Suppose the law of aggre-gate demand does not hold Then there exists awage vector w and a doctor d such that for some(and hence all) 0 C(Z(wd 13 wd)) C(Z(wd wd)) Since hrsquos preferences arequasi-linear changing doctor drsquos wage can af-fect the hiring of other doctors only if it affectsthe hiring of doctor d It follows that there are

931VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

exactly two optimal choices for the hospital atwage vector w these are C(Z(wd wd)) atwhich doctor d is hired and C(Z(wd 13 wd))at which d is not hired but such that two otherdoctors are hired that is there exist doctors dd C(Z(wd 13 wd)) C(Z(wd wd))Let the corresponding payoff for the hospital(when faced with wage vector w) be

Consider the wage vector w (wd wd 2 wdd) For positive and suffi-ciently small the hospitalrsquos payoff at wage vec-tor w is 13 2 if it chooses C(Z(wd 13 wd))and it is 13 if it chooses C(Z(wd wd))and one of these choices must be optimal SoC(w) C(Z(wd 13 wd)) But then raisingthe wage of doctor d from wd 2 to wd whileholding the other wages at wd reduces the de-mand for doctor d from one to zero in violationof the demand theory substitutes condition

PROOF OF THEOREM 8By definition XD X D so by revealed pref-

erence Cd(X D) Cd(XD) Also X H XH soby the law of aggregate demand Ch(X H) Ch(XH) By Theorem 1 CD(XD) CH(XH)and CD(X D) CH(X H) so yendD Cd(XD) yenhH Ch(XH) and yendD Cd(XD) yenhH Ch(XH)Combining these leads to yendD Cd(X D) yendD Cd(XD) yenhH Ch(XH) yenhH Ch(XH) yendD Cd(XD) which begins and ends with the samesum Hence none of the inequalities can bestrict

PROOF OF THEOREM 9Since Ch(X) Ch(X) there exists some

set Y X Y X and contract x such thatCh(Y) Ch(Y x) Since x Ch(Y x)(as otherwise Ch(Y) Ch(Y x) for thepreferences to be rationalizable) there must ex-ist two contracts y z Rh(Y x) Rh(Y)such that y x z y Moreover since y z Ch(Y) yD zD

Denoting by h the second hospital whose exis-tence is hypothesized by the theorem we specifypreferences as follows Let all the doctors with con-tracts in Y have those contracts be their most favoredand let all other doctors find any contract with hunacceptable Let all doctors find any contract notinvolving hospital h or h to be unacceptable

In principle there are three casesIf xD yD then let PxD

y x and PzD z

Then there exist two stable matches Ch(Y x) and Ch(Y) with zD employed in the firstmatch but not in the second

The case xD zD is symmetricFinally if yD xD zD then let x y z

denote contracts with hospital h where the doc-tors (and any other terms) are the same as in xy z respectively Specify the remaining prefer-ences by PxD

x x PyD y y PzD

z z and Ph y x A z Thenthere exist two different stable matches x Ch(Y) and y Ch(Y x) with zD em-ployed in the first match but not in the second

PROOF OF THEOREM 10Let X denote the collection of contracts cho-

sen by the algorithm when doctor d submitspreference Pd If this collection which is stableunder the reported preferences is not stableunder Pd then there exists a blocking coalitionThis blocking coalition must contain d as noother doctorrsquos preferences have changed butthat is impossible since x is drsquos favorite con-tract according to the preferences Pd Since X isstable under Pd the doctor-optimal stable matchunder Pd (the existence of which is guaranteedby Theorem 2) must make every doctor(weakly) better off than at X In particulardoctor d must obtain x

PROOF OF THEOREM 11From Theorem 10 Pd x also obtains x

Hence by the rural hospitals theorem d is em-ployed at every point in the core when Pd x issubmitted So every allocation X at which d isunemployed is blocked by some coalition andset of contracts when d submits Pd Conse-quently if d submits the preferences Pd y1 y2 yn x then every allocation at whichd is unemployed is still blocked by the samecoalition and set of contracts Since the doctor-best stable allocation is one at which d gets aPd-acceptable contract that allocation is weaklyPd-preferred to x Finally the doctor-optimalmatch when Pd is submitted is still the doctor-optimal match when Pd is submitted as drsquospreferences over contracts less preferred than xcannot be used to block a match where shereceives a contract weakly preferred to x

932 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

PROOF OF THEOREM 12Consider contracts x y and z such that

xD xD yD yD zD zD and xH yH zH h Let the preferences of the three identified bePxD

x x PyD y y and PzD

z z andlet those of h be Ph y z x Forthe other contracts x Y Ch(X) let x be xDrsquosmost favored contract For the remaining doctorslet any contract with h or h be unacceptable

With the preceding preferences the only sta-ble allocation includes contracts x and y leav-ing doctor zD unemployed If however zDmisrepresents her preferences and reports PzD

z z then the doctor-optimal stable matchincludes z leaving doctor zD better off

PROOF OF THEOREM 13Setting J 1 and T A it is clear by

inspection that this family includes all singletonvaluations

The family is closed under endowment be-cause given any such valuation v( J T)endowing a set of doctors T simply creates thevaluation v( J T T))

To verify that the family is closed underaggregation consider any two valuations v( J T) and v( J T) Since J and T are justindex sets we may assume without loss ofgenerality that T T J J A DefineT T T and J J J Let

(15) ij ij if i D T j Jij if i D T j J0 otherwise

By inspection of the optimization problems v( J T) v( J T) v( J T)

For the converse consider the valuation v( J T) given by (13) We derive it construc-tively from the singleton valuations aggrega-tion and endowment as follows Let vj be thesingleton valuation associated with row j inmatrix [ij] for j 1 J Since VEA isclosed under aggregation v1 vJ v( J A) VEA Since VEA is also closed underendowment we may endow the doctors in T toobtain v( J T) VEA

PROOF OF THEOREM 14L Shapley (1962) (see also Lehmann et al

2001) had already proved that every assignment

valuation without endowments v( J A) is asubstitutes valuation Ausubel and Milgrom(2002) prove that a valuation v is a substitutesvaluation if and only if the corresponding indi-rect profit function ((p) v(S) yendS pd) issubmodular Let be the indirect profit func-tion corresponding to v( J A) Then theindirect profit function corresponding to v( J T) is (p1 pN) (p1 pN 0 0)Since is the profit function of the substitutesvaluation vh it is submodular and hence issubmodular as well

PROOF OF THEOREM 15Suppose that contracts are substitutes for the

hospitals We proceed by induction The initialcondition specifies that the sequences are iden-tical through time t 0 Denote the sequencecorresponding to the cumulative offer processby a superscript C and denote the alternativeprocess defined by (9) with no superscript As-sume the inductive hypothesis that the se-quences are the same up to round t 1 andsuppress the corresponding superscripts for thevalues at that round Then XD(t) X RH(XH(t 1)) XD

C(t) This also implies that

(16) X XH t 1 XD t

To complete the proof we must show thatXH

C(t) XH(t) or equivalently that XH(t 1) CD(XD(t)) X RD(XD(t))

For t 2 XHC(t 2) XH

C(t 1) by con-struction so by the inductive hypothesis XH(t 2) XH(t 1) Since contracts are substitutesRH is isotone so X RH(XH(t 1)) X RH(XH(t 2)) and hence XD(t) XD(t 1)For t 1 the inclusion XD(t) XD(t 1) isimplied by the initial condition XD(0) X

Recall that by revealed preference RD isisotone It follows that RD(XD(t)) RD(XD(t 1)) and hence using (9) that XH(t 1) X RD(XD(t 1)) X RD(XD(t)) XH(t) ThusXH(t 1) XH(t 1) (X RD(XD(t))) XH(t 1) RD(XD(t)) So XH(t 1) CD(XD(t)) XH(t 1) (XD(t) RD(XD(t))) (XH(t 1) RD(XD(t))) (XD(t) RD(XD(t))) (XH(t 1) XD(t)) RD(XD(t)) X RD(XD(t)) where the last stepequality follows from (16)

933VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

PROOF OF THEOREM 16By construction any contract not in XH(t) is

less preferred by some doctor d than everycorresponding contract in XH(t) (because doctord offers her most preferred contracts in se-quence) So any collection of contracts thatincludes some not in XH(t) must be strictly lesspreferred by one of the doctors Any profitablecoalitional deviation must use only contracts inXH(t)

By construction the one hospitalauctioneermust be part of any deviating coalition andCH(XH(t)) is its strictly most preferred collectionof contracts in XH(t) so there is no profitablecoalitional deviation using just contracts in XH(t)

REFERENCES

Abdulkadiroglu Atila ldquoCollege Admissionswith Affirmative Actionrdquo Unpublished Pa-per 2003

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoBoston Public School MatchingrdquoAmerican Economic Review 2005a (Papersand Proceedings) 95(2) pp 368ndash71

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoThe New York City High SchoolMatchrdquo American Economic Review 2005b(Papers and Proceedings) 95(2) pp 364ndash67

Abdulkadiroglu Atila and Sonmez TayfunldquoSchool Choice A Mechanism Design Ap-proachrdquo American Economic Review 200393(3) pp 729ndash47

Adachi Hiroyuki ldquoOn a Characterization of Sta-ble Matchingsrdquo Economics Letters 200068(1) pp 43ndash49

Alkan Ahmet and Gale David ldquoStable ScheduleMatching under Revealed Preferencerdquo Jour-nal of Economic Theory 2003 112(2) pp289ndash306

Ausubel Lawrence M Cramton Peter and Mil-grom Paul R ldquoThe Clock-Poxy Auction APractical Combinatorial Auction Designrdquo inPeter Cramton Yoav Shoham and RichardSteinberg eds Combinatorial auctionsCambridge MA MIT Press 2005 ch 5

Ausubel Lawrence M and Milgrom Paul RldquoAscending Auctions with Package Bid-dingrdquo Frontiers of Theoretical Economics2002 1(1) Article 1

Blum Yosef Roth Alvin E and Rothblum UrielG ldquoVacancy Chains and Equilibration in Se-nior-Level Labor Marketsrdquo Journal of Eco-nomic Theory 1997 76(2) pp 362ndash411

Brewer Paul J and Plott Charles R ldquoA BinaryConflict Ascending Price (Bicap) Mechanismfor the Decentralized Allocation of the Rightto Use Railroad Tracksrdquo International Jour-nal of Industrial Organization 1996 14(6)pp 857ndash86

Bulow Jeremy and Levin Jonathan ldquoMatchingand Price Competitionrdquo Stanford UniversityStanford Economics Working Paper No1818 2003

Cramton Peter Shoham Yoav and SteinbergRichard Combinatorial auctions Cam-bridge MA MIT Press (forthcoming)

Crawford Vincent P and Knoer Elsie M ldquoJobMatching with Heterogeneous Firms andWorkersrdquo Econometrica 1981 49(2) pp437ndash50

Demange Gabrielle and Gale David ldquoThe Strat-egy Structure of Two-Sided Matching Mar-ketsrdquo Econometrica 1985 53(4) pp 873ndash88

Dubins Lester and Freedman David ldquoMachia-velli and the Gale-Shapley Algorithmrdquo Na-val Research Logistics Quarterly 198188(7) pp 485ndash94

Echenique Federico and Oviedo Jorge ldquoCoreMany-to-One Matchings by Fixed-PointMethodsrdquo Journal of Economic Theory2004 115(2) pp 358ndash76

Fleiner Tamas ldquoA Fixed-Point Approach toStable Matchings and Some ApplicationsrdquoMathematics of Operations Research 200328(1) pp 103ndash26

Gale David and Shapley Lloyd ldquoCollege Ad-missions and the Stability of MarriagerdquoAmerican Mathematical Monthly 196269(1) pp 9ndash15

Gul Faruk and Stacchetti Ennio ldquoWalrasianEquilibrium with Gross Substitutesrdquo Journalof Economic Theory 1999 87(1) pp 95ndash124

Kelso Alexander and Crawford Vincent P ldquoJobMatching Coalition Formation and GrossSubstitutesrdquo Econometrica 1982 50(6) pp1483ndash504

Lehmann Benny Lehmann Daniel and NisanNoam ldquoCombinatorial Auctions with De-

934 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

creasing Marginal Utilityrdquo Games and Eco-nomic Behavior 2005 (forthcoming)

Lien Yuan-Chuan and Yan Jun ldquoOn the GrossSubstitutes Conditionrdquo Unpublished Paper2003 httpwwwstamfordeduyclienTerm_Paper_Lien_Yanpdf

Martınez Ruth Masso Jordi Neme Alejandroand Oviedo Jorge ldquoSingle Agents and the Setof Many-to-One Stable Matchingsrdquo Journalof Economic Theory 2000 91(1) pp 91ndash105

Milgrom Paul R Putting auction theory towork Cambridge Cambridge UniversityPress 2004

Milgrom Paul R ldquoPutting Auction Theory toWork The Simultaneous Ascending Auc-tionrdquo Journal of Political Economy 2000108(2) pp 245ndash72

Porter David Rassenti Stephen RoopnarineAnil and Smith Vernon ldquoCombinatorial Auc-tion Designrdquo Proceedings of the NationalAcademy of Sciences 2003 100(19) pp11153ndash57

Reijnierse Hans van Gellekom Anita and PottersJos A M ldquoVerifying Gross SubstitutabilityrdquoEconomic Theory 2002 20(4) pp 767ndash76

Roth Alvin E ldquoThe Economics of Matching Sta-bility and Incentivesrdquo Mathematics of Opera-tions Research 1982 7(4) pp 617ndash28

Roth Alvin E ldquoStability and Polarization ofInterests in Job Matchingrdquo Econometrica1984 52(1) pp 47ndash57

Roth Alvin E ldquoThe College Admissions Prob-lem Is Not Equivalent to the Marriage Prob-lemrdquo Journal of Economic Theory 1985a36(2) pp 277ndash88

Roth Alvin E ldquoConflict and Coincidence ofInterest in Job Matching Some New Resultsand Open Questionsrdquo Mathematics of Oper-ations Research 1985b 10(3) pp 379ndash89

Roth Alvin E ldquoOn the Allocation of Residentsto Rural Hospitals A General Property ofTwo-Sided Matching Marketsrdquo Economet-rica 1986 54(2) pp 425ndash27

Roth Alvin E ldquoA Natural Experiment in theOrganization of Entry-Level Labor MarketsRegional Markets for New Physicians andSurgeons in the United Kingdomrdquo AmericanEconomic Review 1991 81(3) pp 415ndash40

Roth Alvin E and Peranson Elliott ldquoThe Rede-sign of the Matching Market for AmericanPhysicians Some Engineering Aspects ofEconomic Designrdquo American Economic Re-view 1999 89(4) pp 748ndash80

Roth Alvin E and Sotomayor Marilda Two-sided matching A study in game-theoreticmodeling and analysis Cambridge Cam-bridge University Press 1990

Sen Amartya Collective choice and social wel-fare San Francisco Holden-Day Inc 1970

Shapley Lloyd ldquoComplements and Substitutesin the Optimal Assignment Problemrdquo NavalResearch Logistics Quarterly 1962 9(1) pp45ndash48

935VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

Page 14: Matching with Contracts - Stanford Universityweb.stanford.edu/~milgrom/publishedarticles/Matching with... · 2005. 10. 22. · Gale-Shapley matching algorithm. Hence, the Gale-Shapley

from the hospitalrsquos choices then there existpreferences for the other agents such that it isnot a dominant strategy for doctors to reporttruthfully even when the other assumptions wehave used are satisfied

THEOREM 12 Let hospital h have prefer-ences such that Ch(X) Ch(X x) and letthere exist two contracts y z such that yD zD xD yD and y z Rh(X x) Rh(X)Then if another hospital h exists there existsingleton preferences for the hospitals besides hand preferences for the doctors such that it isnot a dominant strategy for all doctors to revealtheir preferences truthfully

Thus to the extent that the law of aggregatedemand for hospital preferences has observableconsequences for the progress of the doctor-offering algorithm it is an indispensable condi-tion to ensure the dominant strategy property fordoctors

IV Classes of Conforming Preferences

Although the class of substitutes valuations isquite limited13 it is broader than the set ofresponsive preferences in useful ways Thesubstitutes valuations accommodate all the af-firmative action and subspecialty constraints de-scribed above and allow a doctorrsquos marginalproduct to depend on which other doctors thehospital attracts

In this section we introduce a parameterizedclass of quasi-linear substitutes valuations forhospitals evaluating sets of new hires The val-uations are based on an endowed assignmentmodel according to which hospitals have a set

of jobs to fill and an existing endowment ofdoctors while doctorsrsquo productivities varyamong jobs A hospital values new doctors ac-cording to the their incremental value in theassignment problem

From a general job assignment perspectivethe key restrictions of endowed assignment val-uations are that each doctor can do one and onlyone job and that the hospitalrsquos output is the sumof outputs of its various jobs A hospital cannotuse one doctor for two jobs nor can it combinethe skills of two doctors in the same job Alsothere is no interaction in the productivity ofdoctors in different jobs Given this mathemat-ical structure if a doctor is lost it will always beoptimal for the hospital to retain all of its otherdoctors although it may choose to reassignsome of the retained doctors to fill vacatedpositions

Another way to describe the set of endowedassignment valuations VEA is to build it upfrom three properties as follows First a sin-gleton valuation is one of the form v(S) maxdSd for some nonnegative vector Sin-gleton valuations represent the possible valua-tions by a hospital with just one opening andVEA includes all singleton valuations Second ifa hospital is composed of two units j 1 2each of which has a valuation vj VEA then thehospitalrsquos maximum value from assigningworkers between its units denoted by (v1 v2)(S) maxRSv1(R) 13 v2(S R) is also inthe set We call this property closure underaggregation Third if a hospitalrsquos value is de-rived from a value in VEA by endowing thehospital with a set of doctors T then the hospi-talrsquos incremental value for extra doctorsv(ST) v(S T) v(T) is also in the set VEAWe call this property closure under endowmentFinally two valuations v1 and v2 are calledequivalent if they differ by an additive con-stant For example for any fixed set of doctorsT v( T) is equivalent to v( T)

THEOREM 13 Let VEA denote the smallestfamily of valuations of sets of doctors that in-cludes all the singleton valuations and is closedunder aggregation and endowment Then foreach v VEA there exists a set of jobs J a setof doctors T and a (D 13 T) J-matrix [ij]such that v is equivalent to the following

13 Hans Reijnierse et al (2002) (see also Yuan-ChuanLien and Jun Yan 2003) have characterized the valuationfunctions that satisfy the substitutes condition as followsLet v(S) be the hospitalrsquos value of doctor set S and letvS(T) v(S T) v(S) denote the incremental value of theset of doctors T Then doctors are substitutes if for every setS and three other doctors d1 d2 and d3 there is no uniquemaximum in vS(d1) 13 vS(d2 d3) vS(d2) 13 vS(d1 d3)vS(d3) 13 vS(d1 d2)

926 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

(13) vSJ T maxz

d S

djzdj subject to

d S

zdj 1 for j J

j J

zdj 1 for d S T0 for d S T

zdj 0 1 for all d j

Conversely for every such J T and v( J T) VEA

We dub this family of valuations the endowedassignment valuations because of the form ofoptimization (13) The family VEA is an exten-sion of the assignment valuations derived byLloyd Shapley (1962) used by Roth (19841985b) in models of matching with wages andexplicit job assignments and emphasized in astudy of package bidding by Lehmann et al(2001) The endowed assignment valuations arequite useful for applications They also fit nicelywith the theory reported in previous sections forthe following reason

THEOREM 14 Every endowed assignmentvaluation v( J T) VEA is a substitutesvaluation

To the best of our knowledge all of thesubstitutes valuations that have been used orproposed for practical applications are includedamong the endowed assignment valuations In-deed the question of whether all substitutesvaluations are endowed assignment valuationsis an open one Here we review some of themost popular valuations to show how they fitinto the class

The most commonly studied class of prefer-ences for matching problems like the Match forwhich employment terms are exogenouslyfixed are the responsive preferences Thesespecify that each hospital h has a fixed numberof openings nh a set of acceptable doctors Dh

A D and a strict ordering h of the acceptabledoctors When a doctor is unacceptable thatmeans that hiring the doctor is always worsethan leaving her position unfilled Given any setof available doctors the hospital hires its nh

most preferred acceptable doctors if that manyare available and otherwise hires all of theacceptable doctors

To map responsive preferences into the as-signment problem framework define a utilityfunction uh D3 to represent h and set theminimum acceptable utility to zero Formally(1) if d d Dh

A then d h dN uh(d) uh(d)and (2) d Dh

AN uh(d) 0 Using this utilitywe specify an assignment problem as followsJ 1 nh and dj uh(d) 13 1 and fix thewage at 1 Using a positive wage is a device toensure that the hospital strictly prefers not tohire a doctor it plans not to assign to any job Itis evident that with this valuation preferencethe hospital most prefers to hire the set of avail-able acceptable doctors with the highest rank-ing according to h

Among the extensions of responsive prefer-ences that have been most important in practiceare ones to accommodate quotas of variouskinds For example one use of quotas is tomanage subspecialties of internal medicine inwhich a certain number of positions are to befilled by doctors planning that subspecialty ifenough acceptable doctors are available Onecan reserve ms jobs for subspecialty s by pro-viding that there are ms jobs in which doctors inthat subspecialty have their productivity in-creased by a large constant M Then if msdoctors in subspecialty s are available at leastthat many will be demanded at the optimalsolution to (13) If that many qualified doctorsare not available the jobs will be filled by otherdoctors according to their productivities

Another use of quotas is for an affirmativeaction policy that absolutely reserves jobs formembers of certain target groups For each af-firmative action group G define a correspond-ing set of jobs JG and let J G JG Specifythat for any doctor d G and job j JG dj uh(d) and otherwise dj 0 One can alsointroduce an unrestricted category of jobs j thatany doctor can fill with productivity dj uh(d) This obviously ensures that a certainnumber of jobs are reserved for each targetgroup

A recent treatment of affirmative action byRoth (1991) extended by Abdulkadiroglu(2003) uses the class of responsive preferenceswith capacity constraints This class requires

927VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

that the set of doctors be partitioned into a finitenumber of affirmative action groups and that foreach group G the hospital has a capacity mG thatlimits the number of doctors who can be hiredfrom that group In addition at most nh doctorsin total can be hired

To represent such preferences using endowedassignment valuations let us specify that thereare mG jobs of type G and yenG mG jobs in totalThe hospital is endowed with nh yenG mGdoctors The endowed doctors have productivityij M in every job where M is a largenumber This ensures that at most nh new doc-tors will be hired at any optimum For thenonendowed doctors we calculate productivi-ties uh(d) in the same fashion as for the respon-sive preferences and set dj uh(d) for jobs j oftype G and dj 0 for all other jobs Thisensures that at most mG doctors will be hiredfrom group G By inspection this specificationrepresents Abdulkadiroglursquos affirmative actionpreferences

Unlike the specifications used for the currentNational Resident Matching Program algo-rithm the endowed assignment valuations per-mit overlapping affirmative action categoriesFor example suppose that a small hospital has atarget of hiring one female and one minoritydoctor In the endowed assignment structurethe hospital may assign a minority female doc-tor to fill either a minority slot or a female slotbut not both This is necessary to retain thesubstitutes demand structure for otherwisemaking a minority female doctor availablecould lead the hospital to hire a nonminoritymale doctor whom it would otherwise reject

Endowed assignment valuations thus providea flexible parameterized way for hospitals torepresent their preferences for matching with orwithout wages using a class of quasi-linear pref-erences that satisfies the substitutes conditionand the law of aggregate demand

V Cumulative Offer Processes and Auctions

The algorithms described by the system (9)with different starting points have the propertythat they can terminate only at a stable set ofcontracts Nevertheless unless preferences sat-isfy the substitutes condition the system is notguaranteed to converge at all even when a fixed

point exists In this section we offer a differentcharacterization of the Gale-Shapley doctor-offering algorithm that will prove especiallywell suited to situations in which contracts maynot be substitutes but in which there is just oneldquohospitalrdquo the auctioneer For now we allowthe possibility that there are several hospitals

The alternative representation is constructedby replacing the system of equations (9) by thefollowing system

(14) XD t X RH XH t 1

XH t XH t 1 CD XD t

We call the algorithm that begins with XD(0) X and XH(0) A and obeys (14) a cumulativeoffer process because the formalism capturesthe idea that hospitals accumulate offers fromdoctors in the set XH(t) and hold their bestchoices CH(XH(t)) from the accumulated setThere is no assumption of consistency imposedon the algorithm so it is possible that severalhospitals are ldquoholdingrdquo contract offers from thesame doctor The corresponding allocation is ofcourse infeasible since each doctor can ulti-mately accept just one contract

At each round t of the cumulative offer pro-cess all doctors make their best offers from theset of not-yet-rejected choices XD(t) but anydoctor d for whom a contract is being heldsimply repeats one of its earlier offers Thusnew offers are made only by doctors who havebeen rejected

To see why this is so let x CH(XH(t)) be acontract that is being held and consider thecorresponding doctor xD d By revealed pref-erence doctor d strictly prefers x to any contractthat she has not yet offered since those con-tracts were available to offer at the time that xwas offered Since drsquos most preferred contractin Xd(t) at the current time must be weaklypreferred to x it must be coincide with one ofdrsquos earlier offers

The second equation of system (14) is the onethat distinguishes the cumulative offer processfrom the system in (9) In the cumulative offerprocess without any assumptions about hospi-talsrsquo preferences XH(t) grows monotonicallyfrom round to round so the sequence of setsconverges In contrast the earlier process was

928 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

guaranteed to converge only when contracts aresubstitutes for the hospitals

When contracts are substitutes the two sys-tems of equations are equivalent

THEOREM 15 Suppose that contracts aresubstitutes for the hospitals and that XD(0) Xand XH(0) A Then the sequences of pairs(XD(t) XH(t)) generated by the two laws ofmotion (9) and (14) are identical

Even with the initial condition XD(0) X andXH(0) A the algorithms described by (9) and(14) may differ when contracts are not substi-tutes In that case by inspection of the system(14) the cumulative offer process still con-verges because XH(t) is bounded by the finiteset X and grows monotonically from round toround What is at issue is whether the hospitalrsquoschoice from its final search set in the cumulativeoffer process is a feasible and stable set ofcontracts

We will find below that when there is a singlehospital the outcome is indeed a feasible andstable set of contracts In that case the cumu-lative offer process coincides with the general-ized proxy auction of Ausubel and Milgrom(2002) Those authors analyze in detail the casewhen a bid consists of a price and a subset of theset of goods that the bidder wishes to buy Ateach round the seller ldquoholdsrdquo the collection ofbids that maximizes its total revenues subject tothe constraint that each good can be sold onlyonce The generalized proxy auction howeveris not limited to the sale of goods and in fact isidentical in scope to our present model ofmatching with contracts In particular the auc-tioneer may impose a variety of constraints onthe feasible collections of bids and may weighnonprice factors either exclusively or in com-bination with prices to decide which collectionof bids to hold Bidders for their part maymake bids that include factors besides price andmay not include price at all

To illustrate the role of general contracts inthis auction setting consider the auction designsuggested by Paul Brewer and Charles Plott(1996) in which bidders seek to buy access to arailroad track In that application a bid specifiesa trainrsquos direction of travel departure and ar-rival times and price offered It is assumed that

trains travel at a uniform speed along the trackIn this setting the contract terms must includethe direction and the two times and the seller isconstrained to hold only combinations of bidssuch that trains maintain safe distances fromone another at all times

A second example of the generalized proxyprocess is a procurement auction in which thebuyer scores suppliers on the basis of suchfactors as quality excess capacity credit ratingand historical reliability as well as price and inwhich the buyer prefers to set aside someamount of its purchase for minority contractorsor to maintain geographic diversity of supply toreduce the chance of supply disruptions In anasset sale the seller may weigh the probabilitythat the sale will be completed for example dueto financing contingencies or because a union orantitrust regulators must approve the sale

The cumulative offer process model withgeneral contracts accommodates all of thesepossibilities The auctioneer in the model cor-responds to a single ldquohospitalrdquomdashhereafter theauctioneermdashwith a choice function CH thatselects her most preferred collection of contractproposals We have the following result (whichis first stated using different notation than in theAusubel-Milgrom paper)

THEOREM 16 When the doctor-offering cu-mulative offer process with a single hospitalterminates at time t with outcome (XD(t) XH(t))the hospitalrsquos choice CH(XH(t)) is a stable col-lection of contracts

Cumulative offer processes connect the the-ory of matching with contracts to the emergingtheory of package auctions and auctions withcomplex constraints

VI Conclusion

We have introduced a general model ofmatching with bilateral contracts that encom-passes and extends two-sided matching modelswith and without money and certain auctionmodels The new formulation allows some con-tract terms to be exogenously fixed and others tobe endogenous in any combinations In thisvery general framework we characterize stable

929VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

collections of contracts in terms of the solutionto a certain system of equations

The key to the analysis is to extend twoconcepts of demand theory to models with orwithout prices The first concept to be extendedis the notion of substitutes Our definition ap-plies essentially the Roth-Sotomayor substitut-able preferences condition to a more generalclass of contracts contracts are substitutes ifwhenever the set of feasible bilateral contractsexpands the set of contracts that the firm rejectsalso expands We show that (a) our definitioncoincides with the usual demand theory condi-tion when both apply (b) when contracts aresubstitutes a stable collection of contracts ex-ists and (c) if any hospital or firm has prefer-ences that are not substitutes then there arepreferences with single openings for each otherfirm such that no stable allocation exists Wefurther show that when the substitute conditionapplies (a) both the doctor-offering and hospi-tal-offering Gale-Shapley algorithms can berepresented as iterated operations of the sameoperator (starting from different initial condi-tions) and (b) starting at a stable allocationfrom which a doctor retires a natural marketdynamic mimics the Gale-Shapley process tofind a new stable allocation

The second relevant demand theory conceptis the law of demand which we extend both toinclude heterogeneous inputs and to encompassmodels with or without prices The law of ag-gregate demand condition holds that when theset of feasible contracts expands the number ofcontracts that the firm chooses to sign weaklyincreases In terms of traditional demand theorythis means that for example when the wages ofsome of a heterogeneous group of workers fallsif the workers are substitutes then the totalnumber of workers employed rises We showthat (a) when inputs are substitutes the choicesof a profit-maximizing firmhospital satisfy thelaw of aggregate demand Moreover when thechoices of every hospitalfirm satisfy the law ofaggregate demand and the substitutes conditionthen (b) the set of workersdoctors employed isthe same at every stable allocation (c) the num-ber employed by each firmhospital is also thesame and (d) truthful reporting is a dominantstrategy for doctors in the doctor-offering algo-rithm Moreover we prove (e) that if the law of

aggregate demand fails in any potentially ob-servable way then the preceding dominantstrategy property does not hold

For these results to be useful for practicalmechanism design one needs to account forhow preferences especially hospital prefer-ences are to be reported to the mechanismThere needs to be a convenient way for hospi-tals to express a rich array of preferences andone needs to know whether the preferences be-ing reported actually satisfy the conditions ofthe various theorems Toward that end we in-troduce a parametric form that we call extendedassignment valuations which strictly general-izes several existing specifications and whichalways satisfies both the substitutes and law ofaggregate demand conditions

Finally we introduce an alternative treatmentof the doctor-offering algorithm the cumulativeoffer process We show that when contracts aresubstitutes the previously characterized doctor-offering algorithm coincides exactly with a cu-mulative offer process When contracts are notsubstitutes but there is just one hospital (theldquoauctioneerrdquo) the cumulative offer process co-incides with the Ausubel-Milgrom ascendingproxy auction This identity clarifies the con-nection between these algorithms and com-bined with the dominant strategy theoremreported above generalizes the Ausubel-Milgromdominant strategy theorem for the proxyauctions

Our new approach reveals deep similaritiesamong several of the most successful auctionand matching designs in current use and amongthe environmental conditions in which theoret-ically the mechanisms should perform at theirbest Understanding these similarities can helpus to understand the limitations of these mech-anisms paving the way for new designs

APPENDIX

PROOF OF THEOREM 1Let (XD XH) X2 be a solution to (3) Then

XD XH XD RD(XD) CD(XD) andsimilarly XH XD XH RH(XH) CH(XH)so XH XD CH(XH) CD(XD)

Next we show that X XH XD is a stableset of contracts Since X CH(XH) CD(XD)it follows by revealed preference that X

930 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

CH(X) CD(X) so condition (i) of the defi-nition of stability is satisfied

Consider any hospital h and set of contractsX CD(X X) naming hospital h Since X CD(XD) revealed preference of the doctorsimplies that X XD CD(XD) and hence thatX RD(XD) X XD RD(XD) CD(XD) RD(XD) A Thus X X RD(XD) XHby (3) So if X Ch(X) then by the revealedpreference of hospital h X h Ch(XH) Ch(X) Hence X Ch(X X) so condition(ii) is satisfied So the set of contracts X isunblocked

For the converse suppose that X is a stablecollection of contracts Then CD(X) X LetXH be the set of contracts that the doctorsweakly prefer to X and XD the set of contractsthat doctors weakly disprefer By constructionX XH X XD X is a partition of X

To obtain (3) observe first that if there issome h such that Ch(XH) Xh then X Ch(XH) violates stability condition (ii) SoCh(XH) Xh for all h that is CH(XH) X Itfollows that X RH(XH) X (XH X) X (X XD) XD and that X RD(XD) X (XD CD(XD)) X (XD X) XH

Hence (XD XH) satisfies (3) and XH XD X

PROOF OF THEOREM 2Let i j ( j wj) C(w) and wi wi Define

Z(w) ( j wj)wj wj Then Z(wi wi) Z(w) If contracts are substitutes then R(Z(wiwi)) R(Z(w)) By (6) since ( j wj) C(w)it follows that ( j wj) C(Z(w)) so ( j wj) R(Z(w)) Hence ( j wj) R(Z(wi wi)) So ( jwj) Z(wi wi) R(Z(wi wi)) C(Z(wiwi)) and thus (j wj) C(wi wi) by assumption(6) Thus C satisfies demand theory substitutes

Conversely suppose contracts are not substi-tutes Then there exists a set X an element (iwi) X and ( j wj) R(X) such that ( j wj) R(X) where X X (i wi) Using (6)wi Wi(X) Let w W(X) and wi Wi(X)Then wi wi and ( j wj) C(w) but ( j wj) C(wi wi) so C does not satisfy the demandtheory substitutes condition

PROOF OF THEOREM 5We may limit attention to the case with

exactly two hospitals by specifying that

the doctors find the other hospitals to beunacceptable

Suppose Rh is not isotone Then there existssome x y X and X X such that for all x X xH h and such that x Rh(X) Rh(X y) By construction since x y Ch(X y) contracts x and y specify different doctorssay d1 xD yD d2 Let x and y denote thecorresponding contracts for doctors d1 and d2 inwhich hospital h is substituted for h

We specify preferences as follows first forhospital h we take x h y h A and allother contracts are unacceptable Second doc-tors in xD(CH(X) CH(X y)) d1 d2prefer their elements of CH(X) CH(X y)to any other contract Third d1 has x d1

x and ranks all other contracts lower Fourthd2 has y d2

y and ranks all other con-tracts lower Finally the remaining doctors findall contracts from hospitals h and h to beunacceptable

Consider a feasible acceptable allocation Xsuch that y X Since h and d2 can have onlyone contract in X x y X Then hrsquos con-tracts in X form a subset of X so x is notincluded and d1 has a contract less preferredthan x Then the deviation by (d1 h) to xblocks X

Consider a feasible acceptable allocation Xsuch that y X Then either x y X or Xis blocked by a coalition including h d1 and d2using the contracts x and y However if x y X then a deviation by (d2 h) to contract yblocks X

Since all feasible allocations are blockedthere exists no stable set of contracts

PROOF OF THEOREM 7Suppose X D H W and let Z(w) ( j

wj)wj wj Then the law of aggregate de-mand is the statement that for any wage vectorsw w satisfying w w such that the choices setsare singletons C(Z(w)) C(Z(w)) The proofis by contradiction Suppose the law of aggre-gate demand does not hold Then there exists awage vector w and a doctor d such that for some(and hence all) 0 C(Z(wd 13 wd)) C(Z(wd wd)) Since hrsquos preferences arequasi-linear changing doctor drsquos wage can af-fect the hiring of other doctors only if it affectsthe hiring of doctor d It follows that there are

931VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

exactly two optimal choices for the hospital atwage vector w these are C(Z(wd wd)) atwhich doctor d is hired and C(Z(wd 13 wd))at which d is not hired but such that two otherdoctors are hired that is there exist doctors dd C(Z(wd 13 wd)) C(Z(wd wd))Let the corresponding payoff for the hospital(when faced with wage vector w) be

Consider the wage vector w (wd wd 2 wdd) For positive and suffi-ciently small the hospitalrsquos payoff at wage vec-tor w is 13 2 if it chooses C(Z(wd 13 wd))and it is 13 if it chooses C(Z(wd wd))and one of these choices must be optimal SoC(w) C(Z(wd 13 wd)) But then raisingthe wage of doctor d from wd 2 to wd whileholding the other wages at wd reduces the de-mand for doctor d from one to zero in violationof the demand theory substitutes condition

PROOF OF THEOREM 8By definition XD X D so by revealed pref-

erence Cd(X D) Cd(XD) Also X H XH soby the law of aggregate demand Ch(X H) Ch(XH) By Theorem 1 CD(XD) CH(XH)and CD(X D) CH(X H) so yendD Cd(XD) yenhH Ch(XH) and yendD Cd(XD) yenhH Ch(XH)Combining these leads to yendD Cd(X D) yendD Cd(XD) yenhH Ch(XH) yenhH Ch(XH) yendD Cd(XD) which begins and ends with the samesum Hence none of the inequalities can bestrict

PROOF OF THEOREM 9Since Ch(X) Ch(X) there exists some

set Y X Y X and contract x such thatCh(Y) Ch(Y x) Since x Ch(Y x)(as otherwise Ch(Y) Ch(Y x) for thepreferences to be rationalizable) there must ex-ist two contracts y z Rh(Y x) Rh(Y)such that y x z y Moreover since y z Ch(Y) yD zD

Denoting by h the second hospital whose exis-tence is hypothesized by the theorem we specifypreferences as follows Let all the doctors with con-tracts in Y have those contracts be their most favoredand let all other doctors find any contract with hunacceptable Let all doctors find any contract notinvolving hospital h or h to be unacceptable

In principle there are three casesIf xD yD then let PxD

y x and PzD z

Then there exist two stable matches Ch(Y x) and Ch(Y) with zD employed in the firstmatch but not in the second

The case xD zD is symmetricFinally if yD xD zD then let x y z

denote contracts with hospital h where the doc-tors (and any other terms) are the same as in xy z respectively Specify the remaining prefer-ences by PxD

x x PyD y y PzD

z z and Ph y x A z Thenthere exist two different stable matches x Ch(Y) and y Ch(Y x) with zD em-ployed in the first match but not in the second

PROOF OF THEOREM 10Let X denote the collection of contracts cho-

sen by the algorithm when doctor d submitspreference Pd If this collection which is stableunder the reported preferences is not stableunder Pd then there exists a blocking coalitionThis blocking coalition must contain d as noother doctorrsquos preferences have changed butthat is impossible since x is drsquos favorite con-tract according to the preferences Pd Since X isstable under Pd the doctor-optimal stable matchunder Pd (the existence of which is guaranteedby Theorem 2) must make every doctor(weakly) better off than at X In particulardoctor d must obtain x

PROOF OF THEOREM 11From Theorem 10 Pd x also obtains x

Hence by the rural hospitals theorem d is em-ployed at every point in the core when Pd x issubmitted So every allocation X at which d isunemployed is blocked by some coalition andset of contracts when d submits Pd Conse-quently if d submits the preferences Pd y1 y2 yn x then every allocation at whichd is unemployed is still blocked by the samecoalition and set of contracts Since the doctor-best stable allocation is one at which d gets aPd-acceptable contract that allocation is weaklyPd-preferred to x Finally the doctor-optimalmatch when Pd is submitted is still the doctor-optimal match when Pd is submitted as drsquospreferences over contracts less preferred than xcannot be used to block a match where shereceives a contract weakly preferred to x

932 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

PROOF OF THEOREM 12Consider contracts x y and z such that

xD xD yD yD zD zD and xH yH zH h Let the preferences of the three identified bePxD

x x PyD y y and PzD

z z andlet those of h be Ph y z x Forthe other contracts x Y Ch(X) let x be xDrsquosmost favored contract For the remaining doctorslet any contract with h or h be unacceptable

With the preceding preferences the only sta-ble allocation includes contracts x and y leav-ing doctor zD unemployed If however zDmisrepresents her preferences and reports PzD

z z then the doctor-optimal stable matchincludes z leaving doctor zD better off

PROOF OF THEOREM 13Setting J 1 and T A it is clear by

inspection that this family includes all singletonvaluations

The family is closed under endowment be-cause given any such valuation v( J T)endowing a set of doctors T simply creates thevaluation v( J T T))

To verify that the family is closed underaggregation consider any two valuations v( J T) and v( J T) Since J and T are justindex sets we may assume without loss ofgenerality that T T J J A DefineT T T and J J J Let

(15) ij ij if i D T j Jij if i D T j J0 otherwise

By inspection of the optimization problems v( J T) v( J T) v( J T)

For the converse consider the valuation v( J T) given by (13) We derive it construc-tively from the singleton valuations aggrega-tion and endowment as follows Let vj be thesingleton valuation associated with row j inmatrix [ij] for j 1 J Since VEA isclosed under aggregation v1 vJ v( J A) VEA Since VEA is also closed underendowment we may endow the doctors in T toobtain v( J T) VEA

PROOF OF THEOREM 14L Shapley (1962) (see also Lehmann et al

2001) had already proved that every assignment

valuation without endowments v( J A) is asubstitutes valuation Ausubel and Milgrom(2002) prove that a valuation v is a substitutesvaluation if and only if the corresponding indi-rect profit function ((p) v(S) yendS pd) issubmodular Let be the indirect profit func-tion corresponding to v( J A) Then theindirect profit function corresponding to v( J T) is (p1 pN) (p1 pN 0 0)Since is the profit function of the substitutesvaluation vh it is submodular and hence issubmodular as well

PROOF OF THEOREM 15Suppose that contracts are substitutes for the

hospitals We proceed by induction The initialcondition specifies that the sequences are iden-tical through time t 0 Denote the sequencecorresponding to the cumulative offer processby a superscript C and denote the alternativeprocess defined by (9) with no superscript As-sume the inductive hypothesis that the se-quences are the same up to round t 1 andsuppress the corresponding superscripts for thevalues at that round Then XD(t) X RH(XH(t 1)) XD

C(t) This also implies that

(16) X XH t 1 XD t

To complete the proof we must show thatXH

C(t) XH(t) or equivalently that XH(t 1) CD(XD(t)) X RD(XD(t))

For t 2 XHC(t 2) XH

C(t 1) by con-struction so by the inductive hypothesis XH(t 2) XH(t 1) Since contracts are substitutesRH is isotone so X RH(XH(t 1)) X RH(XH(t 2)) and hence XD(t) XD(t 1)For t 1 the inclusion XD(t) XD(t 1) isimplied by the initial condition XD(0) X

Recall that by revealed preference RD isisotone It follows that RD(XD(t)) RD(XD(t 1)) and hence using (9) that XH(t 1) X RD(XD(t 1)) X RD(XD(t)) XH(t) ThusXH(t 1) XH(t 1) (X RD(XD(t))) XH(t 1) RD(XD(t)) So XH(t 1) CD(XD(t)) XH(t 1) (XD(t) RD(XD(t))) (XH(t 1) RD(XD(t))) (XD(t) RD(XD(t))) (XH(t 1) XD(t)) RD(XD(t)) X RD(XD(t)) where the last stepequality follows from (16)

933VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

PROOF OF THEOREM 16By construction any contract not in XH(t) is

less preferred by some doctor d than everycorresponding contract in XH(t) (because doctord offers her most preferred contracts in se-quence) So any collection of contracts thatincludes some not in XH(t) must be strictly lesspreferred by one of the doctors Any profitablecoalitional deviation must use only contracts inXH(t)

By construction the one hospitalauctioneermust be part of any deviating coalition andCH(XH(t)) is its strictly most preferred collectionof contracts in XH(t) so there is no profitablecoalitional deviation using just contracts in XH(t)

REFERENCES

Abdulkadiroglu Atila ldquoCollege Admissionswith Affirmative Actionrdquo Unpublished Pa-per 2003

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoBoston Public School MatchingrdquoAmerican Economic Review 2005a (Papersand Proceedings) 95(2) pp 368ndash71

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoThe New York City High SchoolMatchrdquo American Economic Review 2005b(Papers and Proceedings) 95(2) pp 364ndash67

Abdulkadiroglu Atila and Sonmez TayfunldquoSchool Choice A Mechanism Design Ap-proachrdquo American Economic Review 200393(3) pp 729ndash47

Adachi Hiroyuki ldquoOn a Characterization of Sta-ble Matchingsrdquo Economics Letters 200068(1) pp 43ndash49

Alkan Ahmet and Gale David ldquoStable ScheduleMatching under Revealed Preferencerdquo Jour-nal of Economic Theory 2003 112(2) pp289ndash306

Ausubel Lawrence M Cramton Peter and Mil-grom Paul R ldquoThe Clock-Poxy Auction APractical Combinatorial Auction Designrdquo inPeter Cramton Yoav Shoham and RichardSteinberg eds Combinatorial auctionsCambridge MA MIT Press 2005 ch 5

Ausubel Lawrence M and Milgrom Paul RldquoAscending Auctions with Package Bid-dingrdquo Frontiers of Theoretical Economics2002 1(1) Article 1

Blum Yosef Roth Alvin E and Rothblum UrielG ldquoVacancy Chains and Equilibration in Se-nior-Level Labor Marketsrdquo Journal of Eco-nomic Theory 1997 76(2) pp 362ndash411

Brewer Paul J and Plott Charles R ldquoA BinaryConflict Ascending Price (Bicap) Mechanismfor the Decentralized Allocation of the Rightto Use Railroad Tracksrdquo International Jour-nal of Industrial Organization 1996 14(6)pp 857ndash86

Bulow Jeremy and Levin Jonathan ldquoMatchingand Price Competitionrdquo Stanford UniversityStanford Economics Working Paper No1818 2003

Cramton Peter Shoham Yoav and SteinbergRichard Combinatorial auctions Cam-bridge MA MIT Press (forthcoming)

Crawford Vincent P and Knoer Elsie M ldquoJobMatching with Heterogeneous Firms andWorkersrdquo Econometrica 1981 49(2) pp437ndash50

Demange Gabrielle and Gale David ldquoThe Strat-egy Structure of Two-Sided Matching Mar-ketsrdquo Econometrica 1985 53(4) pp 873ndash88

Dubins Lester and Freedman David ldquoMachia-velli and the Gale-Shapley Algorithmrdquo Na-val Research Logistics Quarterly 198188(7) pp 485ndash94

Echenique Federico and Oviedo Jorge ldquoCoreMany-to-One Matchings by Fixed-PointMethodsrdquo Journal of Economic Theory2004 115(2) pp 358ndash76

Fleiner Tamas ldquoA Fixed-Point Approach toStable Matchings and Some ApplicationsrdquoMathematics of Operations Research 200328(1) pp 103ndash26

Gale David and Shapley Lloyd ldquoCollege Ad-missions and the Stability of MarriagerdquoAmerican Mathematical Monthly 196269(1) pp 9ndash15

Gul Faruk and Stacchetti Ennio ldquoWalrasianEquilibrium with Gross Substitutesrdquo Journalof Economic Theory 1999 87(1) pp 95ndash124

Kelso Alexander and Crawford Vincent P ldquoJobMatching Coalition Formation and GrossSubstitutesrdquo Econometrica 1982 50(6) pp1483ndash504

Lehmann Benny Lehmann Daniel and NisanNoam ldquoCombinatorial Auctions with De-

934 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

creasing Marginal Utilityrdquo Games and Eco-nomic Behavior 2005 (forthcoming)

Lien Yuan-Chuan and Yan Jun ldquoOn the GrossSubstitutes Conditionrdquo Unpublished Paper2003 httpwwwstamfordeduyclienTerm_Paper_Lien_Yanpdf

Martınez Ruth Masso Jordi Neme Alejandroand Oviedo Jorge ldquoSingle Agents and the Setof Many-to-One Stable Matchingsrdquo Journalof Economic Theory 2000 91(1) pp 91ndash105

Milgrom Paul R Putting auction theory towork Cambridge Cambridge UniversityPress 2004

Milgrom Paul R ldquoPutting Auction Theory toWork The Simultaneous Ascending Auc-tionrdquo Journal of Political Economy 2000108(2) pp 245ndash72

Porter David Rassenti Stephen RoopnarineAnil and Smith Vernon ldquoCombinatorial Auc-tion Designrdquo Proceedings of the NationalAcademy of Sciences 2003 100(19) pp11153ndash57

Reijnierse Hans van Gellekom Anita and PottersJos A M ldquoVerifying Gross SubstitutabilityrdquoEconomic Theory 2002 20(4) pp 767ndash76

Roth Alvin E ldquoThe Economics of Matching Sta-bility and Incentivesrdquo Mathematics of Opera-tions Research 1982 7(4) pp 617ndash28

Roth Alvin E ldquoStability and Polarization ofInterests in Job Matchingrdquo Econometrica1984 52(1) pp 47ndash57

Roth Alvin E ldquoThe College Admissions Prob-lem Is Not Equivalent to the Marriage Prob-lemrdquo Journal of Economic Theory 1985a36(2) pp 277ndash88

Roth Alvin E ldquoConflict and Coincidence ofInterest in Job Matching Some New Resultsand Open Questionsrdquo Mathematics of Oper-ations Research 1985b 10(3) pp 379ndash89

Roth Alvin E ldquoOn the Allocation of Residentsto Rural Hospitals A General Property ofTwo-Sided Matching Marketsrdquo Economet-rica 1986 54(2) pp 425ndash27

Roth Alvin E ldquoA Natural Experiment in theOrganization of Entry-Level Labor MarketsRegional Markets for New Physicians andSurgeons in the United Kingdomrdquo AmericanEconomic Review 1991 81(3) pp 415ndash40

Roth Alvin E and Peranson Elliott ldquoThe Rede-sign of the Matching Market for AmericanPhysicians Some Engineering Aspects ofEconomic Designrdquo American Economic Re-view 1999 89(4) pp 748ndash80

Roth Alvin E and Sotomayor Marilda Two-sided matching A study in game-theoreticmodeling and analysis Cambridge Cam-bridge University Press 1990

Sen Amartya Collective choice and social wel-fare San Francisco Holden-Day Inc 1970

Shapley Lloyd ldquoComplements and Substitutesin the Optimal Assignment Problemrdquo NavalResearch Logistics Quarterly 1962 9(1) pp45ndash48

935VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

Page 15: Matching with Contracts - Stanford Universityweb.stanford.edu/~milgrom/publishedarticles/Matching with... · 2005. 10. 22. · Gale-Shapley matching algorithm. Hence, the Gale-Shapley

(13) vSJ T maxz

d S

djzdj subject to

d S

zdj 1 for j J

j J

zdj 1 for d S T0 for d S T

zdj 0 1 for all d j

Conversely for every such J T and v( J T) VEA

We dub this family of valuations the endowedassignment valuations because of the form ofoptimization (13) The family VEA is an exten-sion of the assignment valuations derived byLloyd Shapley (1962) used by Roth (19841985b) in models of matching with wages andexplicit job assignments and emphasized in astudy of package bidding by Lehmann et al(2001) The endowed assignment valuations arequite useful for applications They also fit nicelywith the theory reported in previous sections forthe following reason

THEOREM 14 Every endowed assignmentvaluation v( J T) VEA is a substitutesvaluation

To the best of our knowledge all of thesubstitutes valuations that have been used orproposed for practical applications are includedamong the endowed assignment valuations In-deed the question of whether all substitutesvaluations are endowed assignment valuationsis an open one Here we review some of themost popular valuations to show how they fitinto the class

The most commonly studied class of prefer-ences for matching problems like the Match forwhich employment terms are exogenouslyfixed are the responsive preferences Thesespecify that each hospital h has a fixed numberof openings nh a set of acceptable doctors Dh

A D and a strict ordering h of the acceptabledoctors When a doctor is unacceptable thatmeans that hiring the doctor is always worsethan leaving her position unfilled Given any setof available doctors the hospital hires its nh

most preferred acceptable doctors if that manyare available and otherwise hires all of theacceptable doctors

To map responsive preferences into the as-signment problem framework define a utilityfunction uh D3 to represent h and set theminimum acceptable utility to zero Formally(1) if d d Dh

A then d h dN uh(d) uh(d)and (2) d Dh

AN uh(d) 0 Using this utilitywe specify an assignment problem as followsJ 1 nh and dj uh(d) 13 1 and fix thewage at 1 Using a positive wage is a device toensure that the hospital strictly prefers not tohire a doctor it plans not to assign to any job Itis evident that with this valuation preferencethe hospital most prefers to hire the set of avail-able acceptable doctors with the highest rank-ing according to h

Among the extensions of responsive prefer-ences that have been most important in practiceare ones to accommodate quotas of variouskinds For example one use of quotas is tomanage subspecialties of internal medicine inwhich a certain number of positions are to befilled by doctors planning that subspecialty ifenough acceptable doctors are available Onecan reserve ms jobs for subspecialty s by pro-viding that there are ms jobs in which doctors inthat subspecialty have their productivity in-creased by a large constant M Then if msdoctors in subspecialty s are available at leastthat many will be demanded at the optimalsolution to (13) If that many qualified doctorsare not available the jobs will be filled by otherdoctors according to their productivities

Another use of quotas is for an affirmativeaction policy that absolutely reserves jobs formembers of certain target groups For each af-firmative action group G define a correspond-ing set of jobs JG and let J G JG Specifythat for any doctor d G and job j JG dj uh(d) and otherwise dj 0 One can alsointroduce an unrestricted category of jobs j thatany doctor can fill with productivity dj uh(d) This obviously ensures that a certainnumber of jobs are reserved for each targetgroup

A recent treatment of affirmative action byRoth (1991) extended by Abdulkadiroglu(2003) uses the class of responsive preferenceswith capacity constraints This class requires

927VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

that the set of doctors be partitioned into a finitenumber of affirmative action groups and that foreach group G the hospital has a capacity mG thatlimits the number of doctors who can be hiredfrom that group In addition at most nh doctorsin total can be hired

To represent such preferences using endowedassignment valuations let us specify that thereare mG jobs of type G and yenG mG jobs in totalThe hospital is endowed with nh yenG mGdoctors The endowed doctors have productivityij M in every job where M is a largenumber This ensures that at most nh new doc-tors will be hired at any optimum For thenonendowed doctors we calculate productivi-ties uh(d) in the same fashion as for the respon-sive preferences and set dj uh(d) for jobs j oftype G and dj 0 for all other jobs Thisensures that at most mG doctors will be hiredfrom group G By inspection this specificationrepresents Abdulkadiroglursquos affirmative actionpreferences

Unlike the specifications used for the currentNational Resident Matching Program algo-rithm the endowed assignment valuations per-mit overlapping affirmative action categoriesFor example suppose that a small hospital has atarget of hiring one female and one minoritydoctor In the endowed assignment structurethe hospital may assign a minority female doc-tor to fill either a minority slot or a female slotbut not both This is necessary to retain thesubstitutes demand structure for otherwisemaking a minority female doctor availablecould lead the hospital to hire a nonminoritymale doctor whom it would otherwise reject

Endowed assignment valuations thus providea flexible parameterized way for hospitals torepresent their preferences for matching with orwithout wages using a class of quasi-linear pref-erences that satisfies the substitutes conditionand the law of aggregate demand

V Cumulative Offer Processes and Auctions

The algorithms described by the system (9)with different starting points have the propertythat they can terminate only at a stable set ofcontracts Nevertheless unless preferences sat-isfy the substitutes condition the system is notguaranteed to converge at all even when a fixed

point exists In this section we offer a differentcharacterization of the Gale-Shapley doctor-offering algorithm that will prove especiallywell suited to situations in which contracts maynot be substitutes but in which there is just oneldquohospitalrdquo the auctioneer For now we allowthe possibility that there are several hospitals

The alternative representation is constructedby replacing the system of equations (9) by thefollowing system

(14) XD t X RH XH t 1

XH t XH t 1 CD XD t

We call the algorithm that begins with XD(0) X and XH(0) A and obeys (14) a cumulativeoffer process because the formalism capturesthe idea that hospitals accumulate offers fromdoctors in the set XH(t) and hold their bestchoices CH(XH(t)) from the accumulated setThere is no assumption of consistency imposedon the algorithm so it is possible that severalhospitals are ldquoholdingrdquo contract offers from thesame doctor The corresponding allocation is ofcourse infeasible since each doctor can ulti-mately accept just one contract

At each round t of the cumulative offer pro-cess all doctors make their best offers from theset of not-yet-rejected choices XD(t) but anydoctor d for whom a contract is being heldsimply repeats one of its earlier offers Thusnew offers are made only by doctors who havebeen rejected

To see why this is so let x CH(XH(t)) be acontract that is being held and consider thecorresponding doctor xD d By revealed pref-erence doctor d strictly prefers x to any contractthat she has not yet offered since those con-tracts were available to offer at the time that xwas offered Since drsquos most preferred contractin Xd(t) at the current time must be weaklypreferred to x it must be coincide with one ofdrsquos earlier offers

The second equation of system (14) is the onethat distinguishes the cumulative offer processfrom the system in (9) In the cumulative offerprocess without any assumptions about hospi-talsrsquo preferences XH(t) grows monotonicallyfrom round to round so the sequence of setsconverges In contrast the earlier process was

928 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

guaranteed to converge only when contracts aresubstitutes for the hospitals

When contracts are substitutes the two sys-tems of equations are equivalent

THEOREM 15 Suppose that contracts aresubstitutes for the hospitals and that XD(0) Xand XH(0) A Then the sequences of pairs(XD(t) XH(t)) generated by the two laws ofmotion (9) and (14) are identical

Even with the initial condition XD(0) X andXH(0) A the algorithms described by (9) and(14) may differ when contracts are not substi-tutes In that case by inspection of the system(14) the cumulative offer process still con-verges because XH(t) is bounded by the finiteset X and grows monotonically from round toround What is at issue is whether the hospitalrsquoschoice from its final search set in the cumulativeoffer process is a feasible and stable set ofcontracts

We will find below that when there is a singlehospital the outcome is indeed a feasible andstable set of contracts In that case the cumu-lative offer process coincides with the general-ized proxy auction of Ausubel and Milgrom(2002) Those authors analyze in detail the casewhen a bid consists of a price and a subset of theset of goods that the bidder wishes to buy Ateach round the seller ldquoholdsrdquo the collection ofbids that maximizes its total revenues subject tothe constraint that each good can be sold onlyonce The generalized proxy auction howeveris not limited to the sale of goods and in fact isidentical in scope to our present model ofmatching with contracts In particular the auc-tioneer may impose a variety of constraints onthe feasible collections of bids and may weighnonprice factors either exclusively or in com-bination with prices to decide which collectionof bids to hold Bidders for their part maymake bids that include factors besides price andmay not include price at all

To illustrate the role of general contracts inthis auction setting consider the auction designsuggested by Paul Brewer and Charles Plott(1996) in which bidders seek to buy access to arailroad track In that application a bid specifiesa trainrsquos direction of travel departure and ar-rival times and price offered It is assumed that

trains travel at a uniform speed along the trackIn this setting the contract terms must includethe direction and the two times and the seller isconstrained to hold only combinations of bidssuch that trains maintain safe distances fromone another at all times

A second example of the generalized proxyprocess is a procurement auction in which thebuyer scores suppliers on the basis of suchfactors as quality excess capacity credit ratingand historical reliability as well as price and inwhich the buyer prefers to set aside someamount of its purchase for minority contractorsor to maintain geographic diversity of supply toreduce the chance of supply disruptions In anasset sale the seller may weigh the probabilitythat the sale will be completed for example dueto financing contingencies or because a union orantitrust regulators must approve the sale

The cumulative offer process model withgeneral contracts accommodates all of thesepossibilities The auctioneer in the model cor-responds to a single ldquohospitalrdquomdashhereafter theauctioneermdashwith a choice function CH thatselects her most preferred collection of contractproposals We have the following result (whichis first stated using different notation than in theAusubel-Milgrom paper)

THEOREM 16 When the doctor-offering cu-mulative offer process with a single hospitalterminates at time t with outcome (XD(t) XH(t))the hospitalrsquos choice CH(XH(t)) is a stable col-lection of contracts

Cumulative offer processes connect the the-ory of matching with contracts to the emergingtheory of package auctions and auctions withcomplex constraints

VI Conclusion

We have introduced a general model ofmatching with bilateral contracts that encom-passes and extends two-sided matching modelswith and without money and certain auctionmodels The new formulation allows some con-tract terms to be exogenously fixed and others tobe endogenous in any combinations In thisvery general framework we characterize stable

929VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

collections of contracts in terms of the solutionto a certain system of equations

The key to the analysis is to extend twoconcepts of demand theory to models with orwithout prices The first concept to be extendedis the notion of substitutes Our definition ap-plies essentially the Roth-Sotomayor substitut-able preferences condition to a more generalclass of contracts contracts are substitutes ifwhenever the set of feasible bilateral contractsexpands the set of contracts that the firm rejectsalso expands We show that (a) our definitioncoincides with the usual demand theory condi-tion when both apply (b) when contracts aresubstitutes a stable collection of contracts ex-ists and (c) if any hospital or firm has prefer-ences that are not substitutes then there arepreferences with single openings for each otherfirm such that no stable allocation exists Wefurther show that when the substitute conditionapplies (a) both the doctor-offering and hospi-tal-offering Gale-Shapley algorithms can berepresented as iterated operations of the sameoperator (starting from different initial condi-tions) and (b) starting at a stable allocationfrom which a doctor retires a natural marketdynamic mimics the Gale-Shapley process tofind a new stable allocation

The second relevant demand theory conceptis the law of demand which we extend both toinclude heterogeneous inputs and to encompassmodels with or without prices The law of ag-gregate demand condition holds that when theset of feasible contracts expands the number ofcontracts that the firm chooses to sign weaklyincreases In terms of traditional demand theorythis means that for example when the wages ofsome of a heterogeneous group of workers fallsif the workers are substitutes then the totalnumber of workers employed rises We showthat (a) when inputs are substitutes the choicesof a profit-maximizing firmhospital satisfy thelaw of aggregate demand Moreover when thechoices of every hospitalfirm satisfy the law ofaggregate demand and the substitutes conditionthen (b) the set of workersdoctors employed isthe same at every stable allocation (c) the num-ber employed by each firmhospital is also thesame and (d) truthful reporting is a dominantstrategy for doctors in the doctor-offering algo-rithm Moreover we prove (e) that if the law of

aggregate demand fails in any potentially ob-servable way then the preceding dominantstrategy property does not hold

For these results to be useful for practicalmechanism design one needs to account forhow preferences especially hospital prefer-ences are to be reported to the mechanismThere needs to be a convenient way for hospi-tals to express a rich array of preferences andone needs to know whether the preferences be-ing reported actually satisfy the conditions ofthe various theorems Toward that end we in-troduce a parametric form that we call extendedassignment valuations which strictly general-izes several existing specifications and whichalways satisfies both the substitutes and law ofaggregate demand conditions

Finally we introduce an alternative treatmentof the doctor-offering algorithm the cumulativeoffer process We show that when contracts aresubstitutes the previously characterized doctor-offering algorithm coincides exactly with a cu-mulative offer process When contracts are notsubstitutes but there is just one hospital (theldquoauctioneerrdquo) the cumulative offer process co-incides with the Ausubel-Milgrom ascendingproxy auction This identity clarifies the con-nection between these algorithms and com-bined with the dominant strategy theoremreported above generalizes the Ausubel-Milgromdominant strategy theorem for the proxyauctions

Our new approach reveals deep similaritiesamong several of the most successful auctionand matching designs in current use and amongthe environmental conditions in which theoret-ically the mechanisms should perform at theirbest Understanding these similarities can helpus to understand the limitations of these mech-anisms paving the way for new designs

APPENDIX

PROOF OF THEOREM 1Let (XD XH) X2 be a solution to (3) Then

XD XH XD RD(XD) CD(XD) andsimilarly XH XD XH RH(XH) CH(XH)so XH XD CH(XH) CD(XD)

Next we show that X XH XD is a stableset of contracts Since X CH(XH) CD(XD)it follows by revealed preference that X

930 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

CH(X) CD(X) so condition (i) of the defi-nition of stability is satisfied

Consider any hospital h and set of contractsX CD(X X) naming hospital h Since X CD(XD) revealed preference of the doctorsimplies that X XD CD(XD) and hence thatX RD(XD) X XD RD(XD) CD(XD) RD(XD) A Thus X X RD(XD) XHby (3) So if X Ch(X) then by the revealedpreference of hospital h X h Ch(XH) Ch(X) Hence X Ch(X X) so condition(ii) is satisfied So the set of contracts X isunblocked

For the converse suppose that X is a stablecollection of contracts Then CD(X) X LetXH be the set of contracts that the doctorsweakly prefer to X and XD the set of contractsthat doctors weakly disprefer By constructionX XH X XD X is a partition of X

To obtain (3) observe first that if there issome h such that Ch(XH) Xh then X Ch(XH) violates stability condition (ii) SoCh(XH) Xh for all h that is CH(XH) X Itfollows that X RH(XH) X (XH X) X (X XD) XD and that X RD(XD) X (XD CD(XD)) X (XD X) XH

Hence (XD XH) satisfies (3) and XH XD X

PROOF OF THEOREM 2Let i j ( j wj) C(w) and wi wi Define

Z(w) ( j wj)wj wj Then Z(wi wi) Z(w) If contracts are substitutes then R(Z(wiwi)) R(Z(w)) By (6) since ( j wj) C(w)it follows that ( j wj) C(Z(w)) so ( j wj) R(Z(w)) Hence ( j wj) R(Z(wi wi)) So ( jwj) Z(wi wi) R(Z(wi wi)) C(Z(wiwi)) and thus (j wj) C(wi wi) by assumption(6) Thus C satisfies demand theory substitutes

Conversely suppose contracts are not substi-tutes Then there exists a set X an element (iwi) X and ( j wj) R(X) such that ( j wj) R(X) where X X (i wi) Using (6)wi Wi(X) Let w W(X) and wi Wi(X)Then wi wi and ( j wj) C(w) but ( j wj) C(wi wi) so C does not satisfy the demandtheory substitutes condition

PROOF OF THEOREM 5We may limit attention to the case with

exactly two hospitals by specifying that

the doctors find the other hospitals to beunacceptable

Suppose Rh is not isotone Then there existssome x y X and X X such that for all x X xH h and such that x Rh(X) Rh(X y) By construction since x y Ch(X y) contracts x and y specify different doctorssay d1 xD yD d2 Let x and y denote thecorresponding contracts for doctors d1 and d2 inwhich hospital h is substituted for h

We specify preferences as follows first forhospital h we take x h y h A and allother contracts are unacceptable Second doc-tors in xD(CH(X) CH(X y)) d1 d2prefer their elements of CH(X) CH(X y)to any other contract Third d1 has x d1

x and ranks all other contracts lower Fourthd2 has y d2

y and ranks all other con-tracts lower Finally the remaining doctors findall contracts from hospitals h and h to beunacceptable

Consider a feasible acceptable allocation Xsuch that y X Since h and d2 can have onlyone contract in X x y X Then hrsquos con-tracts in X form a subset of X so x is notincluded and d1 has a contract less preferredthan x Then the deviation by (d1 h) to xblocks X

Consider a feasible acceptable allocation Xsuch that y X Then either x y X or Xis blocked by a coalition including h d1 and d2using the contracts x and y However if x y X then a deviation by (d2 h) to contract yblocks X

Since all feasible allocations are blockedthere exists no stable set of contracts

PROOF OF THEOREM 7Suppose X D H W and let Z(w) ( j

wj)wj wj Then the law of aggregate de-mand is the statement that for any wage vectorsw w satisfying w w such that the choices setsare singletons C(Z(w)) C(Z(w)) The proofis by contradiction Suppose the law of aggre-gate demand does not hold Then there exists awage vector w and a doctor d such that for some(and hence all) 0 C(Z(wd 13 wd)) C(Z(wd wd)) Since hrsquos preferences arequasi-linear changing doctor drsquos wage can af-fect the hiring of other doctors only if it affectsthe hiring of doctor d It follows that there are

931VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

exactly two optimal choices for the hospital atwage vector w these are C(Z(wd wd)) atwhich doctor d is hired and C(Z(wd 13 wd))at which d is not hired but such that two otherdoctors are hired that is there exist doctors dd C(Z(wd 13 wd)) C(Z(wd wd))Let the corresponding payoff for the hospital(when faced with wage vector w) be

Consider the wage vector w (wd wd 2 wdd) For positive and suffi-ciently small the hospitalrsquos payoff at wage vec-tor w is 13 2 if it chooses C(Z(wd 13 wd))and it is 13 if it chooses C(Z(wd wd))and one of these choices must be optimal SoC(w) C(Z(wd 13 wd)) But then raisingthe wage of doctor d from wd 2 to wd whileholding the other wages at wd reduces the de-mand for doctor d from one to zero in violationof the demand theory substitutes condition

PROOF OF THEOREM 8By definition XD X D so by revealed pref-

erence Cd(X D) Cd(XD) Also X H XH soby the law of aggregate demand Ch(X H) Ch(XH) By Theorem 1 CD(XD) CH(XH)and CD(X D) CH(X H) so yendD Cd(XD) yenhH Ch(XH) and yendD Cd(XD) yenhH Ch(XH)Combining these leads to yendD Cd(X D) yendD Cd(XD) yenhH Ch(XH) yenhH Ch(XH) yendD Cd(XD) which begins and ends with the samesum Hence none of the inequalities can bestrict

PROOF OF THEOREM 9Since Ch(X) Ch(X) there exists some

set Y X Y X and contract x such thatCh(Y) Ch(Y x) Since x Ch(Y x)(as otherwise Ch(Y) Ch(Y x) for thepreferences to be rationalizable) there must ex-ist two contracts y z Rh(Y x) Rh(Y)such that y x z y Moreover since y z Ch(Y) yD zD

Denoting by h the second hospital whose exis-tence is hypothesized by the theorem we specifypreferences as follows Let all the doctors with con-tracts in Y have those contracts be their most favoredand let all other doctors find any contract with hunacceptable Let all doctors find any contract notinvolving hospital h or h to be unacceptable

In principle there are three casesIf xD yD then let PxD

y x and PzD z

Then there exist two stable matches Ch(Y x) and Ch(Y) with zD employed in the firstmatch but not in the second

The case xD zD is symmetricFinally if yD xD zD then let x y z

denote contracts with hospital h where the doc-tors (and any other terms) are the same as in xy z respectively Specify the remaining prefer-ences by PxD

x x PyD y y PzD

z z and Ph y x A z Thenthere exist two different stable matches x Ch(Y) and y Ch(Y x) with zD em-ployed in the first match but not in the second

PROOF OF THEOREM 10Let X denote the collection of contracts cho-

sen by the algorithm when doctor d submitspreference Pd If this collection which is stableunder the reported preferences is not stableunder Pd then there exists a blocking coalitionThis blocking coalition must contain d as noother doctorrsquos preferences have changed butthat is impossible since x is drsquos favorite con-tract according to the preferences Pd Since X isstable under Pd the doctor-optimal stable matchunder Pd (the existence of which is guaranteedby Theorem 2) must make every doctor(weakly) better off than at X In particulardoctor d must obtain x

PROOF OF THEOREM 11From Theorem 10 Pd x also obtains x

Hence by the rural hospitals theorem d is em-ployed at every point in the core when Pd x issubmitted So every allocation X at which d isunemployed is blocked by some coalition andset of contracts when d submits Pd Conse-quently if d submits the preferences Pd y1 y2 yn x then every allocation at whichd is unemployed is still blocked by the samecoalition and set of contracts Since the doctor-best stable allocation is one at which d gets aPd-acceptable contract that allocation is weaklyPd-preferred to x Finally the doctor-optimalmatch when Pd is submitted is still the doctor-optimal match when Pd is submitted as drsquospreferences over contracts less preferred than xcannot be used to block a match where shereceives a contract weakly preferred to x

932 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

PROOF OF THEOREM 12Consider contracts x y and z such that

xD xD yD yD zD zD and xH yH zH h Let the preferences of the three identified bePxD

x x PyD y y and PzD

z z andlet those of h be Ph y z x Forthe other contracts x Y Ch(X) let x be xDrsquosmost favored contract For the remaining doctorslet any contract with h or h be unacceptable

With the preceding preferences the only sta-ble allocation includes contracts x and y leav-ing doctor zD unemployed If however zDmisrepresents her preferences and reports PzD

z z then the doctor-optimal stable matchincludes z leaving doctor zD better off

PROOF OF THEOREM 13Setting J 1 and T A it is clear by

inspection that this family includes all singletonvaluations

The family is closed under endowment be-cause given any such valuation v( J T)endowing a set of doctors T simply creates thevaluation v( J T T))

To verify that the family is closed underaggregation consider any two valuations v( J T) and v( J T) Since J and T are justindex sets we may assume without loss ofgenerality that T T J J A DefineT T T and J J J Let

(15) ij ij if i D T j Jij if i D T j J0 otherwise

By inspection of the optimization problems v( J T) v( J T) v( J T)

For the converse consider the valuation v( J T) given by (13) We derive it construc-tively from the singleton valuations aggrega-tion and endowment as follows Let vj be thesingleton valuation associated with row j inmatrix [ij] for j 1 J Since VEA isclosed under aggregation v1 vJ v( J A) VEA Since VEA is also closed underendowment we may endow the doctors in T toobtain v( J T) VEA

PROOF OF THEOREM 14L Shapley (1962) (see also Lehmann et al

2001) had already proved that every assignment

valuation without endowments v( J A) is asubstitutes valuation Ausubel and Milgrom(2002) prove that a valuation v is a substitutesvaluation if and only if the corresponding indi-rect profit function ((p) v(S) yendS pd) issubmodular Let be the indirect profit func-tion corresponding to v( J A) Then theindirect profit function corresponding to v( J T) is (p1 pN) (p1 pN 0 0)Since is the profit function of the substitutesvaluation vh it is submodular and hence issubmodular as well

PROOF OF THEOREM 15Suppose that contracts are substitutes for the

hospitals We proceed by induction The initialcondition specifies that the sequences are iden-tical through time t 0 Denote the sequencecorresponding to the cumulative offer processby a superscript C and denote the alternativeprocess defined by (9) with no superscript As-sume the inductive hypothesis that the se-quences are the same up to round t 1 andsuppress the corresponding superscripts for thevalues at that round Then XD(t) X RH(XH(t 1)) XD

C(t) This also implies that

(16) X XH t 1 XD t

To complete the proof we must show thatXH

C(t) XH(t) or equivalently that XH(t 1) CD(XD(t)) X RD(XD(t))

For t 2 XHC(t 2) XH

C(t 1) by con-struction so by the inductive hypothesis XH(t 2) XH(t 1) Since contracts are substitutesRH is isotone so X RH(XH(t 1)) X RH(XH(t 2)) and hence XD(t) XD(t 1)For t 1 the inclusion XD(t) XD(t 1) isimplied by the initial condition XD(0) X

Recall that by revealed preference RD isisotone It follows that RD(XD(t)) RD(XD(t 1)) and hence using (9) that XH(t 1) X RD(XD(t 1)) X RD(XD(t)) XH(t) ThusXH(t 1) XH(t 1) (X RD(XD(t))) XH(t 1) RD(XD(t)) So XH(t 1) CD(XD(t)) XH(t 1) (XD(t) RD(XD(t))) (XH(t 1) RD(XD(t))) (XD(t) RD(XD(t))) (XH(t 1) XD(t)) RD(XD(t)) X RD(XD(t)) where the last stepequality follows from (16)

933VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

PROOF OF THEOREM 16By construction any contract not in XH(t) is

less preferred by some doctor d than everycorresponding contract in XH(t) (because doctord offers her most preferred contracts in se-quence) So any collection of contracts thatincludes some not in XH(t) must be strictly lesspreferred by one of the doctors Any profitablecoalitional deviation must use only contracts inXH(t)

By construction the one hospitalauctioneermust be part of any deviating coalition andCH(XH(t)) is its strictly most preferred collectionof contracts in XH(t) so there is no profitablecoalitional deviation using just contracts in XH(t)

REFERENCES

Abdulkadiroglu Atila ldquoCollege Admissionswith Affirmative Actionrdquo Unpublished Pa-per 2003

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoBoston Public School MatchingrdquoAmerican Economic Review 2005a (Papersand Proceedings) 95(2) pp 368ndash71

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoThe New York City High SchoolMatchrdquo American Economic Review 2005b(Papers and Proceedings) 95(2) pp 364ndash67

Abdulkadiroglu Atila and Sonmez TayfunldquoSchool Choice A Mechanism Design Ap-proachrdquo American Economic Review 200393(3) pp 729ndash47

Adachi Hiroyuki ldquoOn a Characterization of Sta-ble Matchingsrdquo Economics Letters 200068(1) pp 43ndash49

Alkan Ahmet and Gale David ldquoStable ScheduleMatching under Revealed Preferencerdquo Jour-nal of Economic Theory 2003 112(2) pp289ndash306

Ausubel Lawrence M Cramton Peter and Mil-grom Paul R ldquoThe Clock-Poxy Auction APractical Combinatorial Auction Designrdquo inPeter Cramton Yoav Shoham and RichardSteinberg eds Combinatorial auctionsCambridge MA MIT Press 2005 ch 5

Ausubel Lawrence M and Milgrom Paul RldquoAscending Auctions with Package Bid-dingrdquo Frontiers of Theoretical Economics2002 1(1) Article 1

Blum Yosef Roth Alvin E and Rothblum UrielG ldquoVacancy Chains and Equilibration in Se-nior-Level Labor Marketsrdquo Journal of Eco-nomic Theory 1997 76(2) pp 362ndash411

Brewer Paul J and Plott Charles R ldquoA BinaryConflict Ascending Price (Bicap) Mechanismfor the Decentralized Allocation of the Rightto Use Railroad Tracksrdquo International Jour-nal of Industrial Organization 1996 14(6)pp 857ndash86

Bulow Jeremy and Levin Jonathan ldquoMatchingand Price Competitionrdquo Stanford UniversityStanford Economics Working Paper No1818 2003

Cramton Peter Shoham Yoav and SteinbergRichard Combinatorial auctions Cam-bridge MA MIT Press (forthcoming)

Crawford Vincent P and Knoer Elsie M ldquoJobMatching with Heterogeneous Firms andWorkersrdquo Econometrica 1981 49(2) pp437ndash50

Demange Gabrielle and Gale David ldquoThe Strat-egy Structure of Two-Sided Matching Mar-ketsrdquo Econometrica 1985 53(4) pp 873ndash88

Dubins Lester and Freedman David ldquoMachia-velli and the Gale-Shapley Algorithmrdquo Na-val Research Logistics Quarterly 198188(7) pp 485ndash94

Echenique Federico and Oviedo Jorge ldquoCoreMany-to-One Matchings by Fixed-PointMethodsrdquo Journal of Economic Theory2004 115(2) pp 358ndash76

Fleiner Tamas ldquoA Fixed-Point Approach toStable Matchings and Some ApplicationsrdquoMathematics of Operations Research 200328(1) pp 103ndash26

Gale David and Shapley Lloyd ldquoCollege Ad-missions and the Stability of MarriagerdquoAmerican Mathematical Monthly 196269(1) pp 9ndash15

Gul Faruk and Stacchetti Ennio ldquoWalrasianEquilibrium with Gross Substitutesrdquo Journalof Economic Theory 1999 87(1) pp 95ndash124

Kelso Alexander and Crawford Vincent P ldquoJobMatching Coalition Formation and GrossSubstitutesrdquo Econometrica 1982 50(6) pp1483ndash504

Lehmann Benny Lehmann Daniel and NisanNoam ldquoCombinatorial Auctions with De-

934 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

creasing Marginal Utilityrdquo Games and Eco-nomic Behavior 2005 (forthcoming)

Lien Yuan-Chuan and Yan Jun ldquoOn the GrossSubstitutes Conditionrdquo Unpublished Paper2003 httpwwwstamfordeduyclienTerm_Paper_Lien_Yanpdf

Martınez Ruth Masso Jordi Neme Alejandroand Oviedo Jorge ldquoSingle Agents and the Setof Many-to-One Stable Matchingsrdquo Journalof Economic Theory 2000 91(1) pp 91ndash105

Milgrom Paul R Putting auction theory towork Cambridge Cambridge UniversityPress 2004

Milgrom Paul R ldquoPutting Auction Theory toWork The Simultaneous Ascending Auc-tionrdquo Journal of Political Economy 2000108(2) pp 245ndash72

Porter David Rassenti Stephen RoopnarineAnil and Smith Vernon ldquoCombinatorial Auc-tion Designrdquo Proceedings of the NationalAcademy of Sciences 2003 100(19) pp11153ndash57

Reijnierse Hans van Gellekom Anita and PottersJos A M ldquoVerifying Gross SubstitutabilityrdquoEconomic Theory 2002 20(4) pp 767ndash76

Roth Alvin E ldquoThe Economics of Matching Sta-bility and Incentivesrdquo Mathematics of Opera-tions Research 1982 7(4) pp 617ndash28

Roth Alvin E ldquoStability and Polarization ofInterests in Job Matchingrdquo Econometrica1984 52(1) pp 47ndash57

Roth Alvin E ldquoThe College Admissions Prob-lem Is Not Equivalent to the Marriage Prob-lemrdquo Journal of Economic Theory 1985a36(2) pp 277ndash88

Roth Alvin E ldquoConflict and Coincidence ofInterest in Job Matching Some New Resultsand Open Questionsrdquo Mathematics of Oper-ations Research 1985b 10(3) pp 379ndash89

Roth Alvin E ldquoOn the Allocation of Residentsto Rural Hospitals A General Property ofTwo-Sided Matching Marketsrdquo Economet-rica 1986 54(2) pp 425ndash27

Roth Alvin E ldquoA Natural Experiment in theOrganization of Entry-Level Labor MarketsRegional Markets for New Physicians andSurgeons in the United Kingdomrdquo AmericanEconomic Review 1991 81(3) pp 415ndash40

Roth Alvin E and Peranson Elliott ldquoThe Rede-sign of the Matching Market for AmericanPhysicians Some Engineering Aspects ofEconomic Designrdquo American Economic Re-view 1999 89(4) pp 748ndash80

Roth Alvin E and Sotomayor Marilda Two-sided matching A study in game-theoreticmodeling and analysis Cambridge Cam-bridge University Press 1990

Sen Amartya Collective choice and social wel-fare San Francisco Holden-Day Inc 1970

Shapley Lloyd ldquoComplements and Substitutesin the Optimal Assignment Problemrdquo NavalResearch Logistics Quarterly 1962 9(1) pp45ndash48

935VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

Page 16: Matching with Contracts - Stanford Universityweb.stanford.edu/~milgrom/publishedarticles/Matching with... · 2005. 10. 22. · Gale-Shapley matching algorithm. Hence, the Gale-Shapley

that the set of doctors be partitioned into a finitenumber of affirmative action groups and that foreach group G the hospital has a capacity mG thatlimits the number of doctors who can be hiredfrom that group In addition at most nh doctorsin total can be hired

To represent such preferences using endowedassignment valuations let us specify that thereare mG jobs of type G and yenG mG jobs in totalThe hospital is endowed with nh yenG mGdoctors The endowed doctors have productivityij M in every job where M is a largenumber This ensures that at most nh new doc-tors will be hired at any optimum For thenonendowed doctors we calculate productivi-ties uh(d) in the same fashion as for the respon-sive preferences and set dj uh(d) for jobs j oftype G and dj 0 for all other jobs Thisensures that at most mG doctors will be hiredfrom group G By inspection this specificationrepresents Abdulkadiroglursquos affirmative actionpreferences

Unlike the specifications used for the currentNational Resident Matching Program algo-rithm the endowed assignment valuations per-mit overlapping affirmative action categoriesFor example suppose that a small hospital has atarget of hiring one female and one minoritydoctor In the endowed assignment structurethe hospital may assign a minority female doc-tor to fill either a minority slot or a female slotbut not both This is necessary to retain thesubstitutes demand structure for otherwisemaking a minority female doctor availablecould lead the hospital to hire a nonminoritymale doctor whom it would otherwise reject

Endowed assignment valuations thus providea flexible parameterized way for hospitals torepresent their preferences for matching with orwithout wages using a class of quasi-linear pref-erences that satisfies the substitutes conditionand the law of aggregate demand

V Cumulative Offer Processes and Auctions

The algorithms described by the system (9)with different starting points have the propertythat they can terminate only at a stable set ofcontracts Nevertheless unless preferences sat-isfy the substitutes condition the system is notguaranteed to converge at all even when a fixed

point exists In this section we offer a differentcharacterization of the Gale-Shapley doctor-offering algorithm that will prove especiallywell suited to situations in which contracts maynot be substitutes but in which there is just oneldquohospitalrdquo the auctioneer For now we allowthe possibility that there are several hospitals

The alternative representation is constructedby replacing the system of equations (9) by thefollowing system

(14) XD t X RH XH t 1

XH t XH t 1 CD XD t

We call the algorithm that begins with XD(0) X and XH(0) A and obeys (14) a cumulativeoffer process because the formalism capturesthe idea that hospitals accumulate offers fromdoctors in the set XH(t) and hold their bestchoices CH(XH(t)) from the accumulated setThere is no assumption of consistency imposedon the algorithm so it is possible that severalhospitals are ldquoholdingrdquo contract offers from thesame doctor The corresponding allocation is ofcourse infeasible since each doctor can ulti-mately accept just one contract

At each round t of the cumulative offer pro-cess all doctors make their best offers from theset of not-yet-rejected choices XD(t) but anydoctor d for whom a contract is being heldsimply repeats one of its earlier offers Thusnew offers are made only by doctors who havebeen rejected

To see why this is so let x CH(XH(t)) be acontract that is being held and consider thecorresponding doctor xD d By revealed pref-erence doctor d strictly prefers x to any contractthat she has not yet offered since those con-tracts were available to offer at the time that xwas offered Since drsquos most preferred contractin Xd(t) at the current time must be weaklypreferred to x it must be coincide with one ofdrsquos earlier offers

The second equation of system (14) is the onethat distinguishes the cumulative offer processfrom the system in (9) In the cumulative offerprocess without any assumptions about hospi-talsrsquo preferences XH(t) grows monotonicallyfrom round to round so the sequence of setsconverges In contrast the earlier process was

928 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

guaranteed to converge only when contracts aresubstitutes for the hospitals

When contracts are substitutes the two sys-tems of equations are equivalent

THEOREM 15 Suppose that contracts aresubstitutes for the hospitals and that XD(0) Xand XH(0) A Then the sequences of pairs(XD(t) XH(t)) generated by the two laws ofmotion (9) and (14) are identical

Even with the initial condition XD(0) X andXH(0) A the algorithms described by (9) and(14) may differ when contracts are not substi-tutes In that case by inspection of the system(14) the cumulative offer process still con-verges because XH(t) is bounded by the finiteset X and grows monotonically from round toround What is at issue is whether the hospitalrsquoschoice from its final search set in the cumulativeoffer process is a feasible and stable set ofcontracts

We will find below that when there is a singlehospital the outcome is indeed a feasible andstable set of contracts In that case the cumu-lative offer process coincides with the general-ized proxy auction of Ausubel and Milgrom(2002) Those authors analyze in detail the casewhen a bid consists of a price and a subset of theset of goods that the bidder wishes to buy Ateach round the seller ldquoholdsrdquo the collection ofbids that maximizes its total revenues subject tothe constraint that each good can be sold onlyonce The generalized proxy auction howeveris not limited to the sale of goods and in fact isidentical in scope to our present model ofmatching with contracts In particular the auc-tioneer may impose a variety of constraints onthe feasible collections of bids and may weighnonprice factors either exclusively or in com-bination with prices to decide which collectionof bids to hold Bidders for their part maymake bids that include factors besides price andmay not include price at all

To illustrate the role of general contracts inthis auction setting consider the auction designsuggested by Paul Brewer and Charles Plott(1996) in which bidders seek to buy access to arailroad track In that application a bid specifiesa trainrsquos direction of travel departure and ar-rival times and price offered It is assumed that

trains travel at a uniform speed along the trackIn this setting the contract terms must includethe direction and the two times and the seller isconstrained to hold only combinations of bidssuch that trains maintain safe distances fromone another at all times

A second example of the generalized proxyprocess is a procurement auction in which thebuyer scores suppliers on the basis of suchfactors as quality excess capacity credit ratingand historical reliability as well as price and inwhich the buyer prefers to set aside someamount of its purchase for minority contractorsor to maintain geographic diversity of supply toreduce the chance of supply disruptions In anasset sale the seller may weigh the probabilitythat the sale will be completed for example dueto financing contingencies or because a union orantitrust regulators must approve the sale

The cumulative offer process model withgeneral contracts accommodates all of thesepossibilities The auctioneer in the model cor-responds to a single ldquohospitalrdquomdashhereafter theauctioneermdashwith a choice function CH thatselects her most preferred collection of contractproposals We have the following result (whichis first stated using different notation than in theAusubel-Milgrom paper)

THEOREM 16 When the doctor-offering cu-mulative offer process with a single hospitalterminates at time t with outcome (XD(t) XH(t))the hospitalrsquos choice CH(XH(t)) is a stable col-lection of contracts

Cumulative offer processes connect the the-ory of matching with contracts to the emergingtheory of package auctions and auctions withcomplex constraints

VI Conclusion

We have introduced a general model ofmatching with bilateral contracts that encom-passes and extends two-sided matching modelswith and without money and certain auctionmodels The new formulation allows some con-tract terms to be exogenously fixed and others tobe endogenous in any combinations In thisvery general framework we characterize stable

929VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

collections of contracts in terms of the solutionto a certain system of equations

The key to the analysis is to extend twoconcepts of demand theory to models with orwithout prices The first concept to be extendedis the notion of substitutes Our definition ap-plies essentially the Roth-Sotomayor substitut-able preferences condition to a more generalclass of contracts contracts are substitutes ifwhenever the set of feasible bilateral contractsexpands the set of contracts that the firm rejectsalso expands We show that (a) our definitioncoincides with the usual demand theory condi-tion when both apply (b) when contracts aresubstitutes a stable collection of contracts ex-ists and (c) if any hospital or firm has prefer-ences that are not substitutes then there arepreferences with single openings for each otherfirm such that no stable allocation exists Wefurther show that when the substitute conditionapplies (a) both the doctor-offering and hospi-tal-offering Gale-Shapley algorithms can berepresented as iterated operations of the sameoperator (starting from different initial condi-tions) and (b) starting at a stable allocationfrom which a doctor retires a natural marketdynamic mimics the Gale-Shapley process tofind a new stable allocation

The second relevant demand theory conceptis the law of demand which we extend both toinclude heterogeneous inputs and to encompassmodels with or without prices The law of ag-gregate demand condition holds that when theset of feasible contracts expands the number ofcontracts that the firm chooses to sign weaklyincreases In terms of traditional demand theorythis means that for example when the wages ofsome of a heterogeneous group of workers fallsif the workers are substitutes then the totalnumber of workers employed rises We showthat (a) when inputs are substitutes the choicesof a profit-maximizing firmhospital satisfy thelaw of aggregate demand Moreover when thechoices of every hospitalfirm satisfy the law ofaggregate demand and the substitutes conditionthen (b) the set of workersdoctors employed isthe same at every stable allocation (c) the num-ber employed by each firmhospital is also thesame and (d) truthful reporting is a dominantstrategy for doctors in the doctor-offering algo-rithm Moreover we prove (e) that if the law of

aggregate demand fails in any potentially ob-servable way then the preceding dominantstrategy property does not hold

For these results to be useful for practicalmechanism design one needs to account forhow preferences especially hospital prefer-ences are to be reported to the mechanismThere needs to be a convenient way for hospi-tals to express a rich array of preferences andone needs to know whether the preferences be-ing reported actually satisfy the conditions ofthe various theorems Toward that end we in-troduce a parametric form that we call extendedassignment valuations which strictly general-izes several existing specifications and whichalways satisfies both the substitutes and law ofaggregate demand conditions

Finally we introduce an alternative treatmentof the doctor-offering algorithm the cumulativeoffer process We show that when contracts aresubstitutes the previously characterized doctor-offering algorithm coincides exactly with a cu-mulative offer process When contracts are notsubstitutes but there is just one hospital (theldquoauctioneerrdquo) the cumulative offer process co-incides with the Ausubel-Milgrom ascendingproxy auction This identity clarifies the con-nection between these algorithms and com-bined with the dominant strategy theoremreported above generalizes the Ausubel-Milgromdominant strategy theorem for the proxyauctions

Our new approach reveals deep similaritiesamong several of the most successful auctionand matching designs in current use and amongthe environmental conditions in which theoret-ically the mechanisms should perform at theirbest Understanding these similarities can helpus to understand the limitations of these mech-anisms paving the way for new designs

APPENDIX

PROOF OF THEOREM 1Let (XD XH) X2 be a solution to (3) Then

XD XH XD RD(XD) CD(XD) andsimilarly XH XD XH RH(XH) CH(XH)so XH XD CH(XH) CD(XD)

Next we show that X XH XD is a stableset of contracts Since X CH(XH) CD(XD)it follows by revealed preference that X

930 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

CH(X) CD(X) so condition (i) of the defi-nition of stability is satisfied

Consider any hospital h and set of contractsX CD(X X) naming hospital h Since X CD(XD) revealed preference of the doctorsimplies that X XD CD(XD) and hence thatX RD(XD) X XD RD(XD) CD(XD) RD(XD) A Thus X X RD(XD) XHby (3) So if X Ch(X) then by the revealedpreference of hospital h X h Ch(XH) Ch(X) Hence X Ch(X X) so condition(ii) is satisfied So the set of contracts X isunblocked

For the converse suppose that X is a stablecollection of contracts Then CD(X) X LetXH be the set of contracts that the doctorsweakly prefer to X and XD the set of contractsthat doctors weakly disprefer By constructionX XH X XD X is a partition of X

To obtain (3) observe first that if there issome h such that Ch(XH) Xh then X Ch(XH) violates stability condition (ii) SoCh(XH) Xh for all h that is CH(XH) X Itfollows that X RH(XH) X (XH X) X (X XD) XD and that X RD(XD) X (XD CD(XD)) X (XD X) XH

Hence (XD XH) satisfies (3) and XH XD X

PROOF OF THEOREM 2Let i j ( j wj) C(w) and wi wi Define

Z(w) ( j wj)wj wj Then Z(wi wi) Z(w) If contracts are substitutes then R(Z(wiwi)) R(Z(w)) By (6) since ( j wj) C(w)it follows that ( j wj) C(Z(w)) so ( j wj) R(Z(w)) Hence ( j wj) R(Z(wi wi)) So ( jwj) Z(wi wi) R(Z(wi wi)) C(Z(wiwi)) and thus (j wj) C(wi wi) by assumption(6) Thus C satisfies demand theory substitutes

Conversely suppose contracts are not substi-tutes Then there exists a set X an element (iwi) X and ( j wj) R(X) such that ( j wj) R(X) where X X (i wi) Using (6)wi Wi(X) Let w W(X) and wi Wi(X)Then wi wi and ( j wj) C(w) but ( j wj) C(wi wi) so C does not satisfy the demandtheory substitutes condition

PROOF OF THEOREM 5We may limit attention to the case with

exactly two hospitals by specifying that

the doctors find the other hospitals to beunacceptable

Suppose Rh is not isotone Then there existssome x y X and X X such that for all x X xH h and such that x Rh(X) Rh(X y) By construction since x y Ch(X y) contracts x and y specify different doctorssay d1 xD yD d2 Let x and y denote thecorresponding contracts for doctors d1 and d2 inwhich hospital h is substituted for h

We specify preferences as follows first forhospital h we take x h y h A and allother contracts are unacceptable Second doc-tors in xD(CH(X) CH(X y)) d1 d2prefer their elements of CH(X) CH(X y)to any other contract Third d1 has x d1

x and ranks all other contracts lower Fourthd2 has y d2

y and ranks all other con-tracts lower Finally the remaining doctors findall contracts from hospitals h and h to beunacceptable

Consider a feasible acceptable allocation Xsuch that y X Since h and d2 can have onlyone contract in X x y X Then hrsquos con-tracts in X form a subset of X so x is notincluded and d1 has a contract less preferredthan x Then the deviation by (d1 h) to xblocks X

Consider a feasible acceptable allocation Xsuch that y X Then either x y X or Xis blocked by a coalition including h d1 and d2using the contracts x and y However if x y X then a deviation by (d2 h) to contract yblocks X

Since all feasible allocations are blockedthere exists no stable set of contracts

PROOF OF THEOREM 7Suppose X D H W and let Z(w) ( j

wj)wj wj Then the law of aggregate de-mand is the statement that for any wage vectorsw w satisfying w w such that the choices setsare singletons C(Z(w)) C(Z(w)) The proofis by contradiction Suppose the law of aggre-gate demand does not hold Then there exists awage vector w and a doctor d such that for some(and hence all) 0 C(Z(wd 13 wd)) C(Z(wd wd)) Since hrsquos preferences arequasi-linear changing doctor drsquos wage can af-fect the hiring of other doctors only if it affectsthe hiring of doctor d It follows that there are

931VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

exactly two optimal choices for the hospital atwage vector w these are C(Z(wd wd)) atwhich doctor d is hired and C(Z(wd 13 wd))at which d is not hired but such that two otherdoctors are hired that is there exist doctors dd C(Z(wd 13 wd)) C(Z(wd wd))Let the corresponding payoff for the hospital(when faced with wage vector w) be

Consider the wage vector w (wd wd 2 wdd) For positive and suffi-ciently small the hospitalrsquos payoff at wage vec-tor w is 13 2 if it chooses C(Z(wd 13 wd))and it is 13 if it chooses C(Z(wd wd))and one of these choices must be optimal SoC(w) C(Z(wd 13 wd)) But then raisingthe wage of doctor d from wd 2 to wd whileholding the other wages at wd reduces the de-mand for doctor d from one to zero in violationof the demand theory substitutes condition

PROOF OF THEOREM 8By definition XD X D so by revealed pref-

erence Cd(X D) Cd(XD) Also X H XH soby the law of aggregate demand Ch(X H) Ch(XH) By Theorem 1 CD(XD) CH(XH)and CD(X D) CH(X H) so yendD Cd(XD) yenhH Ch(XH) and yendD Cd(XD) yenhH Ch(XH)Combining these leads to yendD Cd(X D) yendD Cd(XD) yenhH Ch(XH) yenhH Ch(XH) yendD Cd(XD) which begins and ends with the samesum Hence none of the inequalities can bestrict

PROOF OF THEOREM 9Since Ch(X) Ch(X) there exists some

set Y X Y X and contract x such thatCh(Y) Ch(Y x) Since x Ch(Y x)(as otherwise Ch(Y) Ch(Y x) for thepreferences to be rationalizable) there must ex-ist two contracts y z Rh(Y x) Rh(Y)such that y x z y Moreover since y z Ch(Y) yD zD

Denoting by h the second hospital whose exis-tence is hypothesized by the theorem we specifypreferences as follows Let all the doctors with con-tracts in Y have those contracts be their most favoredand let all other doctors find any contract with hunacceptable Let all doctors find any contract notinvolving hospital h or h to be unacceptable

In principle there are three casesIf xD yD then let PxD

y x and PzD z

Then there exist two stable matches Ch(Y x) and Ch(Y) with zD employed in the firstmatch but not in the second

The case xD zD is symmetricFinally if yD xD zD then let x y z

denote contracts with hospital h where the doc-tors (and any other terms) are the same as in xy z respectively Specify the remaining prefer-ences by PxD

x x PyD y y PzD

z z and Ph y x A z Thenthere exist two different stable matches x Ch(Y) and y Ch(Y x) with zD em-ployed in the first match but not in the second

PROOF OF THEOREM 10Let X denote the collection of contracts cho-

sen by the algorithm when doctor d submitspreference Pd If this collection which is stableunder the reported preferences is not stableunder Pd then there exists a blocking coalitionThis blocking coalition must contain d as noother doctorrsquos preferences have changed butthat is impossible since x is drsquos favorite con-tract according to the preferences Pd Since X isstable under Pd the doctor-optimal stable matchunder Pd (the existence of which is guaranteedby Theorem 2) must make every doctor(weakly) better off than at X In particulardoctor d must obtain x

PROOF OF THEOREM 11From Theorem 10 Pd x also obtains x

Hence by the rural hospitals theorem d is em-ployed at every point in the core when Pd x issubmitted So every allocation X at which d isunemployed is blocked by some coalition andset of contracts when d submits Pd Conse-quently if d submits the preferences Pd y1 y2 yn x then every allocation at whichd is unemployed is still blocked by the samecoalition and set of contracts Since the doctor-best stable allocation is one at which d gets aPd-acceptable contract that allocation is weaklyPd-preferred to x Finally the doctor-optimalmatch when Pd is submitted is still the doctor-optimal match when Pd is submitted as drsquospreferences over contracts less preferred than xcannot be used to block a match where shereceives a contract weakly preferred to x

932 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

PROOF OF THEOREM 12Consider contracts x y and z such that

xD xD yD yD zD zD and xH yH zH h Let the preferences of the three identified bePxD

x x PyD y y and PzD

z z andlet those of h be Ph y z x Forthe other contracts x Y Ch(X) let x be xDrsquosmost favored contract For the remaining doctorslet any contract with h or h be unacceptable

With the preceding preferences the only sta-ble allocation includes contracts x and y leav-ing doctor zD unemployed If however zDmisrepresents her preferences and reports PzD

z z then the doctor-optimal stable matchincludes z leaving doctor zD better off

PROOF OF THEOREM 13Setting J 1 and T A it is clear by

inspection that this family includes all singletonvaluations

The family is closed under endowment be-cause given any such valuation v( J T)endowing a set of doctors T simply creates thevaluation v( J T T))

To verify that the family is closed underaggregation consider any two valuations v( J T) and v( J T) Since J and T are justindex sets we may assume without loss ofgenerality that T T J J A DefineT T T and J J J Let

(15) ij ij if i D T j Jij if i D T j J0 otherwise

By inspection of the optimization problems v( J T) v( J T) v( J T)

For the converse consider the valuation v( J T) given by (13) We derive it construc-tively from the singleton valuations aggrega-tion and endowment as follows Let vj be thesingleton valuation associated with row j inmatrix [ij] for j 1 J Since VEA isclosed under aggregation v1 vJ v( J A) VEA Since VEA is also closed underendowment we may endow the doctors in T toobtain v( J T) VEA

PROOF OF THEOREM 14L Shapley (1962) (see also Lehmann et al

2001) had already proved that every assignment

valuation without endowments v( J A) is asubstitutes valuation Ausubel and Milgrom(2002) prove that a valuation v is a substitutesvaluation if and only if the corresponding indi-rect profit function ((p) v(S) yendS pd) issubmodular Let be the indirect profit func-tion corresponding to v( J A) Then theindirect profit function corresponding to v( J T) is (p1 pN) (p1 pN 0 0)Since is the profit function of the substitutesvaluation vh it is submodular and hence issubmodular as well

PROOF OF THEOREM 15Suppose that contracts are substitutes for the

hospitals We proceed by induction The initialcondition specifies that the sequences are iden-tical through time t 0 Denote the sequencecorresponding to the cumulative offer processby a superscript C and denote the alternativeprocess defined by (9) with no superscript As-sume the inductive hypothesis that the se-quences are the same up to round t 1 andsuppress the corresponding superscripts for thevalues at that round Then XD(t) X RH(XH(t 1)) XD

C(t) This also implies that

(16) X XH t 1 XD t

To complete the proof we must show thatXH

C(t) XH(t) or equivalently that XH(t 1) CD(XD(t)) X RD(XD(t))

For t 2 XHC(t 2) XH

C(t 1) by con-struction so by the inductive hypothesis XH(t 2) XH(t 1) Since contracts are substitutesRH is isotone so X RH(XH(t 1)) X RH(XH(t 2)) and hence XD(t) XD(t 1)For t 1 the inclusion XD(t) XD(t 1) isimplied by the initial condition XD(0) X

Recall that by revealed preference RD isisotone It follows that RD(XD(t)) RD(XD(t 1)) and hence using (9) that XH(t 1) X RD(XD(t 1)) X RD(XD(t)) XH(t) ThusXH(t 1) XH(t 1) (X RD(XD(t))) XH(t 1) RD(XD(t)) So XH(t 1) CD(XD(t)) XH(t 1) (XD(t) RD(XD(t))) (XH(t 1) RD(XD(t))) (XD(t) RD(XD(t))) (XH(t 1) XD(t)) RD(XD(t)) X RD(XD(t)) where the last stepequality follows from (16)

933VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

PROOF OF THEOREM 16By construction any contract not in XH(t) is

less preferred by some doctor d than everycorresponding contract in XH(t) (because doctord offers her most preferred contracts in se-quence) So any collection of contracts thatincludes some not in XH(t) must be strictly lesspreferred by one of the doctors Any profitablecoalitional deviation must use only contracts inXH(t)

By construction the one hospitalauctioneermust be part of any deviating coalition andCH(XH(t)) is its strictly most preferred collectionof contracts in XH(t) so there is no profitablecoalitional deviation using just contracts in XH(t)

REFERENCES

Abdulkadiroglu Atila ldquoCollege Admissionswith Affirmative Actionrdquo Unpublished Pa-per 2003

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoBoston Public School MatchingrdquoAmerican Economic Review 2005a (Papersand Proceedings) 95(2) pp 368ndash71

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoThe New York City High SchoolMatchrdquo American Economic Review 2005b(Papers and Proceedings) 95(2) pp 364ndash67

Abdulkadiroglu Atila and Sonmez TayfunldquoSchool Choice A Mechanism Design Ap-proachrdquo American Economic Review 200393(3) pp 729ndash47

Adachi Hiroyuki ldquoOn a Characterization of Sta-ble Matchingsrdquo Economics Letters 200068(1) pp 43ndash49

Alkan Ahmet and Gale David ldquoStable ScheduleMatching under Revealed Preferencerdquo Jour-nal of Economic Theory 2003 112(2) pp289ndash306

Ausubel Lawrence M Cramton Peter and Mil-grom Paul R ldquoThe Clock-Poxy Auction APractical Combinatorial Auction Designrdquo inPeter Cramton Yoav Shoham and RichardSteinberg eds Combinatorial auctionsCambridge MA MIT Press 2005 ch 5

Ausubel Lawrence M and Milgrom Paul RldquoAscending Auctions with Package Bid-dingrdquo Frontiers of Theoretical Economics2002 1(1) Article 1

Blum Yosef Roth Alvin E and Rothblum UrielG ldquoVacancy Chains and Equilibration in Se-nior-Level Labor Marketsrdquo Journal of Eco-nomic Theory 1997 76(2) pp 362ndash411

Brewer Paul J and Plott Charles R ldquoA BinaryConflict Ascending Price (Bicap) Mechanismfor the Decentralized Allocation of the Rightto Use Railroad Tracksrdquo International Jour-nal of Industrial Organization 1996 14(6)pp 857ndash86

Bulow Jeremy and Levin Jonathan ldquoMatchingand Price Competitionrdquo Stanford UniversityStanford Economics Working Paper No1818 2003

Cramton Peter Shoham Yoav and SteinbergRichard Combinatorial auctions Cam-bridge MA MIT Press (forthcoming)

Crawford Vincent P and Knoer Elsie M ldquoJobMatching with Heterogeneous Firms andWorkersrdquo Econometrica 1981 49(2) pp437ndash50

Demange Gabrielle and Gale David ldquoThe Strat-egy Structure of Two-Sided Matching Mar-ketsrdquo Econometrica 1985 53(4) pp 873ndash88

Dubins Lester and Freedman David ldquoMachia-velli and the Gale-Shapley Algorithmrdquo Na-val Research Logistics Quarterly 198188(7) pp 485ndash94

Echenique Federico and Oviedo Jorge ldquoCoreMany-to-One Matchings by Fixed-PointMethodsrdquo Journal of Economic Theory2004 115(2) pp 358ndash76

Fleiner Tamas ldquoA Fixed-Point Approach toStable Matchings and Some ApplicationsrdquoMathematics of Operations Research 200328(1) pp 103ndash26

Gale David and Shapley Lloyd ldquoCollege Ad-missions and the Stability of MarriagerdquoAmerican Mathematical Monthly 196269(1) pp 9ndash15

Gul Faruk and Stacchetti Ennio ldquoWalrasianEquilibrium with Gross Substitutesrdquo Journalof Economic Theory 1999 87(1) pp 95ndash124

Kelso Alexander and Crawford Vincent P ldquoJobMatching Coalition Formation and GrossSubstitutesrdquo Econometrica 1982 50(6) pp1483ndash504

Lehmann Benny Lehmann Daniel and NisanNoam ldquoCombinatorial Auctions with De-

934 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

creasing Marginal Utilityrdquo Games and Eco-nomic Behavior 2005 (forthcoming)

Lien Yuan-Chuan and Yan Jun ldquoOn the GrossSubstitutes Conditionrdquo Unpublished Paper2003 httpwwwstamfordeduyclienTerm_Paper_Lien_Yanpdf

Martınez Ruth Masso Jordi Neme Alejandroand Oviedo Jorge ldquoSingle Agents and the Setof Many-to-One Stable Matchingsrdquo Journalof Economic Theory 2000 91(1) pp 91ndash105

Milgrom Paul R Putting auction theory towork Cambridge Cambridge UniversityPress 2004

Milgrom Paul R ldquoPutting Auction Theory toWork The Simultaneous Ascending Auc-tionrdquo Journal of Political Economy 2000108(2) pp 245ndash72

Porter David Rassenti Stephen RoopnarineAnil and Smith Vernon ldquoCombinatorial Auc-tion Designrdquo Proceedings of the NationalAcademy of Sciences 2003 100(19) pp11153ndash57

Reijnierse Hans van Gellekom Anita and PottersJos A M ldquoVerifying Gross SubstitutabilityrdquoEconomic Theory 2002 20(4) pp 767ndash76

Roth Alvin E ldquoThe Economics of Matching Sta-bility and Incentivesrdquo Mathematics of Opera-tions Research 1982 7(4) pp 617ndash28

Roth Alvin E ldquoStability and Polarization ofInterests in Job Matchingrdquo Econometrica1984 52(1) pp 47ndash57

Roth Alvin E ldquoThe College Admissions Prob-lem Is Not Equivalent to the Marriage Prob-lemrdquo Journal of Economic Theory 1985a36(2) pp 277ndash88

Roth Alvin E ldquoConflict and Coincidence ofInterest in Job Matching Some New Resultsand Open Questionsrdquo Mathematics of Oper-ations Research 1985b 10(3) pp 379ndash89

Roth Alvin E ldquoOn the Allocation of Residentsto Rural Hospitals A General Property ofTwo-Sided Matching Marketsrdquo Economet-rica 1986 54(2) pp 425ndash27

Roth Alvin E ldquoA Natural Experiment in theOrganization of Entry-Level Labor MarketsRegional Markets for New Physicians andSurgeons in the United Kingdomrdquo AmericanEconomic Review 1991 81(3) pp 415ndash40

Roth Alvin E and Peranson Elliott ldquoThe Rede-sign of the Matching Market for AmericanPhysicians Some Engineering Aspects ofEconomic Designrdquo American Economic Re-view 1999 89(4) pp 748ndash80

Roth Alvin E and Sotomayor Marilda Two-sided matching A study in game-theoreticmodeling and analysis Cambridge Cam-bridge University Press 1990

Sen Amartya Collective choice and social wel-fare San Francisco Holden-Day Inc 1970

Shapley Lloyd ldquoComplements and Substitutesin the Optimal Assignment Problemrdquo NavalResearch Logistics Quarterly 1962 9(1) pp45ndash48

935VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

Page 17: Matching with Contracts - Stanford Universityweb.stanford.edu/~milgrom/publishedarticles/Matching with... · 2005. 10. 22. · Gale-Shapley matching algorithm. Hence, the Gale-Shapley

guaranteed to converge only when contracts aresubstitutes for the hospitals

When contracts are substitutes the two sys-tems of equations are equivalent

THEOREM 15 Suppose that contracts aresubstitutes for the hospitals and that XD(0) Xand XH(0) A Then the sequences of pairs(XD(t) XH(t)) generated by the two laws ofmotion (9) and (14) are identical

Even with the initial condition XD(0) X andXH(0) A the algorithms described by (9) and(14) may differ when contracts are not substi-tutes In that case by inspection of the system(14) the cumulative offer process still con-verges because XH(t) is bounded by the finiteset X and grows monotonically from round toround What is at issue is whether the hospitalrsquoschoice from its final search set in the cumulativeoffer process is a feasible and stable set ofcontracts

We will find below that when there is a singlehospital the outcome is indeed a feasible andstable set of contracts In that case the cumu-lative offer process coincides with the general-ized proxy auction of Ausubel and Milgrom(2002) Those authors analyze in detail the casewhen a bid consists of a price and a subset of theset of goods that the bidder wishes to buy Ateach round the seller ldquoholdsrdquo the collection ofbids that maximizes its total revenues subject tothe constraint that each good can be sold onlyonce The generalized proxy auction howeveris not limited to the sale of goods and in fact isidentical in scope to our present model ofmatching with contracts In particular the auc-tioneer may impose a variety of constraints onthe feasible collections of bids and may weighnonprice factors either exclusively or in com-bination with prices to decide which collectionof bids to hold Bidders for their part maymake bids that include factors besides price andmay not include price at all

To illustrate the role of general contracts inthis auction setting consider the auction designsuggested by Paul Brewer and Charles Plott(1996) in which bidders seek to buy access to arailroad track In that application a bid specifiesa trainrsquos direction of travel departure and ar-rival times and price offered It is assumed that

trains travel at a uniform speed along the trackIn this setting the contract terms must includethe direction and the two times and the seller isconstrained to hold only combinations of bidssuch that trains maintain safe distances fromone another at all times

A second example of the generalized proxyprocess is a procurement auction in which thebuyer scores suppliers on the basis of suchfactors as quality excess capacity credit ratingand historical reliability as well as price and inwhich the buyer prefers to set aside someamount of its purchase for minority contractorsor to maintain geographic diversity of supply toreduce the chance of supply disruptions In anasset sale the seller may weigh the probabilitythat the sale will be completed for example dueto financing contingencies or because a union orantitrust regulators must approve the sale

The cumulative offer process model withgeneral contracts accommodates all of thesepossibilities The auctioneer in the model cor-responds to a single ldquohospitalrdquomdashhereafter theauctioneermdashwith a choice function CH thatselects her most preferred collection of contractproposals We have the following result (whichis first stated using different notation than in theAusubel-Milgrom paper)

THEOREM 16 When the doctor-offering cu-mulative offer process with a single hospitalterminates at time t with outcome (XD(t) XH(t))the hospitalrsquos choice CH(XH(t)) is a stable col-lection of contracts

Cumulative offer processes connect the the-ory of matching with contracts to the emergingtheory of package auctions and auctions withcomplex constraints

VI Conclusion

We have introduced a general model ofmatching with bilateral contracts that encom-passes and extends two-sided matching modelswith and without money and certain auctionmodels The new formulation allows some con-tract terms to be exogenously fixed and others tobe endogenous in any combinations In thisvery general framework we characterize stable

929VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

collections of contracts in terms of the solutionto a certain system of equations

The key to the analysis is to extend twoconcepts of demand theory to models with orwithout prices The first concept to be extendedis the notion of substitutes Our definition ap-plies essentially the Roth-Sotomayor substitut-able preferences condition to a more generalclass of contracts contracts are substitutes ifwhenever the set of feasible bilateral contractsexpands the set of contracts that the firm rejectsalso expands We show that (a) our definitioncoincides with the usual demand theory condi-tion when both apply (b) when contracts aresubstitutes a stable collection of contracts ex-ists and (c) if any hospital or firm has prefer-ences that are not substitutes then there arepreferences with single openings for each otherfirm such that no stable allocation exists Wefurther show that when the substitute conditionapplies (a) both the doctor-offering and hospi-tal-offering Gale-Shapley algorithms can berepresented as iterated operations of the sameoperator (starting from different initial condi-tions) and (b) starting at a stable allocationfrom which a doctor retires a natural marketdynamic mimics the Gale-Shapley process tofind a new stable allocation

The second relevant demand theory conceptis the law of demand which we extend both toinclude heterogeneous inputs and to encompassmodels with or without prices The law of ag-gregate demand condition holds that when theset of feasible contracts expands the number ofcontracts that the firm chooses to sign weaklyincreases In terms of traditional demand theorythis means that for example when the wages ofsome of a heterogeneous group of workers fallsif the workers are substitutes then the totalnumber of workers employed rises We showthat (a) when inputs are substitutes the choicesof a profit-maximizing firmhospital satisfy thelaw of aggregate demand Moreover when thechoices of every hospitalfirm satisfy the law ofaggregate demand and the substitutes conditionthen (b) the set of workersdoctors employed isthe same at every stable allocation (c) the num-ber employed by each firmhospital is also thesame and (d) truthful reporting is a dominantstrategy for doctors in the doctor-offering algo-rithm Moreover we prove (e) that if the law of

aggregate demand fails in any potentially ob-servable way then the preceding dominantstrategy property does not hold

For these results to be useful for practicalmechanism design one needs to account forhow preferences especially hospital prefer-ences are to be reported to the mechanismThere needs to be a convenient way for hospi-tals to express a rich array of preferences andone needs to know whether the preferences be-ing reported actually satisfy the conditions ofthe various theorems Toward that end we in-troduce a parametric form that we call extendedassignment valuations which strictly general-izes several existing specifications and whichalways satisfies both the substitutes and law ofaggregate demand conditions

Finally we introduce an alternative treatmentof the doctor-offering algorithm the cumulativeoffer process We show that when contracts aresubstitutes the previously characterized doctor-offering algorithm coincides exactly with a cu-mulative offer process When contracts are notsubstitutes but there is just one hospital (theldquoauctioneerrdquo) the cumulative offer process co-incides with the Ausubel-Milgrom ascendingproxy auction This identity clarifies the con-nection between these algorithms and com-bined with the dominant strategy theoremreported above generalizes the Ausubel-Milgromdominant strategy theorem for the proxyauctions

Our new approach reveals deep similaritiesamong several of the most successful auctionand matching designs in current use and amongthe environmental conditions in which theoret-ically the mechanisms should perform at theirbest Understanding these similarities can helpus to understand the limitations of these mech-anisms paving the way for new designs

APPENDIX

PROOF OF THEOREM 1Let (XD XH) X2 be a solution to (3) Then

XD XH XD RD(XD) CD(XD) andsimilarly XH XD XH RH(XH) CH(XH)so XH XD CH(XH) CD(XD)

Next we show that X XH XD is a stableset of contracts Since X CH(XH) CD(XD)it follows by revealed preference that X

930 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

CH(X) CD(X) so condition (i) of the defi-nition of stability is satisfied

Consider any hospital h and set of contractsX CD(X X) naming hospital h Since X CD(XD) revealed preference of the doctorsimplies that X XD CD(XD) and hence thatX RD(XD) X XD RD(XD) CD(XD) RD(XD) A Thus X X RD(XD) XHby (3) So if X Ch(X) then by the revealedpreference of hospital h X h Ch(XH) Ch(X) Hence X Ch(X X) so condition(ii) is satisfied So the set of contracts X isunblocked

For the converse suppose that X is a stablecollection of contracts Then CD(X) X LetXH be the set of contracts that the doctorsweakly prefer to X and XD the set of contractsthat doctors weakly disprefer By constructionX XH X XD X is a partition of X

To obtain (3) observe first that if there issome h such that Ch(XH) Xh then X Ch(XH) violates stability condition (ii) SoCh(XH) Xh for all h that is CH(XH) X Itfollows that X RH(XH) X (XH X) X (X XD) XD and that X RD(XD) X (XD CD(XD)) X (XD X) XH

Hence (XD XH) satisfies (3) and XH XD X

PROOF OF THEOREM 2Let i j ( j wj) C(w) and wi wi Define

Z(w) ( j wj)wj wj Then Z(wi wi) Z(w) If contracts are substitutes then R(Z(wiwi)) R(Z(w)) By (6) since ( j wj) C(w)it follows that ( j wj) C(Z(w)) so ( j wj) R(Z(w)) Hence ( j wj) R(Z(wi wi)) So ( jwj) Z(wi wi) R(Z(wi wi)) C(Z(wiwi)) and thus (j wj) C(wi wi) by assumption(6) Thus C satisfies demand theory substitutes

Conversely suppose contracts are not substi-tutes Then there exists a set X an element (iwi) X and ( j wj) R(X) such that ( j wj) R(X) where X X (i wi) Using (6)wi Wi(X) Let w W(X) and wi Wi(X)Then wi wi and ( j wj) C(w) but ( j wj) C(wi wi) so C does not satisfy the demandtheory substitutes condition

PROOF OF THEOREM 5We may limit attention to the case with

exactly two hospitals by specifying that

the doctors find the other hospitals to beunacceptable

Suppose Rh is not isotone Then there existssome x y X and X X such that for all x X xH h and such that x Rh(X) Rh(X y) By construction since x y Ch(X y) contracts x and y specify different doctorssay d1 xD yD d2 Let x and y denote thecorresponding contracts for doctors d1 and d2 inwhich hospital h is substituted for h

We specify preferences as follows first forhospital h we take x h y h A and allother contracts are unacceptable Second doc-tors in xD(CH(X) CH(X y)) d1 d2prefer their elements of CH(X) CH(X y)to any other contract Third d1 has x d1

x and ranks all other contracts lower Fourthd2 has y d2

y and ranks all other con-tracts lower Finally the remaining doctors findall contracts from hospitals h and h to beunacceptable

Consider a feasible acceptable allocation Xsuch that y X Since h and d2 can have onlyone contract in X x y X Then hrsquos con-tracts in X form a subset of X so x is notincluded and d1 has a contract less preferredthan x Then the deviation by (d1 h) to xblocks X

Consider a feasible acceptable allocation Xsuch that y X Then either x y X or Xis blocked by a coalition including h d1 and d2using the contracts x and y However if x y X then a deviation by (d2 h) to contract yblocks X

Since all feasible allocations are blockedthere exists no stable set of contracts

PROOF OF THEOREM 7Suppose X D H W and let Z(w) ( j

wj)wj wj Then the law of aggregate de-mand is the statement that for any wage vectorsw w satisfying w w such that the choices setsare singletons C(Z(w)) C(Z(w)) The proofis by contradiction Suppose the law of aggre-gate demand does not hold Then there exists awage vector w and a doctor d such that for some(and hence all) 0 C(Z(wd 13 wd)) C(Z(wd wd)) Since hrsquos preferences arequasi-linear changing doctor drsquos wage can af-fect the hiring of other doctors only if it affectsthe hiring of doctor d It follows that there are

931VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

exactly two optimal choices for the hospital atwage vector w these are C(Z(wd wd)) atwhich doctor d is hired and C(Z(wd 13 wd))at which d is not hired but such that two otherdoctors are hired that is there exist doctors dd C(Z(wd 13 wd)) C(Z(wd wd))Let the corresponding payoff for the hospital(when faced with wage vector w) be

Consider the wage vector w (wd wd 2 wdd) For positive and suffi-ciently small the hospitalrsquos payoff at wage vec-tor w is 13 2 if it chooses C(Z(wd 13 wd))and it is 13 if it chooses C(Z(wd wd))and one of these choices must be optimal SoC(w) C(Z(wd 13 wd)) But then raisingthe wage of doctor d from wd 2 to wd whileholding the other wages at wd reduces the de-mand for doctor d from one to zero in violationof the demand theory substitutes condition

PROOF OF THEOREM 8By definition XD X D so by revealed pref-

erence Cd(X D) Cd(XD) Also X H XH soby the law of aggregate demand Ch(X H) Ch(XH) By Theorem 1 CD(XD) CH(XH)and CD(X D) CH(X H) so yendD Cd(XD) yenhH Ch(XH) and yendD Cd(XD) yenhH Ch(XH)Combining these leads to yendD Cd(X D) yendD Cd(XD) yenhH Ch(XH) yenhH Ch(XH) yendD Cd(XD) which begins and ends with the samesum Hence none of the inequalities can bestrict

PROOF OF THEOREM 9Since Ch(X) Ch(X) there exists some

set Y X Y X and contract x such thatCh(Y) Ch(Y x) Since x Ch(Y x)(as otherwise Ch(Y) Ch(Y x) for thepreferences to be rationalizable) there must ex-ist two contracts y z Rh(Y x) Rh(Y)such that y x z y Moreover since y z Ch(Y) yD zD

Denoting by h the second hospital whose exis-tence is hypothesized by the theorem we specifypreferences as follows Let all the doctors with con-tracts in Y have those contracts be their most favoredand let all other doctors find any contract with hunacceptable Let all doctors find any contract notinvolving hospital h or h to be unacceptable

In principle there are three casesIf xD yD then let PxD

y x and PzD z

Then there exist two stable matches Ch(Y x) and Ch(Y) with zD employed in the firstmatch but not in the second

The case xD zD is symmetricFinally if yD xD zD then let x y z

denote contracts with hospital h where the doc-tors (and any other terms) are the same as in xy z respectively Specify the remaining prefer-ences by PxD

x x PyD y y PzD

z z and Ph y x A z Thenthere exist two different stable matches x Ch(Y) and y Ch(Y x) with zD em-ployed in the first match but not in the second

PROOF OF THEOREM 10Let X denote the collection of contracts cho-

sen by the algorithm when doctor d submitspreference Pd If this collection which is stableunder the reported preferences is not stableunder Pd then there exists a blocking coalitionThis blocking coalition must contain d as noother doctorrsquos preferences have changed butthat is impossible since x is drsquos favorite con-tract according to the preferences Pd Since X isstable under Pd the doctor-optimal stable matchunder Pd (the existence of which is guaranteedby Theorem 2) must make every doctor(weakly) better off than at X In particulardoctor d must obtain x

PROOF OF THEOREM 11From Theorem 10 Pd x also obtains x

Hence by the rural hospitals theorem d is em-ployed at every point in the core when Pd x issubmitted So every allocation X at which d isunemployed is blocked by some coalition andset of contracts when d submits Pd Conse-quently if d submits the preferences Pd y1 y2 yn x then every allocation at whichd is unemployed is still blocked by the samecoalition and set of contracts Since the doctor-best stable allocation is one at which d gets aPd-acceptable contract that allocation is weaklyPd-preferred to x Finally the doctor-optimalmatch when Pd is submitted is still the doctor-optimal match when Pd is submitted as drsquospreferences over contracts less preferred than xcannot be used to block a match where shereceives a contract weakly preferred to x

932 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

PROOF OF THEOREM 12Consider contracts x y and z such that

xD xD yD yD zD zD and xH yH zH h Let the preferences of the three identified bePxD

x x PyD y y and PzD

z z andlet those of h be Ph y z x Forthe other contracts x Y Ch(X) let x be xDrsquosmost favored contract For the remaining doctorslet any contract with h or h be unacceptable

With the preceding preferences the only sta-ble allocation includes contracts x and y leav-ing doctor zD unemployed If however zDmisrepresents her preferences and reports PzD

z z then the doctor-optimal stable matchincludes z leaving doctor zD better off

PROOF OF THEOREM 13Setting J 1 and T A it is clear by

inspection that this family includes all singletonvaluations

The family is closed under endowment be-cause given any such valuation v( J T)endowing a set of doctors T simply creates thevaluation v( J T T))

To verify that the family is closed underaggregation consider any two valuations v( J T) and v( J T) Since J and T are justindex sets we may assume without loss ofgenerality that T T J J A DefineT T T and J J J Let

(15) ij ij if i D T j Jij if i D T j J0 otherwise

By inspection of the optimization problems v( J T) v( J T) v( J T)

For the converse consider the valuation v( J T) given by (13) We derive it construc-tively from the singleton valuations aggrega-tion and endowment as follows Let vj be thesingleton valuation associated with row j inmatrix [ij] for j 1 J Since VEA isclosed under aggregation v1 vJ v( J A) VEA Since VEA is also closed underendowment we may endow the doctors in T toobtain v( J T) VEA

PROOF OF THEOREM 14L Shapley (1962) (see also Lehmann et al

2001) had already proved that every assignment

valuation without endowments v( J A) is asubstitutes valuation Ausubel and Milgrom(2002) prove that a valuation v is a substitutesvaluation if and only if the corresponding indi-rect profit function ((p) v(S) yendS pd) issubmodular Let be the indirect profit func-tion corresponding to v( J A) Then theindirect profit function corresponding to v( J T) is (p1 pN) (p1 pN 0 0)Since is the profit function of the substitutesvaluation vh it is submodular and hence issubmodular as well

PROOF OF THEOREM 15Suppose that contracts are substitutes for the

hospitals We proceed by induction The initialcondition specifies that the sequences are iden-tical through time t 0 Denote the sequencecorresponding to the cumulative offer processby a superscript C and denote the alternativeprocess defined by (9) with no superscript As-sume the inductive hypothesis that the se-quences are the same up to round t 1 andsuppress the corresponding superscripts for thevalues at that round Then XD(t) X RH(XH(t 1)) XD

C(t) This also implies that

(16) X XH t 1 XD t

To complete the proof we must show thatXH

C(t) XH(t) or equivalently that XH(t 1) CD(XD(t)) X RD(XD(t))

For t 2 XHC(t 2) XH

C(t 1) by con-struction so by the inductive hypothesis XH(t 2) XH(t 1) Since contracts are substitutesRH is isotone so X RH(XH(t 1)) X RH(XH(t 2)) and hence XD(t) XD(t 1)For t 1 the inclusion XD(t) XD(t 1) isimplied by the initial condition XD(0) X

Recall that by revealed preference RD isisotone It follows that RD(XD(t)) RD(XD(t 1)) and hence using (9) that XH(t 1) X RD(XD(t 1)) X RD(XD(t)) XH(t) ThusXH(t 1) XH(t 1) (X RD(XD(t))) XH(t 1) RD(XD(t)) So XH(t 1) CD(XD(t)) XH(t 1) (XD(t) RD(XD(t))) (XH(t 1) RD(XD(t))) (XD(t) RD(XD(t))) (XH(t 1) XD(t)) RD(XD(t)) X RD(XD(t)) where the last stepequality follows from (16)

933VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

PROOF OF THEOREM 16By construction any contract not in XH(t) is

less preferred by some doctor d than everycorresponding contract in XH(t) (because doctord offers her most preferred contracts in se-quence) So any collection of contracts thatincludes some not in XH(t) must be strictly lesspreferred by one of the doctors Any profitablecoalitional deviation must use only contracts inXH(t)

By construction the one hospitalauctioneermust be part of any deviating coalition andCH(XH(t)) is its strictly most preferred collectionof contracts in XH(t) so there is no profitablecoalitional deviation using just contracts in XH(t)

REFERENCES

Abdulkadiroglu Atila ldquoCollege Admissionswith Affirmative Actionrdquo Unpublished Pa-per 2003

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoBoston Public School MatchingrdquoAmerican Economic Review 2005a (Papersand Proceedings) 95(2) pp 368ndash71

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoThe New York City High SchoolMatchrdquo American Economic Review 2005b(Papers and Proceedings) 95(2) pp 364ndash67

Abdulkadiroglu Atila and Sonmez TayfunldquoSchool Choice A Mechanism Design Ap-proachrdquo American Economic Review 200393(3) pp 729ndash47

Adachi Hiroyuki ldquoOn a Characterization of Sta-ble Matchingsrdquo Economics Letters 200068(1) pp 43ndash49

Alkan Ahmet and Gale David ldquoStable ScheduleMatching under Revealed Preferencerdquo Jour-nal of Economic Theory 2003 112(2) pp289ndash306

Ausubel Lawrence M Cramton Peter and Mil-grom Paul R ldquoThe Clock-Poxy Auction APractical Combinatorial Auction Designrdquo inPeter Cramton Yoav Shoham and RichardSteinberg eds Combinatorial auctionsCambridge MA MIT Press 2005 ch 5

Ausubel Lawrence M and Milgrom Paul RldquoAscending Auctions with Package Bid-dingrdquo Frontiers of Theoretical Economics2002 1(1) Article 1

Blum Yosef Roth Alvin E and Rothblum UrielG ldquoVacancy Chains and Equilibration in Se-nior-Level Labor Marketsrdquo Journal of Eco-nomic Theory 1997 76(2) pp 362ndash411

Brewer Paul J and Plott Charles R ldquoA BinaryConflict Ascending Price (Bicap) Mechanismfor the Decentralized Allocation of the Rightto Use Railroad Tracksrdquo International Jour-nal of Industrial Organization 1996 14(6)pp 857ndash86

Bulow Jeremy and Levin Jonathan ldquoMatchingand Price Competitionrdquo Stanford UniversityStanford Economics Working Paper No1818 2003

Cramton Peter Shoham Yoav and SteinbergRichard Combinatorial auctions Cam-bridge MA MIT Press (forthcoming)

Crawford Vincent P and Knoer Elsie M ldquoJobMatching with Heterogeneous Firms andWorkersrdquo Econometrica 1981 49(2) pp437ndash50

Demange Gabrielle and Gale David ldquoThe Strat-egy Structure of Two-Sided Matching Mar-ketsrdquo Econometrica 1985 53(4) pp 873ndash88

Dubins Lester and Freedman David ldquoMachia-velli and the Gale-Shapley Algorithmrdquo Na-val Research Logistics Quarterly 198188(7) pp 485ndash94

Echenique Federico and Oviedo Jorge ldquoCoreMany-to-One Matchings by Fixed-PointMethodsrdquo Journal of Economic Theory2004 115(2) pp 358ndash76

Fleiner Tamas ldquoA Fixed-Point Approach toStable Matchings and Some ApplicationsrdquoMathematics of Operations Research 200328(1) pp 103ndash26

Gale David and Shapley Lloyd ldquoCollege Ad-missions and the Stability of MarriagerdquoAmerican Mathematical Monthly 196269(1) pp 9ndash15

Gul Faruk and Stacchetti Ennio ldquoWalrasianEquilibrium with Gross Substitutesrdquo Journalof Economic Theory 1999 87(1) pp 95ndash124

Kelso Alexander and Crawford Vincent P ldquoJobMatching Coalition Formation and GrossSubstitutesrdquo Econometrica 1982 50(6) pp1483ndash504

Lehmann Benny Lehmann Daniel and NisanNoam ldquoCombinatorial Auctions with De-

934 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

creasing Marginal Utilityrdquo Games and Eco-nomic Behavior 2005 (forthcoming)

Lien Yuan-Chuan and Yan Jun ldquoOn the GrossSubstitutes Conditionrdquo Unpublished Paper2003 httpwwwstamfordeduyclienTerm_Paper_Lien_Yanpdf

Martınez Ruth Masso Jordi Neme Alejandroand Oviedo Jorge ldquoSingle Agents and the Setof Many-to-One Stable Matchingsrdquo Journalof Economic Theory 2000 91(1) pp 91ndash105

Milgrom Paul R Putting auction theory towork Cambridge Cambridge UniversityPress 2004

Milgrom Paul R ldquoPutting Auction Theory toWork The Simultaneous Ascending Auc-tionrdquo Journal of Political Economy 2000108(2) pp 245ndash72

Porter David Rassenti Stephen RoopnarineAnil and Smith Vernon ldquoCombinatorial Auc-tion Designrdquo Proceedings of the NationalAcademy of Sciences 2003 100(19) pp11153ndash57

Reijnierse Hans van Gellekom Anita and PottersJos A M ldquoVerifying Gross SubstitutabilityrdquoEconomic Theory 2002 20(4) pp 767ndash76

Roth Alvin E ldquoThe Economics of Matching Sta-bility and Incentivesrdquo Mathematics of Opera-tions Research 1982 7(4) pp 617ndash28

Roth Alvin E ldquoStability and Polarization ofInterests in Job Matchingrdquo Econometrica1984 52(1) pp 47ndash57

Roth Alvin E ldquoThe College Admissions Prob-lem Is Not Equivalent to the Marriage Prob-lemrdquo Journal of Economic Theory 1985a36(2) pp 277ndash88

Roth Alvin E ldquoConflict and Coincidence ofInterest in Job Matching Some New Resultsand Open Questionsrdquo Mathematics of Oper-ations Research 1985b 10(3) pp 379ndash89

Roth Alvin E ldquoOn the Allocation of Residentsto Rural Hospitals A General Property ofTwo-Sided Matching Marketsrdquo Economet-rica 1986 54(2) pp 425ndash27

Roth Alvin E ldquoA Natural Experiment in theOrganization of Entry-Level Labor MarketsRegional Markets for New Physicians andSurgeons in the United Kingdomrdquo AmericanEconomic Review 1991 81(3) pp 415ndash40

Roth Alvin E and Peranson Elliott ldquoThe Rede-sign of the Matching Market for AmericanPhysicians Some Engineering Aspects ofEconomic Designrdquo American Economic Re-view 1999 89(4) pp 748ndash80

Roth Alvin E and Sotomayor Marilda Two-sided matching A study in game-theoreticmodeling and analysis Cambridge Cam-bridge University Press 1990

Sen Amartya Collective choice and social wel-fare San Francisco Holden-Day Inc 1970

Shapley Lloyd ldquoComplements and Substitutesin the Optimal Assignment Problemrdquo NavalResearch Logistics Quarterly 1962 9(1) pp45ndash48

935VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

Page 18: Matching with Contracts - Stanford Universityweb.stanford.edu/~milgrom/publishedarticles/Matching with... · 2005. 10. 22. · Gale-Shapley matching algorithm. Hence, the Gale-Shapley

collections of contracts in terms of the solutionto a certain system of equations

The key to the analysis is to extend twoconcepts of demand theory to models with orwithout prices The first concept to be extendedis the notion of substitutes Our definition ap-plies essentially the Roth-Sotomayor substitut-able preferences condition to a more generalclass of contracts contracts are substitutes ifwhenever the set of feasible bilateral contractsexpands the set of contracts that the firm rejectsalso expands We show that (a) our definitioncoincides with the usual demand theory condi-tion when both apply (b) when contracts aresubstitutes a stable collection of contracts ex-ists and (c) if any hospital or firm has prefer-ences that are not substitutes then there arepreferences with single openings for each otherfirm such that no stable allocation exists Wefurther show that when the substitute conditionapplies (a) both the doctor-offering and hospi-tal-offering Gale-Shapley algorithms can berepresented as iterated operations of the sameoperator (starting from different initial condi-tions) and (b) starting at a stable allocationfrom which a doctor retires a natural marketdynamic mimics the Gale-Shapley process tofind a new stable allocation

The second relevant demand theory conceptis the law of demand which we extend both toinclude heterogeneous inputs and to encompassmodels with or without prices The law of ag-gregate demand condition holds that when theset of feasible contracts expands the number ofcontracts that the firm chooses to sign weaklyincreases In terms of traditional demand theorythis means that for example when the wages ofsome of a heterogeneous group of workers fallsif the workers are substitutes then the totalnumber of workers employed rises We showthat (a) when inputs are substitutes the choicesof a profit-maximizing firmhospital satisfy thelaw of aggregate demand Moreover when thechoices of every hospitalfirm satisfy the law ofaggregate demand and the substitutes conditionthen (b) the set of workersdoctors employed isthe same at every stable allocation (c) the num-ber employed by each firmhospital is also thesame and (d) truthful reporting is a dominantstrategy for doctors in the doctor-offering algo-rithm Moreover we prove (e) that if the law of

aggregate demand fails in any potentially ob-servable way then the preceding dominantstrategy property does not hold

For these results to be useful for practicalmechanism design one needs to account forhow preferences especially hospital prefer-ences are to be reported to the mechanismThere needs to be a convenient way for hospi-tals to express a rich array of preferences andone needs to know whether the preferences be-ing reported actually satisfy the conditions ofthe various theorems Toward that end we in-troduce a parametric form that we call extendedassignment valuations which strictly general-izes several existing specifications and whichalways satisfies both the substitutes and law ofaggregate demand conditions

Finally we introduce an alternative treatmentof the doctor-offering algorithm the cumulativeoffer process We show that when contracts aresubstitutes the previously characterized doctor-offering algorithm coincides exactly with a cu-mulative offer process When contracts are notsubstitutes but there is just one hospital (theldquoauctioneerrdquo) the cumulative offer process co-incides with the Ausubel-Milgrom ascendingproxy auction This identity clarifies the con-nection between these algorithms and com-bined with the dominant strategy theoremreported above generalizes the Ausubel-Milgromdominant strategy theorem for the proxyauctions

Our new approach reveals deep similaritiesamong several of the most successful auctionand matching designs in current use and amongthe environmental conditions in which theoret-ically the mechanisms should perform at theirbest Understanding these similarities can helpus to understand the limitations of these mech-anisms paving the way for new designs

APPENDIX

PROOF OF THEOREM 1Let (XD XH) X2 be a solution to (3) Then

XD XH XD RD(XD) CD(XD) andsimilarly XH XD XH RH(XH) CH(XH)so XH XD CH(XH) CD(XD)

Next we show that X XH XD is a stableset of contracts Since X CH(XH) CD(XD)it follows by revealed preference that X

930 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

CH(X) CD(X) so condition (i) of the defi-nition of stability is satisfied

Consider any hospital h and set of contractsX CD(X X) naming hospital h Since X CD(XD) revealed preference of the doctorsimplies that X XD CD(XD) and hence thatX RD(XD) X XD RD(XD) CD(XD) RD(XD) A Thus X X RD(XD) XHby (3) So if X Ch(X) then by the revealedpreference of hospital h X h Ch(XH) Ch(X) Hence X Ch(X X) so condition(ii) is satisfied So the set of contracts X isunblocked

For the converse suppose that X is a stablecollection of contracts Then CD(X) X LetXH be the set of contracts that the doctorsweakly prefer to X and XD the set of contractsthat doctors weakly disprefer By constructionX XH X XD X is a partition of X

To obtain (3) observe first that if there issome h such that Ch(XH) Xh then X Ch(XH) violates stability condition (ii) SoCh(XH) Xh for all h that is CH(XH) X Itfollows that X RH(XH) X (XH X) X (X XD) XD and that X RD(XD) X (XD CD(XD)) X (XD X) XH

Hence (XD XH) satisfies (3) and XH XD X

PROOF OF THEOREM 2Let i j ( j wj) C(w) and wi wi Define

Z(w) ( j wj)wj wj Then Z(wi wi) Z(w) If contracts are substitutes then R(Z(wiwi)) R(Z(w)) By (6) since ( j wj) C(w)it follows that ( j wj) C(Z(w)) so ( j wj) R(Z(w)) Hence ( j wj) R(Z(wi wi)) So ( jwj) Z(wi wi) R(Z(wi wi)) C(Z(wiwi)) and thus (j wj) C(wi wi) by assumption(6) Thus C satisfies demand theory substitutes

Conversely suppose contracts are not substi-tutes Then there exists a set X an element (iwi) X and ( j wj) R(X) such that ( j wj) R(X) where X X (i wi) Using (6)wi Wi(X) Let w W(X) and wi Wi(X)Then wi wi and ( j wj) C(w) but ( j wj) C(wi wi) so C does not satisfy the demandtheory substitutes condition

PROOF OF THEOREM 5We may limit attention to the case with

exactly two hospitals by specifying that

the doctors find the other hospitals to beunacceptable

Suppose Rh is not isotone Then there existssome x y X and X X such that for all x X xH h and such that x Rh(X) Rh(X y) By construction since x y Ch(X y) contracts x and y specify different doctorssay d1 xD yD d2 Let x and y denote thecorresponding contracts for doctors d1 and d2 inwhich hospital h is substituted for h

We specify preferences as follows first forhospital h we take x h y h A and allother contracts are unacceptable Second doc-tors in xD(CH(X) CH(X y)) d1 d2prefer their elements of CH(X) CH(X y)to any other contract Third d1 has x d1

x and ranks all other contracts lower Fourthd2 has y d2

y and ranks all other con-tracts lower Finally the remaining doctors findall contracts from hospitals h and h to beunacceptable

Consider a feasible acceptable allocation Xsuch that y X Since h and d2 can have onlyone contract in X x y X Then hrsquos con-tracts in X form a subset of X so x is notincluded and d1 has a contract less preferredthan x Then the deviation by (d1 h) to xblocks X

Consider a feasible acceptable allocation Xsuch that y X Then either x y X or Xis blocked by a coalition including h d1 and d2using the contracts x and y However if x y X then a deviation by (d2 h) to contract yblocks X

Since all feasible allocations are blockedthere exists no stable set of contracts

PROOF OF THEOREM 7Suppose X D H W and let Z(w) ( j

wj)wj wj Then the law of aggregate de-mand is the statement that for any wage vectorsw w satisfying w w such that the choices setsare singletons C(Z(w)) C(Z(w)) The proofis by contradiction Suppose the law of aggre-gate demand does not hold Then there exists awage vector w and a doctor d such that for some(and hence all) 0 C(Z(wd 13 wd)) C(Z(wd wd)) Since hrsquos preferences arequasi-linear changing doctor drsquos wage can af-fect the hiring of other doctors only if it affectsthe hiring of doctor d It follows that there are

931VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

exactly two optimal choices for the hospital atwage vector w these are C(Z(wd wd)) atwhich doctor d is hired and C(Z(wd 13 wd))at which d is not hired but such that two otherdoctors are hired that is there exist doctors dd C(Z(wd 13 wd)) C(Z(wd wd))Let the corresponding payoff for the hospital(when faced with wage vector w) be

Consider the wage vector w (wd wd 2 wdd) For positive and suffi-ciently small the hospitalrsquos payoff at wage vec-tor w is 13 2 if it chooses C(Z(wd 13 wd))and it is 13 if it chooses C(Z(wd wd))and one of these choices must be optimal SoC(w) C(Z(wd 13 wd)) But then raisingthe wage of doctor d from wd 2 to wd whileholding the other wages at wd reduces the de-mand for doctor d from one to zero in violationof the demand theory substitutes condition

PROOF OF THEOREM 8By definition XD X D so by revealed pref-

erence Cd(X D) Cd(XD) Also X H XH soby the law of aggregate demand Ch(X H) Ch(XH) By Theorem 1 CD(XD) CH(XH)and CD(X D) CH(X H) so yendD Cd(XD) yenhH Ch(XH) and yendD Cd(XD) yenhH Ch(XH)Combining these leads to yendD Cd(X D) yendD Cd(XD) yenhH Ch(XH) yenhH Ch(XH) yendD Cd(XD) which begins and ends with the samesum Hence none of the inequalities can bestrict

PROOF OF THEOREM 9Since Ch(X) Ch(X) there exists some

set Y X Y X and contract x such thatCh(Y) Ch(Y x) Since x Ch(Y x)(as otherwise Ch(Y) Ch(Y x) for thepreferences to be rationalizable) there must ex-ist two contracts y z Rh(Y x) Rh(Y)such that y x z y Moreover since y z Ch(Y) yD zD

Denoting by h the second hospital whose exis-tence is hypothesized by the theorem we specifypreferences as follows Let all the doctors with con-tracts in Y have those contracts be their most favoredand let all other doctors find any contract with hunacceptable Let all doctors find any contract notinvolving hospital h or h to be unacceptable

In principle there are three casesIf xD yD then let PxD

y x and PzD z

Then there exist two stable matches Ch(Y x) and Ch(Y) with zD employed in the firstmatch but not in the second

The case xD zD is symmetricFinally if yD xD zD then let x y z

denote contracts with hospital h where the doc-tors (and any other terms) are the same as in xy z respectively Specify the remaining prefer-ences by PxD

x x PyD y y PzD

z z and Ph y x A z Thenthere exist two different stable matches x Ch(Y) and y Ch(Y x) with zD em-ployed in the first match but not in the second

PROOF OF THEOREM 10Let X denote the collection of contracts cho-

sen by the algorithm when doctor d submitspreference Pd If this collection which is stableunder the reported preferences is not stableunder Pd then there exists a blocking coalitionThis blocking coalition must contain d as noother doctorrsquos preferences have changed butthat is impossible since x is drsquos favorite con-tract according to the preferences Pd Since X isstable under Pd the doctor-optimal stable matchunder Pd (the existence of which is guaranteedby Theorem 2) must make every doctor(weakly) better off than at X In particulardoctor d must obtain x

PROOF OF THEOREM 11From Theorem 10 Pd x also obtains x

Hence by the rural hospitals theorem d is em-ployed at every point in the core when Pd x issubmitted So every allocation X at which d isunemployed is blocked by some coalition andset of contracts when d submits Pd Conse-quently if d submits the preferences Pd y1 y2 yn x then every allocation at whichd is unemployed is still blocked by the samecoalition and set of contracts Since the doctor-best stable allocation is one at which d gets aPd-acceptable contract that allocation is weaklyPd-preferred to x Finally the doctor-optimalmatch when Pd is submitted is still the doctor-optimal match when Pd is submitted as drsquospreferences over contracts less preferred than xcannot be used to block a match where shereceives a contract weakly preferred to x

932 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

PROOF OF THEOREM 12Consider contracts x y and z such that

xD xD yD yD zD zD and xH yH zH h Let the preferences of the three identified bePxD

x x PyD y y and PzD

z z andlet those of h be Ph y z x Forthe other contracts x Y Ch(X) let x be xDrsquosmost favored contract For the remaining doctorslet any contract with h or h be unacceptable

With the preceding preferences the only sta-ble allocation includes contracts x and y leav-ing doctor zD unemployed If however zDmisrepresents her preferences and reports PzD

z z then the doctor-optimal stable matchincludes z leaving doctor zD better off

PROOF OF THEOREM 13Setting J 1 and T A it is clear by

inspection that this family includes all singletonvaluations

The family is closed under endowment be-cause given any such valuation v( J T)endowing a set of doctors T simply creates thevaluation v( J T T))

To verify that the family is closed underaggregation consider any two valuations v( J T) and v( J T) Since J and T are justindex sets we may assume without loss ofgenerality that T T J J A DefineT T T and J J J Let

(15) ij ij if i D T j Jij if i D T j J0 otherwise

By inspection of the optimization problems v( J T) v( J T) v( J T)

For the converse consider the valuation v( J T) given by (13) We derive it construc-tively from the singleton valuations aggrega-tion and endowment as follows Let vj be thesingleton valuation associated with row j inmatrix [ij] for j 1 J Since VEA isclosed under aggregation v1 vJ v( J A) VEA Since VEA is also closed underendowment we may endow the doctors in T toobtain v( J T) VEA

PROOF OF THEOREM 14L Shapley (1962) (see also Lehmann et al

2001) had already proved that every assignment

valuation without endowments v( J A) is asubstitutes valuation Ausubel and Milgrom(2002) prove that a valuation v is a substitutesvaluation if and only if the corresponding indi-rect profit function ((p) v(S) yendS pd) issubmodular Let be the indirect profit func-tion corresponding to v( J A) Then theindirect profit function corresponding to v( J T) is (p1 pN) (p1 pN 0 0)Since is the profit function of the substitutesvaluation vh it is submodular and hence issubmodular as well

PROOF OF THEOREM 15Suppose that contracts are substitutes for the

hospitals We proceed by induction The initialcondition specifies that the sequences are iden-tical through time t 0 Denote the sequencecorresponding to the cumulative offer processby a superscript C and denote the alternativeprocess defined by (9) with no superscript As-sume the inductive hypothesis that the se-quences are the same up to round t 1 andsuppress the corresponding superscripts for thevalues at that round Then XD(t) X RH(XH(t 1)) XD

C(t) This also implies that

(16) X XH t 1 XD t

To complete the proof we must show thatXH

C(t) XH(t) or equivalently that XH(t 1) CD(XD(t)) X RD(XD(t))

For t 2 XHC(t 2) XH

C(t 1) by con-struction so by the inductive hypothesis XH(t 2) XH(t 1) Since contracts are substitutesRH is isotone so X RH(XH(t 1)) X RH(XH(t 2)) and hence XD(t) XD(t 1)For t 1 the inclusion XD(t) XD(t 1) isimplied by the initial condition XD(0) X

Recall that by revealed preference RD isisotone It follows that RD(XD(t)) RD(XD(t 1)) and hence using (9) that XH(t 1) X RD(XD(t 1)) X RD(XD(t)) XH(t) ThusXH(t 1) XH(t 1) (X RD(XD(t))) XH(t 1) RD(XD(t)) So XH(t 1) CD(XD(t)) XH(t 1) (XD(t) RD(XD(t))) (XH(t 1) RD(XD(t))) (XD(t) RD(XD(t))) (XH(t 1) XD(t)) RD(XD(t)) X RD(XD(t)) where the last stepequality follows from (16)

933VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

PROOF OF THEOREM 16By construction any contract not in XH(t) is

less preferred by some doctor d than everycorresponding contract in XH(t) (because doctord offers her most preferred contracts in se-quence) So any collection of contracts thatincludes some not in XH(t) must be strictly lesspreferred by one of the doctors Any profitablecoalitional deviation must use only contracts inXH(t)

By construction the one hospitalauctioneermust be part of any deviating coalition andCH(XH(t)) is its strictly most preferred collectionof contracts in XH(t) so there is no profitablecoalitional deviation using just contracts in XH(t)

REFERENCES

Abdulkadiroglu Atila ldquoCollege Admissionswith Affirmative Actionrdquo Unpublished Pa-per 2003

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoBoston Public School MatchingrdquoAmerican Economic Review 2005a (Papersand Proceedings) 95(2) pp 368ndash71

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoThe New York City High SchoolMatchrdquo American Economic Review 2005b(Papers and Proceedings) 95(2) pp 364ndash67

Abdulkadiroglu Atila and Sonmez TayfunldquoSchool Choice A Mechanism Design Ap-proachrdquo American Economic Review 200393(3) pp 729ndash47

Adachi Hiroyuki ldquoOn a Characterization of Sta-ble Matchingsrdquo Economics Letters 200068(1) pp 43ndash49

Alkan Ahmet and Gale David ldquoStable ScheduleMatching under Revealed Preferencerdquo Jour-nal of Economic Theory 2003 112(2) pp289ndash306

Ausubel Lawrence M Cramton Peter and Mil-grom Paul R ldquoThe Clock-Poxy Auction APractical Combinatorial Auction Designrdquo inPeter Cramton Yoav Shoham and RichardSteinberg eds Combinatorial auctionsCambridge MA MIT Press 2005 ch 5

Ausubel Lawrence M and Milgrom Paul RldquoAscending Auctions with Package Bid-dingrdquo Frontiers of Theoretical Economics2002 1(1) Article 1

Blum Yosef Roth Alvin E and Rothblum UrielG ldquoVacancy Chains and Equilibration in Se-nior-Level Labor Marketsrdquo Journal of Eco-nomic Theory 1997 76(2) pp 362ndash411

Brewer Paul J and Plott Charles R ldquoA BinaryConflict Ascending Price (Bicap) Mechanismfor the Decentralized Allocation of the Rightto Use Railroad Tracksrdquo International Jour-nal of Industrial Organization 1996 14(6)pp 857ndash86

Bulow Jeremy and Levin Jonathan ldquoMatchingand Price Competitionrdquo Stanford UniversityStanford Economics Working Paper No1818 2003

Cramton Peter Shoham Yoav and SteinbergRichard Combinatorial auctions Cam-bridge MA MIT Press (forthcoming)

Crawford Vincent P and Knoer Elsie M ldquoJobMatching with Heterogeneous Firms andWorkersrdquo Econometrica 1981 49(2) pp437ndash50

Demange Gabrielle and Gale David ldquoThe Strat-egy Structure of Two-Sided Matching Mar-ketsrdquo Econometrica 1985 53(4) pp 873ndash88

Dubins Lester and Freedman David ldquoMachia-velli and the Gale-Shapley Algorithmrdquo Na-val Research Logistics Quarterly 198188(7) pp 485ndash94

Echenique Federico and Oviedo Jorge ldquoCoreMany-to-One Matchings by Fixed-PointMethodsrdquo Journal of Economic Theory2004 115(2) pp 358ndash76

Fleiner Tamas ldquoA Fixed-Point Approach toStable Matchings and Some ApplicationsrdquoMathematics of Operations Research 200328(1) pp 103ndash26

Gale David and Shapley Lloyd ldquoCollege Ad-missions and the Stability of MarriagerdquoAmerican Mathematical Monthly 196269(1) pp 9ndash15

Gul Faruk and Stacchetti Ennio ldquoWalrasianEquilibrium with Gross Substitutesrdquo Journalof Economic Theory 1999 87(1) pp 95ndash124

Kelso Alexander and Crawford Vincent P ldquoJobMatching Coalition Formation and GrossSubstitutesrdquo Econometrica 1982 50(6) pp1483ndash504

Lehmann Benny Lehmann Daniel and NisanNoam ldquoCombinatorial Auctions with De-

934 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

creasing Marginal Utilityrdquo Games and Eco-nomic Behavior 2005 (forthcoming)

Lien Yuan-Chuan and Yan Jun ldquoOn the GrossSubstitutes Conditionrdquo Unpublished Paper2003 httpwwwstamfordeduyclienTerm_Paper_Lien_Yanpdf

Martınez Ruth Masso Jordi Neme Alejandroand Oviedo Jorge ldquoSingle Agents and the Setof Many-to-One Stable Matchingsrdquo Journalof Economic Theory 2000 91(1) pp 91ndash105

Milgrom Paul R Putting auction theory towork Cambridge Cambridge UniversityPress 2004

Milgrom Paul R ldquoPutting Auction Theory toWork The Simultaneous Ascending Auc-tionrdquo Journal of Political Economy 2000108(2) pp 245ndash72

Porter David Rassenti Stephen RoopnarineAnil and Smith Vernon ldquoCombinatorial Auc-tion Designrdquo Proceedings of the NationalAcademy of Sciences 2003 100(19) pp11153ndash57

Reijnierse Hans van Gellekom Anita and PottersJos A M ldquoVerifying Gross SubstitutabilityrdquoEconomic Theory 2002 20(4) pp 767ndash76

Roth Alvin E ldquoThe Economics of Matching Sta-bility and Incentivesrdquo Mathematics of Opera-tions Research 1982 7(4) pp 617ndash28

Roth Alvin E ldquoStability and Polarization ofInterests in Job Matchingrdquo Econometrica1984 52(1) pp 47ndash57

Roth Alvin E ldquoThe College Admissions Prob-lem Is Not Equivalent to the Marriage Prob-lemrdquo Journal of Economic Theory 1985a36(2) pp 277ndash88

Roth Alvin E ldquoConflict and Coincidence ofInterest in Job Matching Some New Resultsand Open Questionsrdquo Mathematics of Oper-ations Research 1985b 10(3) pp 379ndash89

Roth Alvin E ldquoOn the Allocation of Residentsto Rural Hospitals A General Property ofTwo-Sided Matching Marketsrdquo Economet-rica 1986 54(2) pp 425ndash27

Roth Alvin E ldquoA Natural Experiment in theOrganization of Entry-Level Labor MarketsRegional Markets for New Physicians andSurgeons in the United Kingdomrdquo AmericanEconomic Review 1991 81(3) pp 415ndash40

Roth Alvin E and Peranson Elliott ldquoThe Rede-sign of the Matching Market for AmericanPhysicians Some Engineering Aspects ofEconomic Designrdquo American Economic Re-view 1999 89(4) pp 748ndash80

Roth Alvin E and Sotomayor Marilda Two-sided matching A study in game-theoreticmodeling and analysis Cambridge Cam-bridge University Press 1990

Sen Amartya Collective choice and social wel-fare San Francisco Holden-Day Inc 1970

Shapley Lloyd ldquoComplements and Substitutesin the Optimal Assignment Problemrdquo NavalResearch Logistics Quarterly 1962 9(1) pp45ndash48

935VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

Page 19: Matching with Contracts - Stanford Universityweb.stanford.edu/~milgrom/publishedarticles/Matching with... · 2005. 10. 22. · Gale-Shapley matching algorithm. Hence, the Gale-Shapley

CH(X) CD(X) so condition (i) of the defi-nition of stability is satisfied

Consider any hospital h and set of contractsX CD(X X) naming hospital h Since X CD(XD) revealed preference of the doctorsimplies that X XD CD(XD) and hence thatX RD(XD) X XD RD(XD) CD(XD) RD(XD) A Thus X X RD(XD) XHby (3) So if X Ch(X) then by the revealedpreference of hospital h X h Ch(XH) Ch(X) Hence X Ch(X X) so condition(ii) is satisfied So the set of contracts X isunblocked

For the converse suppose that X is a stablecollection of contracts Then CD(X) X LetXH be the set of contracts that the doctorsweakly prefer to X and XD the set of contractsthat doctors weakly disprefer By constructionX XH X XD X is a partition of X

To obtain (3) observe first that if there issome h such that Ch(XH) Xh then X Ch(XH) violates stability condition (ii) SoCh(XH) Xh for all h that is CH(XH) X Itfollows that X RH(XH) X (XH X) X (X XD) XD and that X RD(XD) X (XD CD(XD)) X (XD X) XH

Hence (XD XH) satisfies (3) and XH XD X

PROOF OF THEOREM 2Let i j ( j wj) C(w) and wi wi Define

Z(w) ( j wj)wj wj Then Z(wi wi) Z(w) If contracts are substitutes then R(Z(wiwi)) R(Z(w)) By (6) since ( j wj) C(w)it follows that ( j wj) C(Z(w)) so ( j wj) R(Z(w)) Hence ( j wj) R(Z(wi wi)) So ( jwj) Z(wi wi) R(Z(wi wi)) C(Z(wiwi)) and thus (j wj) C(wi wi) by assumption(6) Thus C satisfies demand theory substitutes

Conversely suppose contracts are not substi-tutes Then there exists a set X an element (iwi) X and ( j wj) R(X) such that ( j wj) R(X) where X X (i wi) Using (6)wi Wi(X) Let w W(X) and wi Wi(X)Then wi wi and ( j wj) C(w) but ( j wj) C(wi wi) so C does not satisfy the demandtheory substitutes condition

PROOF OF THEOREM 5We may limit attention to the case with

exactly two hospitals by specifying that

the doctors find the other hospitals to beunacceptable

Suppose Rh is not isotone Then there existssome x y X and X X such that for all x X xH h and such that x Rh(X) Rh(X y) By construction since x y Ch(X y) contracts x and y specify different doctorssay d1 xD yD d2 Let x and y denote thecorresponding contracts for doctors d1 and d2 inwhich hospital h is substituted for h

We specify preferences as follows first forhospital h we take x h y h A and allother contracts are unacceptable Second doc-tors in xD(CH(X) CH(X y)) d1 d2prefer their elements of CH(X) CH(X y)to any other contract Third d1 has x d1

x and ranks all other contracts lower Fourthd2 has y d2

y and ranks all other con-tracts lower Finally the remaining doctors findall contracts from hospitals h and h to beunacceptable

Consider a feasible acceptable allocation Xsuch that y X Since h and d2 can have onlyone contract in X x y X Then hrsquos con-tracts in X form a subset of X so x is notincluded and d1 has a contract less preferredthan x Then the deviation by (d1 h) to xblocks X

Consider a feasible acceptable allocation Xsuch that y X Then either x y X or Xis blocked by a coalition including h d1 and d2using the contracts x and y However if x y X then a deviation by (d2 h) to contract yblocks X

Since all feasible allocations are blockedthere exists no stable set of contracts

PROOF OF THEOREM 7Suppose X D H W and let Z(w) ( j

wj)wj wj Then the law of aggregate de-mand is the statement that for any wage vectorsw w satisfying w w such that the choices setsare singletons C(Z(w)) C(Z(w)) The proofis by contradiction Suppose the law of aggre-gate demand does not hold Then there exists awage vector w and a doctor d such that for some(and hence all) 0 C(Z(wd 13 wd)) C(Z(wd wd)) Since hrsquos preferences arequasi-linear changing doctor drsquos wage can af-fect the hiring of other doctors only if it affectsthe hiring of doctor d It follows that there are

931VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

exactly two optimal choices for the hospital atwage vector w these are C(Z(wd wd)) atwhich doctor d is hired and C(Z(wd 13 wd))at which d is not hired but such that two otherdoctors are hired that is there exist doctors dd C(Z(wd 13 wd)) C(Z(wd wd))Let the corresponding payoff for the hospital(when faced with wage vector w) be

Consider the wage vector w (wd wd 2 wdd) For positive and suffi-ciently small the hospitalrsquos payoff at wage vec-tor w is 13 2 if it chooses C(Z(wd 13 wd))and it is 13 if it chooses C(Z(wd wd))and one of these choices must be optimal SoC(w) C(Z(wd 13 wd)) But then raisingthe wage of doctor d from wd 2 to wd whileholding the other wages at wd reduces the de-mand for doctor d from one to zero in violationof the demand theory substitutes condition

PROOF OF THEOREM 8By definition XD X D so by revealed pref-

erence Cd(X D) Cd(XD) Also X H XH soby the law of aggregate demand Ch(X H) Ch(XH) By Theorem 1 CD(XD) CH(XH)and CD(X D) CH(X H) so yendD Cd(XD) yenhH Ch(XH) and yendD Cd(XD) yenhH Ch(XH)Combining these leads to yendD Cd(X D) yendD Cd(XD) yenhH Ch(XH) yenhH Ch(XH) yendD Cd(XD) which begins and ends with the samesum Hence none of the inequalities can bestrict

PROOF OF THEOREM 9Since Ch(X) Ch(X) there exists some

set Y X Y X and contract x such thatCh(Y) Ch(Y x) Since x Ch(Y x)(as otherwise Ch(Y) Ch(Y x) for thepreferences to be rationalizable) there must ex-ist two contracts y z Rh(Y x) Rh(Y)such that y x z y Moreover since y z Ch(Y) yD zD

Denoting by h the second hospital whose exis-tence is hypothesized by the theorem we specifypreferences as follows Let all the doctors with con-tracts in Y have those contracts be their most favoredand let all other doctors find any contract with hunacceptable Let all doctors find any contract notinvolving hospital h or h to be unacceptable

In principle there are three casesIf xD yD then let PxD

y x and PzD z

Then there exist two stable matches Ch(Y x) and Ch(Y) with zD employed in the firstmatch but not in the second

The case xD zD is symmetricFinally if yD xD zD then let x y z

denote contracts with hospital h where the doc-tors (and any other terms) are the same as in xy z respectively Specify the remaining prefer-ences by PxD

x x PyD y y PzD

z z and Ph y x A z Thenthere exist two different stable matches x Ch(Y) and y Ch(Y x) with zD em-ployed in the first match but not in the second

PROOF OF THEOREM 10Let X denote the collection of contracts cho-

sen by the algorithm when doctor d submitspreference Pd If this collection which is stableunder the reported preferences is not stableunder Pd then there exists a blocking coalitionThis blocking coalition must contain d as noother doctorrsquos preferences have changed butthat is impossible since x is drsquos favorite con-tract according to the preferences Pd Since X isstable under Pd the doctor-optimal stable matchunder Pd (the existence of which is guaranteedby Theorem 2) must make every doctor(weakly) better off than at X In particulardoctor d must obtain x

PROOF OF THEOREM 11From Theorem 10 Pd x also obtains x

Hence by the rural hospitals theorem d is em-ployed at every point in the core when Pd x issubmitted So every allocation X at which d isunemployed is blocked by some coalition andset of contracts when d submits Pd Conse-quently if d submits the preferences Pd y1 y2 yn x then every allocation at whichd is unemployed is still blocked by the samecoalition and set of contracts Since the doctor-best stable allocation is one at which d gets aPd-acceptable contract that allocation is weaklyPd-preferred to x Finally the doctor-optimalmatch when Pd is submitted is still the doctor-optimal match when Pd is submitted as drsquospreferences over contracts less preferred than xcannot be used to block a match where shereceives a contract weakly preferred to x

932 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

PROOF OF THEOREM 12Consider contracts x y and z such that

xD xD yD yD zD zD and xH yH zH h Let the preferences of the three identified bePxD

x x PyD y y and PzD

z z andlet those of h be Ph y z x Forthe other contracts x Y Ch(X) let x be xDrsquosmost favored contract For the remaining doctorslet any contract with h or h be unacceptable

With the preceding preferences the only sta-ble allocation includes contracts x and y leav-ing doctor zD unemployed If however zDmisrepresents her preferences and reports PzD

z z then the doctor-optimal stable matchincludes z leaving doctor zD better off

PROOF OF THEOREM 13Setting J 1 and T A it is clear by

inspection that this family includes all singletonvaluations

The family is closed under endowment be-cause given any such valuation v( J T)endowing a set of doctors T simply creates thevaluation v( J T T))

To verify that the family is closed underaggregation consider any two valuations v( J T) and v( J T) Since J and T are justindex sets we may assume without loss ofgenerality that T T J J A DefineT T T and J J J Let

(15) ij ij if i D T j Jij if i D T j J0 otherwise

By inspection of the optimization problems v( J T) v( J T) v( J T)

For the converse consider the valuation v( J T) given by (13) We derive it construc-tively from the singleton valuations aggrega-tion and endowment as follows Let vj be thesingleton valuation associated with row j inmatrix [ij] for j 1 J Since VEA isclosed under aggregation v1 vJ v( J A) VEA Since VEA is also closed underendowment we may endow the doctors in T toobtain v( J T) VEA

PROOF OF THEOREM 14L Shapley (1962) (see also Lehmann et al

2001) had already proved that every assignment

valuation without endowments v( J A) is asubstitutes valuation Ausubel and Milgrom(2002) prove that a valuation v is a substitutesvaluation if and only if the corresponding indi-rect profit function ((p) v(S) yendS pd) issubmodular Let be the indirect profit func-tion corresponding to v( J A) Then theindirect profit function corresponding to v( J T) is (p1 pN) (p1 pN 0 0)Since is the profit function of the substitutesvaluation vh it is submodular and hence issubmodular as well

PROOF OF THEOREM 15Suppose that contracts are substitutes for the

hospitals We proceed by induction The initialcondition specifies that the sequences are iden-tical through time t 0 Denote the sequencecorresponding to the cumulative offer processby a superscript C and denote the alternativeprocess defined by (9) with no superscript As-sume the inductive hypothesis that the se-quences are the same up to round t 1 andsuppress the corresponding superscripts for thevalues at that round Then XD(t) X RH(XH(t 1)) XD

C(t) This also implies that

(16) X XH t 1 XD t

To complete the proof we must show thatXH

C(t) XH(t) or equivalently that XH(t 1) CD(XD(t)) X RD(XD(t))

For t 2 XHC(t 2) XH

C(t 1) by con-struction so by the inductive hypothesis XH(t 2) XH(t 1) Since contracts are substitutesRH is isotone so X RH(XH(t 1)) X RH(XH(t 2)) and hence XD(t) XD(t 1)For t 1 the inclusion XD(t) XD(t 1) isimplied by the initial condition XD(0) X

Recall that by revealed preference RD isisotone It follows that RD(XD(t)) RD(XD(t 1)) and hence using (9) that XH(t 1) X RD(XD(t 1)) X RD(XD(t)) XH(t) ThusXH(t 1) XH(t 1) (X RD(XD(t))) XH(t 1) RD(XD(t)) So XH(t 1) CD(XD(t)) XH(t 1) (XD(t) RD(XD(t))) (XH(t 1) RD(XD(t))) (XD(t) RD(XD(t))) (XH(t 1) XD(t)) RD(XD(t)) X RD(XD(t)) where the last stepequality follows from (16)

933VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

PROOF OF THEOREM 16By construction any contract not in XH(t) is

less preferred by some doctor d than everycorresponding contract in XH(t) (because doctord offers her most preferred contracts in se-quence) So any collection of contracts thatincludes some not in XH(t) must be strictly lesspreferred by one of the doctors Any profitablecoalitional deviation must use only contracts inXH(t)

By construction the one hospitalauctioneermust be part of any deviating coalition andCH(XH(t)) is its strictly most preferred collectionof contracts in XH(t) so there is no profitablecoalitional deviation using just contracts in XH(t)

REFERENCES

Abdulkadiroglu Atila ldquoCollege Admissionswith Affirmative Actionrdquo Unpublished Pa-per 2003

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoBoston Public School MatchingrdquoAmerican Economic Review 2005a (Papersand Proceedings) 95(2) pp 368ndash71

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoThe New York City High SchoolMatchrdquo American Economic Review 2005b(Papers and Proceedings) 95(2) pp 364ndash67

Abdulkadiroglu Atila and Sonmez TayfunldquoSchool Choice A Mechanism Design Ap-proachrdquo American Economic Review 200393(3) pp 729ndash47

Adachi Hiroyuki ldquoOn a Characterization of Sta-ble Matchingsrdquo Economics Letters 200068(1) pp 43ndash49

Alkan Ahmet and Gale David ldquoStable ScheduleMatching under Revealed Preferencerdquo Jour-nal of Economic Theory 2003 112(2) pp289ndash306

Ausubel Lawrence M Cramton Peter and Mil-grom Paul R ldquoThe Clock-Poxy Auction APractical Combinatorial Auction Designrdquo inPeter Cramton Yoav Shoham and RichardSteinberg eds Combinatorial auctionsCambridge MA MIT Press 2005 ch 5

Ausubel Lawrence M and Milgrom Paul RldquoAscending Auctions with Package Bid-dingrdquo Frontiers of Theoretical Economics2002 1(1) Article 1

Blum Yosef Roth Alvin E and Rothblum UrielG ldquoVacancy Chains and Equilibration in Se-nior-Level Labor Marketsrdquo Journal of Eco-nomic Theory 1997 76(2) pp 362ndash411

Brewer Paul J and Plott Charles R ldquoA BinaryConflict Ascending Price (Bicap) Mechanismfor the Decentralized Allocation of the Rightto Use Railroad Tracksrdquo International Jour-nal of Industrial Organization 1996 14(6)pp 857ndash86

Bulow Jeremy and Levin Jonathan ldquoMatchingand Price Competitionrdquo Stanford UniversityStanford Economics Working Paper No1818 2003

Cramton Peter Shoham Yoav and SteinbergRichard Combinatorial auctions Cam-bridge MA MIT Press (forthcoming)

Crawford Vincent P and Knoer Elsie M ldquoJobMatching with Heterogeneous Firms andWorkersrdquo Econometrica 1981 49(2) pp437ndash50

Demange Gabrielle and Gale David ldquoThe Strat-egy Structure of Two-Sided Matching Mar-ketsrdquo Econometrica 1985 53(4) pp 873ndash88

Dubins Lester and Freedman David ldquoMachia-velli and the Gale-Shapley Algorithmrdquo Na-val Research Logistics Quarterly 198188(7) pp 485ndash94

Echenique Federico and Oviedo Jorge ldquoCoreMany-to-One Matchings by Fixed-PointMethodsrdquo Journal of Economic Theory2004 115(2) pp 358ndash76

Fleiner Tamas ldquoA Fixed-Point Approach toStable Matchings and Some ApplicationsrdquoMathematics of Operations Research 200328(1) pp 103ndash26

Gale David and Shapley Lloyd ldquoCollege Ad-missions and the Stability of MarriagerdquoAmerican Mathematical Monthly 196269(1) pp 9ndash15

Gul Faruk and Stacchetti Ennio ldquoWalrasianEquilibrium with Gross Substitutesrdquo Journalof Economic Theory 1999 87(1) pp 95ndash124

Kelso Alexander and Crawford Vincent P ldquoJobMatching Coalition Formation and GrossSubstitutesrdquo Econometrica 1982 50(6) pp1483ndash504

Lehmann Benny Lehmann Daniel and NisanNoam ldquoCombinatorial Auctions with De-

934 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

creasing Marginal Utilityrdquo Games and Eco-nomic Behavior 2005 (forthcoming)

Lien Yuan-Chuan and Yan Jun ldquoOn the GrossSubstitutes Conditionrdquo Unpublished Paper2003 httpwwwstamfordeduyclienTerm_Paper_Lien_Yanpdf

Martınez Ruth Masso Jordi Neme Alejandroand Oviedo Jorge ldquoSingle Agents and the Setof Many-to-One Stable Matchingsrdquo Journalof Economic Theory 2000 91(1) pp 91ndash105

Milgrom Paul R Putting auction theory towork Cambridge Cambridge UniversityPress 2004

Milgrom Paul R ldquoPutting Auction Theory toWork The Simultaneous Ascending Auc-tionrdquo Journal of Political Economy 2000108(2) pp 245ndash72

Porter David Rassenti Stephen RoopnarineAnil and Smith Vernon ldquoCombinatorial Auc-tion Designrdquo Proceedings of the NationalAcademy of Sciences 2003 100(19) pp11153ndash57

Reijnierse Hans van Gellekom Anita and PottersJos A M ldquoVerifying Gross SubstitutabilityrdquoEconomic Theory 2002 20(4) pp 767ndash76

Roth Alvin E ldquoThe Economics of Matching Sta-bility and Incentivesrdquo Mathematics of Opera-tions Research 1982 7(4) pp 617ndash28

Roth Alvin E ldquoStability and Polarization ofInterests in Job Matchingrdquo Econometrica1984 52(1) pp 47ndash57

Roth Alvin E ldquoThe College Admissions Prob-lem Is Not Equivalent to the Marriage Prob-lemrdquo Journal of Economic Theory 1985a36(2) pp 277ndash88

Roth Alvin E ldquoConflict and Coincidence ofInterest in Job Matching Some New Resultsand Open Questionsrdquo Mathematics of Oper-ations Research 1985b 10(3) pp 379ndash89

Roth Alvin E ldquoOn the Allocation of Residentsto Rural Hospitals A General Property ofTwo-Sided Matching Marketsrdquo Economet-rica 1986 54(2) pp 425ndash27

Roth Alvin E ldquoA Natural Experiment in theOrganization of Entry-Level Labor MarketsRegional Markets for New Physicians andSurgeons in the United Kingdomrdquo AmericanEconomic Review 1991 81(3) pp 415ndash40

Roth Alvin E and Peranson Elliott ldquoThe Rede-sign of the Matching Market for AmericanPhysicians Some Engineering Aspects ofEconomic Designrdquo American Economic Re-view 1999 89(4) pp 748ndash80

Roth Alvin E and Sotomayor Marilda Two-sided matching A study in game-theoreticmodeling and analysis Cambridge Cam-bridge University Press 1990

Sen Amartya Collective choice and social wel-fare San Francisco Holden-Day Inc 1970

Shapley Lloyd ldquoComplements and Substitutesin the Optimal Assignment Problemrdquo NavalResearch Logistics Quarterly 1962 9(1) pp45ndash48

935VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

Page 20: Matching with Contracts - Stanford Universityweb.stanford.edu/~milgrom/publishedarticles/Matching with... · 2005. 10. 22. · Gale-Shapley matching algorithm. Hence, the Gale-Shapley

exactly two optimal choices for the hospital atwage vector w these are C(Z(wd wd)) atwhich doctor d is hired and C(Z(wd 13 wd))at which d is not hired but such that two otherdoctors are hired that is there exist doctors dd C(Z(wd 13 wd)) C(Z(wd wd))Let the corresponding payoff for the hospital(when faced with wage vector w) be

Consider the wage vector w (wd wd 2 wdd) For positive and suffi-ciently small the hospitalrsquos payoff at wage vec-tor w is 13 2 if it chooses C(Z(wd 13 wd))and it is 13 if it chooses C(Z(wd wd))and one of these choices must be optimal SoC(w) C(Z(wd 13 wd)) But then raisingthe wage of doctor d from wd 2 to wd whileholding the other wages at wd reduces the de-mand for doctor d from one to zero in violationof the demand theory substitutes condition

PROOF OF THEOREM 8By definition XD X D so by revealed pref-

erence Cd(X D) Cd(XD) Also X H XH soby the law of aggregate demand Ch(X H) Ch(XH) By Theorem 1 CD(XD) CH(XH)and CD(X D) CH(X H) so yendD Cd(XD) yenhH Ch(XH) and yendD Cd(XD) yenhH Ch(XH)Combining these leads to yendD Cd(X D) yendD Cd(XD) yenhH Ch(XH) yenhH Ch(XH) yendD Cd(XD) which begins and ends with the samesum Hence none of the inequalities can bestrict

PROOF OF THEOREM 9Since Ch(X) Ch(X) there exists some

set Y X Y X and contract x such thatCh(Y) Ch(Y x) Since x Ch(Y x)(as otherwise Ch(Y) Ch(Y x) for thepreferences to be rationalizable) there must ex-ist two contracts y z Rh(Y x) Rh(Y)such that y x z y Moreover since y z Ch(Y) yD zD

Denoting by h the second hospital whose exis-tence is hypothesized by the theorem we specifypreferences as follows Let all the doctors with con-tracts in Y have those contracts be their most favoredand let all other doctors find any contract with hunacceptable Let all doctors find any contract notinvolving hospital h or h to be unacceptable

In principle there are three casesIf xD yD then let PxD

y x and PzD z

Then there exist two stable matches Ch(Y x) and Ch(Y) with zD employed in the firstmatch but not in the second

The case xD zD is symmetricFinally if yD xD zD then let x y z

denote contracts with hospital h where the doc-tors (and any other terms) are the same as in xy z respectively Specify the remaining prefer-ences by PxD

x x PyD y y PzD

z z and Ph y x A z Thenthere exist two different stable matches x Ch(Y) and y Ch(Y x) with zD em-ployed in the first match but not in the second

PROOF OF THEOREM 10Let X denote the collection of contracts cho-

sen by the algorithm when doctor d submitspreference Pd If this collection which is stableunder the reported preferences is not stableunder Pd then there exists a blocking coalitionThis blocking coalition must contain d as noother doctorrsquos preferences have changed butthat is impossible since x is drsquos favorite con-tract according to the preferences Pd Since X isstable under Pd the doctor-optimal stable matchunder Pd (the existence of which is guaranteedby Theorem 2) must make every doctor(weakly) better off than at X In particulardoctor d must obtain x

PROOF OF THEOREM 11From Theorem 10 Pd x also obtains x

Hence by the rural hospitals theorem d is em-ployed at every point in the core when Pd x issubmitted So every allocation X at which d isunemployed is blocked by some coalition andset of contracts when d submits Pd Conse-quently if d submits the preferences Pd y1 y2 yn x then every allocation at whichd is unemployed is still blocked by the samecoalition and set of contracts Since the doctor-best stable allocation is one at which d gets aPd-acceptable contract that allocation is weaklyPd-preferred to x Finally the doctor-optimalmatch when Pd is submitted is still the doctor-optimal match when Pd is submitted as drsquospreferences over contracts less preferred than xcannot be used to block a match where shereceives a contract weakly preferred to x

932 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

PROOF OF THEOREM 12Consider contracts x y and z such that

xD xD yD yD zD zD and xH yH zH h Let the preferences of the three identified bePxD

x x PyD y y and PzD

z z andlet those of h be Ph y z x Forthe other contracts x Y Ch(X) let x be xDrsquosmost favored contract For the remaining doctorslet any contract with h or h be unacceptable

With the preceding preferences the only sta-ble allocation includes contracts x and y leav-ing doctor zD unemployed If however zDmisrepresents her preferences and reports PzD

z z then the doctor-optimal stable matchincludes z leaving doctor zD better off

PROOF OF THEOREM 13Setting J 1 and T A it is clear by

inspection that this family includes all singletonvaluations

The family is closed under endowment be-cause given any such valuation v( J T)endowing a set of doctors T simply creates thevaluation v( J T T))

To verify that the family is closed underaggregation consider any two valuations v( J T) and v( J T) Since J and T are justindex sets we may assume without loss ofgenerality that T T J J A DefineT T T and J J J Let

(15) ij ij if i D T j Jij if i D T j J0 otherwise

By inspection of the optimization problems v( J T) v( J T) v( J T)

For the converse consider the valuation v( J T) given by (13) We derive it construc-tively from the singleton valuations aggrega-tion and endowment as follows Let vj be thesingleton valuation associated with row j inmatrix [ij] for j 1 J Since VEA isclosed under aggregation v1 vJ v( J A) VEA Since VEA is also closed underendowment we may endow the doctors in T toobtain v( J T) VEA

PROOF OF THEOREM 14L Shapley (1962) (see also Lehmann et al

2001) had already proved that every assignment

valuation without endowments v( J A) is asubstitutes valuation Ausubel and Milgrom(2002) prove that a valuation v is a substitutesvaluation if and only if the corresponding indi-rect profit function ((p) v(S) yendS pd) issubmodular Let be the indirect profit func-tion corresponding to v( J A) Then theindirect profit function corresponding to v( J T) is (p1 pN) (p1 pN 0 0)Since is the profit function of the substitutesvaluation vh it is submodular and hence issubmodular as well

PROOF OF THEOREM 15Suppose that contracts are substitutes for the

hospitals We proceed by induction The initialcondition specifies that the sequences are iden-tical through time t 0 Denote the sequencecorresponding to the cumulative offer processby a superscript C and denote the alternativeprocess defined by (9) with no superscript As-sume the inductive hypothesis that the se-quences are the same up to round t 1 andsuppress the corresponding superscripts for thevalues at that round Then XD(t) X RH(XH(t 1)) XD

C(t) This also implies that

(16) X XH t 1 XD t

To complete the proof we must show thatXH

C(t) XH(t) or equivalently that XH(t 1) CD(XD(t)) X RD(XD(t))

For t 2 XHC(t 2) XH

C(t 1) by con-struction so by the inductive hypothesis XH(t 2) XH(t 1) Since contracts are substitutesRH is isotone so X RH(XH(t 1)) X RH(XH(t 2)) and hence XD(t) XD(t 1)For t 1 the inclusion XD(t) XD(t 1) isimplied by the initial condition XD(0) X

Recall that by revealed preference RD isisotone It follows that RD(XD(t)) RD(XD(t 1)) and hence using (9) that XH(t 1) X RD(XD(t 1)) X RD(XD(t)) XH(t) ThusXH(t 1) XH(t 1) (X RD(XD(t))) XH(t 1) RD(XD(t)) So XH(t 1) CD(XD(t)) XH(t 1) (XD(t) RD(XD(t))) (XH(t 1) RD(XD(t))) (XD(t) RD(XD(t))) (XH(t 1) XD(t)) RD(XD(t)) X RD(XD(t)) where the last stepequality follows from (16)

933VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

PROOF OF THEOREM 16By construction any contract not in XH(t) is

less preferred by some doctor d than everycorresponding contract in XH(t) (because doctord offers her most preferred contracts in se-quence) So any collection of contracts thatincludes some not in XH(t) must be strictly lesspreferred by one of the doctors Any profitablecoalitional deviation must use only contracts inXH(t)

By construction the one hospitalauctioneermust be part of any deviating coalition andCH(XH(t)) is its strictly most preferred collectionof contracts in XH(t) so there is no profitablecoalitional deviation using just contracts in XH(t)

REFERENCES

Abdulkadiroglu Atila ldquoCollege Admissionswith Affirmative Actionrdquo Unpublished Pa-per 2003

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoBoston Public School MatchingrdquoAmerican Economic Review 2005a (Papersand Proceedings) 95(2) pp 368ndash71

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoThe New York City High SchoolMatchrdquo American Economic Review 2005b(Papers and Proceedings) 95(2) pp 364ndash67

Abdulkadiroglu Atila and Sonmez TayfunldquoSchool Choice A Mechanism Design Ap-proachrdquo American Economic Review 200393(3) pp 729ndash47

Adachi Hiroyuki ldquoOn a Characterization of Sta-ble Matchingsrdquo Economics Letters 200068(1) pp 43ndash49

Alkan Ahmet and Gale David ldquoStable ScheduleMatching under Revealed Preferencerdquo Jour-nal of Economic Theory 2003 112(2) pp289ndash306

Ausubel Lawrence M Cramton Peter and Mil-grom Paul R ldquoThe Clock-Poxy Auction APractical Combinatorial Auction Designrdquo inPeter Cramton Yoav Shoham and RichardSteinberg eds Combinatorial auctionsCambridge MA MIT Press 2005 ch 5

Ausubel Lawrence M and Milgrom Paul RldquoAscending Auctions with Package Bid-dingrdquo Frontiers of Theoretical Economics2002 1(1) Article 1

Blum Yosef Roth Alvin E and Rothblum UrielG ldquoVacancy Chains and Equilibration in Se-nior-Level Labor Marketsrdquo Journal of Eco-nomic Theory 1997 76(2) pp 362ndash411

Brewer Paul J and Plott Charles R ldquoA BinaryConflict Ascending Price (Bicap) Mechanismfor the Decentralized Allocation of the Rightto Use Railroad Tracksrdquo International Jour-nal of Industrial Organization 1996 14(6)pp 857ndash86

Bulow Jeremy and Levin Jonathan ldquoMatchingand Price Competitionrdquo Stanford UniversityStanford Economics Working Paper No1818 2003

Cramton Peter Shoham Yoav and SteinbergRichard Combinatorial auctions Cam-bridge MA MIT Press (forthcoming)

Crawford Vincent P and Knoer Elsie M ldquoJobMatching with Heterogeneous Firms andWorkersrdquo Econometrica 1981 49(2) pp437ndash50

Demange Gabrielle and Gale David ldquoThe Strat-egy Structure of Two-Sided Matching Mar-ketsrdquo Econometrica 1985 53(4) pp 873ndash88

Dubins Lester and Freedman David ldquoMachia-velli and the Gale-Shapley Algorithmrdquo Na-val Research Logistics Quarterly 198188(7) pp 485ndash94

Echenique Federico and Oviedo Jorge ldquoCoreMany-to-One Matchings by Fixed-PointMethodsrdquo Journal of Economic Theory2004 115(2) pp 358ndash76

Fleiner Tamas ldquoA Fixed-Point Approach toStable Matchings and Some ApplicationsrdquoMathematics of Operations Research 200328(1) pp 103ndash26

Gale David and Shapley Lloyd ldquoCollege Ad-missions and the Stability of MarriagerdquoAmerican Mathematical Monthly 196269(1) pp 9ndash15

Gul Faruk and Stacchetti Ennio ldquoWalrasianEquilibrium with Gross Substitutesrdquo Journalof Economic Theory 1999 87(1) pp 95ndash124

Kelso Alexander and Crawford Vincent P ldquoJobMatching Coalition Formation and GrossSubstitutesrdquo Econometrica 1982 50(6) pp1483ndash504

Lehmann Benny Lehmann Daniel and NisanNoam ldquoCombinatorial Auctions with De-

934 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

creasing Marginal Utilityrdquo Games and Eco-nomic Behavior 2005 (forthcoming)

Lien Yuan-Chuan and Yan Jun ldquoOn the GrossSubstitutes Conditionrdquo Unpublished Paper2003 httpwwwstamfordeduyclienTerm_Paper_Lien_Yanpdf

Martınez Ruth Masso Jordi Neme Alejandroand Oviedo Jorge ldquoSingle Agents and the Setof Many-to-One Stable Matchingsrdquo Journalof Economic Theory 2000 91(1) pp 91ndash105

Milgrom Paul R Putting auction theory towork Cambridge Cambridge UniversityPress 2004

Milgrom Paul R ldquoPutting Auction Theory toWork The Simultaneous Ascending Auc-tionrdquo Journal of Political Economy 2000108(2) pp 245ndash72

Porter David Rassenti Stephen RoopnarineAnil and Smith Vernon ldquoCombinatorial Auc-tion Designrdquo Proceedings of the NationalAcademy of Sciences 2003 100(19) pp11153ndash57

Reijnierse Hans van Gellekom Anita and PottersJos A M ldquoVerifying Gross SubstitutabilityrdquoEconomic Theory 2002 20(4) pp 767ndash76

Roth Alvin E ldquoThe Economics of Matching Sta-bility and Incentivesrdquo Mathematics of Opera-tions Research 1982 7(4) pp 617ndash28

Roth Alvin E ldquoStability and Polarization ofInterests in Job Matchingrdquo Econometrica1984 52(1) pp 47ndash57

Roth Alvin E ldquoThe College Admissions Prob-lem Is Not Equivalent to the Marriage Prob-lemrdquo Journal of Economic Theory 1985a36(2) pp 277ndash88

Roth Alvin E ldquoConflict and Coincidence ofInterest in Job Matching Some New Resultsand Open Questionsrdquo Mathematics of Oper-ations Research 1985b 10(3) pp 379ndash89

Roth Alvin E ldquoOn the Allocation of Residentsto Rural Hospitals A General Property ofTwo-Sided Matching Marketsrdquo Economet-rica 1986 54(2) pp 425ndash27

Roth Alvin E ldquoA Natural Experiment in theOrganization of Entry-Level Labor MarketsRegional Markets for New Physicians andSurgeons in the United Kingdomrdquo AmericanEconomic Review 1991 81(3) pp 415ndash40

Roth Alvin E and Peranson Elliott ldquoThe Rede-sign of the Matching Market for AmericanPhysicians Some Engineering Aspects ofEconomic Designrdquo American Economic Re-view 1999 89(4) pp 748ndash80

Roth Alvin E and Sotomayor Marilda Two-sided matching A study in game-theoreticmodeling and analysis Cambridge Cam-bridge University Press 1990

Sen Amartya Collective choice and social wel-fare San Francisco Holden-Day Inc 1970

Shapley Lloyd ldquoComplements and Substitutesin the Optimal Assignment Problemrdquo NavalResearch Logistics Quarterly 1962 9(1) pp45ndash48

935VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

Page 21: Matching with Contracts - Stanford Universityweb.stanford.edu/~milgrom/publishedarticles/Matching with... · 2005. 10. 22. · Gale-Shapley matching algorithm. Hence, the Gale-Shapley

PROOF OF THEOREM 12Consider contracts x y and z such that

xD xD yD yD zD zD and xH yH zH h Let the preferences of the three identified bePxD

x x PyD y y and PzD

z z andlet those of h be Ph y z x Forthe other contracts x Y Ch(X) let x be xDrsquosmost favored contract For the remaining doctorslet any contract with h or h be unacceptable

With the preceding preferences the only sta-ble allocation includes contracts x and y leav-ing doctor zD unemployed If however zDmisrepresents her preferences and reports PzD

z z then the doctor-optimal stable matchincludes z leaving doctor zD better off

PROOF OF THEOREM 13Setting J 1 and T A it is clear by

inspection that this family includes all singletonvaluations

The family is closed under endowment be-cause given any such valuation v( J T)endowing a set of doctors T simply creates thevaluation v( J T T))

To verify that the family is closed underaggregation consider any two valuations v( J T) and v( J T) Since J and T are justindex sets we may assume without loss ofgenerality that T T J J A DefineT T T and J J J Let

(15) ij ij if i D T j Jij if i D T j J0 otherwise

By inspection of the optimization problems v( J T) v( J T) v( J T)

For the converse consider the valuation v( J T) given by (13) We derive it construc-tively from the singleton valuations aggrega-tion and endowment as follows Let vj be thesingleton valuation associated with row j inmatrix [ij] for j 1 J Since VEA isclosed under aggregation v1 vJ v( J A) VEA Since VEA is also closed underendowment we may endow the doctors in T toobtain v( J T) VEA

PROOF OF THEOREM 14L Shapley (1962) (see also Lehmann et al

2001) had already proved that every assignment

valuation without endowments v( J A) is asubstitutes valuation Ausubel and Milgrom(2002) prove that a valuation v is a substitutesvaluation if and only if the corresponding indi-rect profit function ((p) v(S) yendS pd) issubmodular Let be the indirect profit func-tion corresponding to v( J A) Then theindirect profit function corresponding to v( J T) is (p1 pN) (p1 pN 0 0)Since is the profit function of the substitutesvaluation vh it is submodular and hence issubmodular as well

PROOF OF THEOREM 15Suppose that contracts are substitutes for the

hospitals We proceed by induction The initialcondition specifies that the sequences are iden-tical through time t 0 Denote the sequencecorresponding to the cumulative offer processby a superscript C and denote the alternativeprocess defined by (9) with no superscript As-sume the inductive hypothesis that the se-quences are the same up to round t 1 andsuppress the corresponding superscripts for thevalues at that round Then XD(t) X RH(XH(t 1)) XD

C(t) This also implies that

(16) X XH t 1 XD t

To complete the proof we must show thatXH

C(t) XH(t) or equivalently that XH(t 1) CD(XD(t)) X RD(XD(t))

For t 2 XHC(t 2) XH

C(t 1) by con-struction so by the inductive hypothesis XH(t 2) XH(t 1) Since contracts are substitutesRH is isotone so X RH(XH(t 1)) X RH(XH(t 2)) and hence XD(t) XD(t 1)For t 1 the inclusion XD(t) XD(t 1) isimplied by the initial condition XD(0) X

Recall that by revealed preference RD isisotone It follows that RD(XD(t)) RD(XD(t 1)) and hence using (9) that XH(t 1) X RD(XD(t 1)) X RD(XD(t)) XH(t) ThusXH(t 1) XH(t 1) (X RD(XD(t))) XH(t 1) RD(XD(t)) So XH(t 1) CD(XD(t)) XH(t 1) (XD(t) RD(XD(t))) (XH(t 1) RD(XD(t))) (XD(t) RD(XD(t))) (XH(t 1) XD(t)) RD(XD(t)) X RD(XD(t)) where the last stepequality follows from (16)

933VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

PROOF OF THEOREM 16By construction any contract not in XH(t) is

less preferred by some doctor d than everycorresponding contract in XH(t) (because doctord offers her most preferred contracts in se-quence) So any collection of contracts thatincludes some not in XH(t) must be strictly lesspreferred by one of the doctors Any profitablecoalitional deviation must use only contracts inXH(t)

By construction the one hospitalauctioneermust be part of any deviating coalition andCH(XH(t)) is its strictly most preferred collectionof contracts in XH(t) so there is no profitablecoalitional deviation using just contracts in XH(t)

REFERENCES

Abdulkadiroglu Atila ldquoCollege Admissionswith Affirmative Actionrdquo Unpublished Pa-per 2003

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoBoston Public School MatchingrdquoAmerican Economic Review 2005a (Papersand Proceedings) 95(2) pp 368ndash71

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoThe New York City High SchoolMatchrdquo American Economic Review 2005b(Papers and Proceedings) 95(2) pp 364ndash67

Abdulkadiroglu Atila and Sonmez TayfunldquoSchool Choice A Mechanism Design Ap-proachrdquo American Economic Review 200393(3) pp 729ndash47

Adachi Hiroyuki ldquoOn a Characterization of Sta-ble Matchingsrdquo Economics Letters 200068(1) pp 43ndash49

Alkan Ahmet and Gale David ldquoStable ScheduleMatching under Revealed Preferencerdquo Jour-nal of Economic Theory 2003 112(2) pp289ndash306

Ausubel Lawrence M Cramton Peter and Mil-grom Paul R ldquoThe Clock-Poxy Auction APractical Combinatorial Auction Designrdquo inPeter Cramton Yoav Shoham and RichardSteinberg eds Combinatorial auctionsCambridge MA MIT Press 2005 ch 5

Ausubel Lawrence M and Milgrom Paul RldquoAscending Auctions with Package Bid-dingrdquo Frontiers of Theoretical Economics2002 1(1) Article 1

Blum Yosef Roth Alvin E and Rothblum UrielG ldquoVacancy Chains and Equilibration in Se-nior-Level Labor Marketsrdquo Journal of Eco-nomic Theory 1997 76(2) pp 362ndash411

Brewer Paul J and Plott Charles R ldquoA BinaryConflict Ascending Price (Bicap) Mechanismfor the Decentralized Allocation of the Rightto Use Railroad Tracksrdquo International Jour-nal of Industrial Organization 1996 14(6)pp 857ndash86

Bulow Jeremy and Levin Jonathan ldquoMatchingand Price Competitionrdquo Stanford UniversityStanford Economics Working Paper No1818 2003

Cramton Peter Shoham Yoav and SteinbergRichard Combinatorial auctions Cam-bridge MA MIT Press (forthcoming)

Crawford Vincent P and Knoer Elsie M ldquoJobMatching with Heterogeneous Firms andWorkersrdquo Econometrica 1981 49(2) pp437ndash50

Demange Gabrielle and Gale David ldquoThe Strat-egy Structure of Two-Sided Matching Mar-ketsrdquo Econometrica 1985 53(4) pp 873ndash88

Dubins Lester and Freedman David ldquoMachia-velli and the Gale-Shapley Algorithmrdquo Na-val Research Logistics Quarterly 198188(7) pp 485ndash94

Echenique Federico and Oviedo Jorge ldquoCoreMany-to-One Matchings by Fixed-PointMethodsrdquo Journal of Economic Theory2004 115(2) pp 358ndash76

Fleiner Tamas ldquoA Fixed-Point Approach toStable Matchings and Some ApplicationsrdquoMathematics of Operations Research 200328(1) pp 103ndash26

Gale David and Shapley Lloyd ldquoCollege Ad-missions and the Stability of MarriagerdquoAmerican Mathematical Monthly 196269(1) pp 9ndash15

Gul Faruk and Stacchetti Ennio ldquoWalrasianEquilibrium with Gross Substitutesrdquo Journalof Economic Theory 1999 87(1) pp 95ndash124

Kelso Alexander and Crawford Vincent P ldquoJobMatching Coalition Formation and GrossSubstitutesrdquo Econometrica 1982 50(6) pp1483ndash504

Lehmann Benny Lehmann Daniel and NisanNoam ldquoCombinatorial Auctions with De-

934 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

creasing Marginal Utilityrdquo Games and Eco-nomic Behavior 2005 (forthcoming)

Lien Yuan-Chuan and Yan Jun ldquoOn the GrossSubstitutes Conditionrdquo Unpublished Paper2003 httpwwwstamfordeduyclienTerm_Paper_Lien_Yanpdf

Martınez Ruth Masso Jordi Neme Alejandroand Oviedo Jorge ldquoSingle Agents and the Setof Many-to-One Stable Matchingsrdquo Journalof Economic Theory 2000 91(1) pp 91ndash105

Milgrom Paul R Putting auction theory towork Cambridge Cambridge UniversityPress 2004

Milgrom Paul R ldquoPutting Auction Theory toWork The Simultaneous Ascending Auc-tionrdquo Journal of Political Economy 2000108(2) pp 245ndash72

Porter David Rassenti Stephen RoopnarineAnil and Smith Vernon ldquoCombinatorial Auc-tion Designrdquo Proceedings of the NationalAcademy of Sciences 2003 100(19) pp11153ndash57

Reijnierse Hans van Gellekom Anita and PottersJos A M ldquoVerifying Gross SubstitutabilityrdquoEconomic Theory 2002 20(4) pp 767ndash76

Roth Alvin E ldquoThe Economics of Matching Sta-bility and Incentivesrdquo Mathematics of Opera-tions Research 1982 7(4) pp 617ndash28

Roth Alvin E ldquoStability and Polarization ofInterests in Job Matchingrdquo Econometrica1984 52(1) pp 47ndash57

Roth Alvin E ldquoThe College Admissions Prob-lem Is Not Equivalent to the Marriage Prob-lemrdquo Journal of Economic Theory 1985a36(2) pp 277ndash88

Roth Alvin E ldquoConflict and Coincidence ofInterest in Job Matching Some New Resultsand Open Questionsrdquo Mathematics of Oper-ations Research 1985b 10(3) pp 379ndash89

Roth Alvin E ldquoOn the Allocation of Residentsto Rural Hospitals A General Property ofTwo-Sided Matching Marketsrdquo Economet-rica 1986 54(2) pp 425ndash27

Roth Alvin E ldquoA Natural Experiment in theOrganization of Entry-Level Labor MarketsRegional Markets for New Physicians andSurgeons in the United Kingdomrdquo AmericanEconomic Review 1991 81(3) pp 415ndash40

Roth Alvin E and Peranson Elliott ldquoThe Rede-sign of the Matching Market for AmericanPhysicians Some Engineering Aspects ofEconomic Designrdquo American Economic Re-view 1999 89(4) pp 748ndash80

Roth Alvin E and Sotomayor Marilda Two-sided matching A study in game-theoreticmodeling and analysis Cambridge Cam-bridge University Press 1990

Sen Amartya Collective choice and social wel-fare San Francisco Holden-Day Inc 1970

Shapley Lloyd ldquoComplements and Substitutesin the Optimal Assignment Problemrdquo NavalResearch Logistics Quarterly 1962 9(1) pp45ndash48

935VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

Page 22: Matching with Contracts - Stanford Universityweb.stanford.edu/~milgrom/publishedarticles/Matching with... · 2005. 10. 22. · Gale-Shapley matching algorithm. Hence, the Gale-Shapley

PROOF OF THEOREM 16By construction any contract not in XH(t) is

less preferred by some doctor d than everycorresponding contract in XH(t) (because doctord offers her most preferred contracts in se-quence) So any collection of contracts thatincludes some not in XH(t) must be strictly lesspreferred by one of the doctors Any profitablecoalitional deviation must use only contracts inXH(t)

By construction the one hospitalauctioneermust be part of any deviating coalition andCH(XH(t)) is its strictly most preferred collectionof contracts in XH(t) so there is no profitablecoalitional deviation using just contracts in XH(t)

REFERENCES

Abdulkadiroglu Atila ldquoCollege Admissionswith Affirmative Actionrdquo Unpublished Pa-per 2003

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoBoston Public School MatchingrdquoAmerican Economic Review 2005a (Papersand Proceedings) 95(2) pp 368ndash71

Abdulkadiroglu Atila Pathak Parag and RothAlvin E ldquoThe New York City High SchoolMatchrdquo American Economic Review 2005b(Papers and Proceedings) 95(2) pp 364ndash67

Abdulkadiroglu Atila and Sonmez TayfunldquoSchool Choice A Mechanism Design Ap-proachrdquo American Economic Review 200393(3) pp 729ndash47

Adachi Hiroyuki ldquoOn a Characterization of Sta-ble Matchingsrdquo Economics Letters 200068(1) pp 43ndash49

Alkan Ahmet and Gale David ldquoStable ScheduleMatching under Revealed Preferencerdquo Jour-nal of Economic Theory 2003 112(2) pp289ndash306

Ausubel Lawrence M Cramton Peter and Mil-grom Paul R ldquoThe Clock-Poxy Auction APractical Combinatorial Auction Designrdquo inPeter Cramton Yoav Shoham and RichardSteinberg eds Combinatorial auctionsCambridge MA MIT Press 2005 ch 5

Ausubel Lawrence M and Milgrom Paul RldquoAscending Auctions with Package Bid-dingrdquo Frontiers of Theoretical Economics2002 1(1) Article 1

Blum Yosef Roth Alvin E and Rothblum UrielG ldquoVacancy Chains and Equilibration in Se-nior-Level Labor Marketsrdquo Journal of Eco-nomic Theory 1997 76(2) pp 362ndash411

Brewer Paul J and Plott Charles R ldquoA BinaryConflict Ascending Price (Bicap) Mechanismfor the Decentralized Allocation of the Rightto Use Railroad Tracksrdquo International Jour-nal of Industrial Organization 1996 14(6)pp 857ndash86

Bulow Jeremy and Levin Jonathan ldquoMatchingand Price Competitionrdquo Stanford UniversityStanford Economics Working Paper No1818 2003

Cramton Peter Shoham Yoav and SteinbergRichard Combinatorial auctions Cam-bridge MA MIT Press (forthcoming)

Crawford Vincent P and Knoer Elsie M ldquoJobMatching with Heterogeneous Firms andWorkersrdquo Econometrica 1981 49(2) pp437ndash50

Demange Gabrielle and Gale David ldquoThe Strat-egy Structure of Two-Sided Matching Mar-ketsrdquo Econometrica 1985 53(4) pp 873ndash88

Dubins Lester and Freedman David ldquoMachia-velli and the Gale-Shapley Algorithmrdquo Na-val Research Logistics Quarterly 198188(7) pp 485ndash94

Echenique Federico and Oviedo Jorge ldquoCoreMany-to-One Matchings by Fixed-PointMethodsrdquo Journal of Economic Theory2004 115(2) pp 358ndash76

Fleiner Tamas ldquoA Fixed-Point Approach toStable Matchings and Some ApplicationsrdquoMathematics of Operations Research 200328(1) pp 103ndash26

Gale David and Shapley Lloyd ldquoCollege Ad-missions and the Stability of MarriagerdquoAmerican Mathematical Monthly 196269(1) pp 9ndash15

Gul Faruk and Stacchetti Ennio ldquoWalrasianEquilibrium with Gross Substitutesrdquo Journalof Economic Theory 1999 87(1) pp 95ndash124

Kelso Alexander and Crawford Vincent P ldquoJobMatching Coalition Formation and GrossSubstitutesrdquo Econometrica 1982 50(6) pp1483ndash504

Lehmann Benny Lehmann Daniel and NisanNoam ldquoCombinatorial Auctions with De-

934 THE AMERICAN ECONOMIC REVIEW SEPTEMBER 2005

creasing Marginal Utilityrdquo Games and Eco-nomic Behavior 2005 (forthcoming)

Lien Yuan-Chuan and Yan Jun ldquoOn the GrossSubstitutes Conditionrdquo Unpublished Paper2003 httpwwwstamfordeduyclienTerm_Paper_Lien_Yanpdf

Martınez Ruth Masso Jordi Neme Alejandroand Oviedo Jorge ldquoSingle Agents and the Setof Many-to-One Stable Matchingsrdquo Journalof Economic Theory 2000 91(1) pp 91ndash105

Milgrom Paul R Putting auction theory towork Cambridge Cambridge UniversityPress 2004

Milgrom Paul R ldquoPutting Auction Theory toWork The Simultaneous Ascending Auc-tionrdquo Journal of Political Economy 2000108(2) pp 245ndash72

Porter David Rassenti Stephen RoopnarineAnil and Smith Vernon ldquoCombinatorial Auc-tion Designrdquo Proceedings of the NationalAcademy of Sciences 2003 100(19) pp11153ndash57

Reijnierse Hans van Gellekom Anita and PottersJos A M ldquoVerifying Gross SubstitutabilityrdquoEconomic Theory 2002 20(4) pp 767ndash76

Roth Alvin E ldquoThe Economics of Matching Sta-bility and Incentivesrdquo Mathematics of Opera-tions Research 1982 7(4) pp 617ndash28

Roth Alvin E ldquoStability and Polarization ofInterests in Job Matchingrdquo Econometrica1984 52(1) pp 47ndash57

Roth Alvin E ldquoThe College Admissions Prob-lem Is Not Equivalent to the Marriage Prob-lemrdquo Journal of Economic Theory 1985a36(2) pp 277ndash88

Roth Alvin E ldquoConflict and Coincidence ofInterest in Job Matching Some New Resultsand Open Questionsrdquo Mathematics of Oper-ations Research 1985b 10(3) pp 379ndash89

Roth Alvin E ldquoOn the Allocation of Residentsto Rural Hospitals A General Property ofTwo-Sided Matching Marketsrdquo Economet-rica 1986 54(2) pp 425ndash27

Roth Alvin E ldquoA Natural Experiment in theOrganization of Entry-Level Labor MarketsRegional Markets for New Physicians andSurgeons in the United Kingdomrdquo AmericanEconomic Review 1991 81(3) pp 415ndash40

Roth Alvin E and Peranson Elliott ldquoThe Rede-sign of the Matching Market for AmericanPhysicians Some Engineering Aspects ofEconomic Designrdquo American Economic Re-view 1999 89(4) pp 748ndash80

Roth Alvin E and Sotomayor Marilda Two-sided matching A study in game-theoreticmodeling and analysis Cambridge Cam-bridge University Press 1990

Sen Amartya Collective choice and social wel-fare San Francisco Holden-Day Inc 1970

Shapley Lloyd ldquoComplements and Substitutesin the Optimal Assignment Problemrdquo NavalResearch Logistics Quarterly 1962 9(1) pp45ndash48

935VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS

Page 23: Matching with Contracts - Stanford Universityweb.stanford.edu/~milgrom/publishedarticles/Matching with... · 2005. 10. 22. · Gale-Shapley matching algorithm. Hence, the Gale-Shapley

creasing Marginal Utilityrdquo Games and Eco-nomic Behavior 2005 (forthcoming)

Lien Yuan-Chuan and Yan Jun ldquoOn the GrossSubstitutes Conditionrdquo Unpublished Paper2003 httpwwwstamfordeduyclienTerm_Paper_Lien_Yanpdf

Martınez Ruth Masso Jordi Neme Alejandroand Oviedo Jorge ldquoSingle Agents and the Setof Many-to-One Stable Matchingsrdquo Journalof Economic Theory 2000 91(1) pp 91ndash105

Milgrom Paul R Putting auction theory towork Cambridge Cambridge UniversityPress 2004

Milgrom Paul R ldquoPutting Auction Theory toWork The Simultaneous Ascending Auc-tionrdquo Journal of Political Economy 2000108(2) pp 245ndash72

Porter David Rassenti Stephen RoopnarineAnil and Smith Vernon ldquoCombinatorial Auc-tion Designrdquo Proceedings of the NationalAcademy of Sciences 2003 100(19) pp11153ndash57

Reijnierse Hans van Gellekom Anita and PottersJos A M ldquoVerifying Gross SubstitutabilityrdquoEconomic Theory 2002 20(4) pp 767ndash76

Roth Alvin E ldquoThe Economics of Matching Sta-bility and Incentivesrdquo Mathematics of Opera-tions Research 1982 7(4) pp 617ndash28

Roth Alvin E ldquoStability and Polarization ofInterests in Job Matchingrdquo Econometrica1984 52(1) pp 47ndash57

Roth Alvin E ldquoThe College Admissions Prob-lem Is Not Equivalent to the Marriage Prob-lemrdquo Journal of Economic Theory 1985a36(2) pp 277ndash88

Roth Alvin E ldquoConflict and Coincidence ofInterest in Job Matching Some New Resultsand Open Questionsrdquo Mathematics of Oper-ations Research 1985b 10(3) pp 379ndash89

Roth Alvin E ldquoOn the Allocation of Residentsto Rural Hospitals A General Property ofTwo-Sided Matching Marketsrdquo Economet-rica 1986 54(2) pp 425ndash27

Roth Alvin E ldquoA Natural Experiment in theOrganization of Entry-Level Labor MarketsRegional Markets for New Physicians andSurgeons in the United Kingdomrdquo AmericanEconomic Review 1991 81(3) pp 415ndash40

Roth Alvin E and Peranson Elliott ldquoThe Rede-sign of the Matching Market for AmericanPhysicians Some Engineering Aspects ofEconomic Designrdquo American Economic Re-view 1999 89(4) pp 748ndash80

Roth Alvin E and Sotomayor Marilda Two-sided matching A study in game-theoreticmodeling and analysis Cambridge Cam-bridge University Press 1990

Sen Amartya Collective choice and social wel-fare San Francisco Holden-Day Inc 1970

Shapley Lloyd ldquoComplements and Substitutesin the Optimal Assignment Problemrdquo NavalResearch Logistics Quarterly 1962 9(1) pp45ndash48

935VOL 95 NO 4 HATFIELD AND MILGROM MATCHING WITH CONTRACTS