DEFERRED ACCEPTANCE 2

Similar documents
Chapter01.fm Page 1 Monday, August 23, :52 PM. Part I of Change. The Mechanics. of Change

Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi

Grade Point Scales Standard Honors AP/College A B C D F Sample file

Digital Marketing Manager, Marketing Manager, Agency Owner. Bachelors in Marketing, Advertising, Communications, or equivalent experience

Principles of Algorithm Design

Usability Test Report: Requesting Library Material 1

14.1 Encoding for different models of computation

Agreement in Distributed Systems CS 188 Distributed Systems February 19, 2015

Trombone players produce different pitches partly by varying the length of a tube.

1 Leaffix Scan, Rootfix Scan, Tree Size, and Depth

(Refer Slide Time: 02.06)

(Refer Slide Time: 05:25)

CS 4349 Lecture August 21st, 2017

Getting Started. Excerpted from Hello World! Computer Programming for Kids and Other Beginners

Properties of matching algorithm in college admission problem with variable capacity quotas. Robert Golański Warsaw School of Economics

Introduction to Algorithms / Algorithms I Lecturer: Michael Dinitz Topic: Algorithms and Game Theory Date: 12/3/15

UNINFORMED SEARCH. Announcements Reading Section 3.4, especially 3.4.1, 3.4.2, 3.4.3, 3.4.5

(Refer Slide Time: 06:01)

It s possible to get your inbox to zero and keep it there, even if you get hundreds of s a day.

What s the base case?

BST Deletion. First, we need to find the value which is easy because we can just use the method we developed for BST_Search.

Frequently Asked Questions about the NDIS

Meet our Example Buyer Persona Adele Revella, CEO

Hello World! Computer Programming for Kids and Other Beginners. Chapter 1. by Warren Sande and Carter Sande. Copyright 2009 Manning Publications

CSCI 1100L: Topics in Computing Lab Lab 1: Introduction to the Lab! Part I

Lines of Symmetry. Grade 3. Amy Hahn. Education 334: MW 8 9:20 a.m.

5 R1 The one green in the same place so either of these could be green.

/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Priority Queues / Heaps Date: 9/27/17

Introduction to Programming

Variables and Data Representation

(Refer Slide Time: 01:25)

Introduction to Counting, Some Basic Principles

Bring in several pieces of junk mail that have been opened and spread the mail around the classroom.

Writing Cover Letters

Heuristic Evaluation of [ Quest ]

Introduction to Access 97/2000

MITOCW watch?v=zm5mw5nkzjg

Intro. Scheme Basics. scm> 5 5. scm>

Treaps. 1 Binary Search Trees (BSTs) CSE341T/CSE549T 11/05/2014. Lecture 19

Term Definition Introduced in: This option, located within the View tab, provides a variety of options to choose when sorting and grouping Arrangement

STEPS TO REGISTERING FOR OUR ONLINE AUCTIONS:

Keep Track of Your Passwords Easily

Project 1 Balanced binary

Spam. Time: five years from now Place: England

Problem Solving through Programming In C Prof. Anupam Basu Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur

Divisibility Rules and Their Explanations

ACA ADMISSIONS/LOTTERY FREQUENTLY ASKED QUESTIONS

Programming and Data Structure

SchoolMessenger App. Parent and Student User Guide - Website. West Corporation. 100 Enterprise Way, Suite A-300. Scotts Valley, CA

Ackworth Howard Church of England (VC) Junior and Infant School. Child-friendly GDPR privacy notice

Here are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed.

Overview: Students explore how they can use to communicate with real people within their schools, families, and communities.

SchoolMessenger App. Teacher User Guide - Web. West Corporation. 100 Enterprise Way, Suite A-300. Scotts Valley, CA

Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi.

USE QUICK ASSIST TO REMOTELY TROUBLESHOOT A FRIEND S COMPUTER

MITOCW watch?v=w_-sx4vr53m

Hello, welcome to creating a widget in MyUW. We only have 300 seconds, so let s get going.

The College Admissions Problem Reconsidered

Problem Solving through Programming In C Prof. Anupam Basu Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur

EDU738 Guidelines for Collecting Data: Using SurveyMonkey and Inviting Participants

FINAL REPORT 04/25/2015 FINAL REPORT SUNY CANTON MOBILE APPLICATION

Excel Basics: Working with Spreadsheets

Database management system Prof. D. Janakiram Department of Computer Science and Engineering Indian Institute of Technology, Madras

Text 1 Cell Phones Raise Security Concerns at School

IMPORTANT WORDS AND WHAT THEY MEAN

An Interesting Way to Combine Numbers

Outline More Security Protocols CS 239 Computer Security February 6, 2006

Project Collaboration

Fractions and their Equivalent Forms

Combinatorics Prof. Dr. L. Sunil Chandran Department of Computer Science and Automation Indian Institute of Science, Bangalore

Part II Composition of Functions

Fractions and their Equivalent Forms

(Refer Slide Time 3:31)

C Pointers 2013 Author Riko H i

CS125 : Introduction to Computer Science. Lecture Notes #11 Procedural Composition and Abstraction. c 2005, 2004 Jason Zych

CHAPTER 18: CLIENT COMMUNICATION

6.001 Notes: Section 8.1

P2P. 1 Introduction. 2 Napster. Alex S. 2.1 Client/Server. 2.2 Problems

CS261: A Second Course in Algorithms Lecture #14: Online Bipartite Matching

How to Get Your Inbox to Zero Every Day

Utility Maximization

beyond the install 10 Things you should do after you install WordPress by Terri Orlowski beyond the office

Out for Shopping-Understanding Linear Data Structures English

SchoolMessenger App. Parent Guide - Mobile. West Corporation. 100 Enterprise Way, Suite A-300. Scotts Valley, CA

Figure 1: A directed graph.

Shorthand for values: variables

UNIT 6. Coordinate Plane CCM6+ Name: Math Teacher:

CS61A Notes Week 6: Scheme1, Data Directed Programming You Are Scheme and don t let anyone tell you otherwise

Mathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras. Lecture - 37 Resolution Rules

Outline More Security Protocols CS 239 Computer Security February 4, 2004

USING EVENTBRITE. A Guide for CLAPA Staff & Volunteers

Defrosters: Cyndi Ai, Esther Chen, Ben Schiffler, Sean Yang Assignment 3d: Usability Testing Review May 17, Overview

Animations involving numbers

Chamberlin and Boyce - SEQUEL: A Structured English Query Language

StoryStylus Scripting Help

Notice on Access to Advanced Lists...2 Database Overview...2 Example: Real-life concept of a database... 2

Detailed instructions for adding (or changing) your Avatar (profile picture next to your

Fishnet Assignment 1: Distance Vector Routing Due: May 13, 2002.

Chapter 1 Introduction

The first thing we ll need is some numbers. I m going to use the set of times and drug concentration levels in a patient s bloodstream given below.

Transcription:

DEFERRED ACCEPTANCE The point of this note is to take you through the logic behind the deferred acceptance algorithm. Please read the papers associated with the links on the web page for motivation and applications. Matching. This algorithm is used to handle a number of different matching problems in which individuals are matched with organizations. For what we ll discuss here, the matching problem has to satisfy two properties: first, though the matching may involve money transfers, the transfers must be fixed at the time the matching takes place; second, each side of the market must have a finite capacity for the number of partners. For example admitting students to schools fits into this framework because each student only wants to get into one school, and schools can only admit as many students as they have seats in their classrooms. In one sense every trading problem can be viewed as a matching problem where buyers are matched with sellers. However, in many of the trading problems you are familiar with, like auctions, money transfers are altered during the trading process to try to alter the matching (for example, a bid in an auction). Furthermore, sides of the market often don t have real capacity constraints. For example, a platform like apple or android tries to match people with apps like Facebook or Spotify. However, Spotify has no effective limit on the number of users it can match with. In these two example, deferred acceptance has nothing to contribute. A matching problem that does fit the algorithm is admitting graduating students into post-graduate programs. We ll use this problem as an illustration in this reading. This is a many to one matching problem in the sense that each applicant is admitted to only one organization, but each organization will admit many applicants. Deferred acceptance will work with many to many matchings. For example, when phd students graduate in economics, they attend a conference where they are interviewed by various departments. The conference lasts for three days, so there is a limit to the number of interviews any applicant can accept, and the number of applicants that any department an interview. Deferred acceptance could be used to arrange this matching. In fact the process by which departments invite applicants for interviews works much like deferred acceptance, though it isn t formally described that way. In this note, we ll restrict to many to one matchings, and in the examples, one to one matchings, to make the notation a bit easier. We ll use the notation I to refer both to the set of applicants and the number of applicants. We ll speak about applicant i to refer to a specific applicant. The set of organizations will be referred to as J, with a specific organization referred to as organization j. Each of the organizations has a number of vacant positions q j. It might not want to fill all of them if it doesn t like all the applicants, but it can never fill more than q j positions. A matching µ is a correspondence that takes each element of I J and names the set of individuals or organizations that element is matched with. For 1

DEFERRED ACCEPTANCE 2 example, µ(i) J for each applicant i. If µ(i) =, that means that applicant i remains unmatched. Similarly µ(j) I. A feasible matching is one for which µ(j) q j for every organization j. (The notation A means the number of elements in the set A). We ll assume that each i I can strictly rank each of the organizations in J in the sense that a higher ranked organization is one that the applicant would prefer to a lower ranked organization - prefer means would rather be accepted by. We ll assume the ranking is strict. If j is ranked higher (preferred) by i to j, we ll write j i j. We also allow that an applicant might prefer to remain unmatched than to be assigned to some organization, in which case we write i j We ll do the same for organizations and assume they strictly rank applicants with i j i meaning that organization j would prefer to accept i than to accept i if it can t accept them both. An organization j might be unwilling to accept and applicant i, in which case we write j i. This way of thinking about organization preference is actually pretty special, since organizations preferences over applicants will typically depend on who is already in the organization. If the organization is a school, then the assumption is plausible. Once a matching has been made, we want to make sure that people won t want to go around changing the outcome. Of course, everyone wants to get into the best school, which has a limited capacity to accept students. So no matching will every give everyone their favorite outcome. Instead we ask for a somewhat weaker property - that a matching be stable. A matching is stable if, whenever an applicant i prefers some alternative j to the organization µ(i)to which they were assigned, then either that organization is unwilling to accept i in the first place, or that organization has been assigned a group of applicants who fill its capacity, all of whom are preferred to i. Similarly, if an organization j prefers some applicant i to an applicant i µ(j), then applicant i prefers µ(i)to j. If a matching is stable, everyone might wish they were matched with someone else, but the won t bother trying to change anything because they know they won t be able to get anyone else to math with them. Just to get a sense of what stability means, suppose there are only two applicants a and b and two organizations, say UBC and SFU where they could be accepted. In this example, UBC and SFU both have one seat to fill. Applicant a prefers UBC to SFU while for applicant b it is the other way around. UBC prefers applicant b to applicant a, while SFU prefers a to b. There are two possible matchings in this example - a is accepted by UBC while b is accepted at SFU, or a is accepted by SFU while b is accepted by UBC. IN the first matching UBC would prefer to have applicant b, but b prefers SFU, who she gets in the matching, to UBC, so she won t leave. In the second matching, a would prefer to be at UBC, but UBC is already assigned to b which it prefers. Deferred Acceptance. Notice that is this example illustrates that there will sometimes by many stable matchings. However, at this point, all we want to do is to find one stable matching. To do it, we can use the deferred acceptance algorithm. We ll describe the applicant proposing version. For applicants, behavior is simple - applicants can apply as long as all their applications have been rejected, and as long as there is some organization who has not yet rejected them. That seems straightforward enough. To make it into an algorithm, we ll have a computer program that asks the applicants for their

DEFERRED ACCEPTANCE 3 preferences over institutions, then applies for them. Each time it applies, it will send the application to the organization with the applicant said was most preferred among the set of organizations who have not yet rejected an application. For organizations, we ll do something similar. We ll ask them to describe their preferences over applicants, then whenever an application comes in, we ll have the computer program reject it if the organization said that the applicant was unacceptable under any circumstances, otherwise, the program will hold the application until a better one comes along. What it means for a better one to come along is that the organization s capacity is filled by the applications it is holding and the new applicant is better than one of the applications it is currently holding. To see it in action, you need to start with the preferences of the organizations and the applicants. Lets do an example with three organizations, UBC, SFU and UT and four students a, b, c, and d. SFU claims that its preferences are while for UBC: and finally For the students we elicit SFU : a b c d UBC : b a c d UT : c b d a a : UBC UT SFU b : UBC SFU UT c : UBC SFU UT d : UBC UT SFU We ll also assume there that each applicant would like to get into each of the institutions, while each university is willing to accept any of the students. We can make the exercise a bit easier to follow by assembling the information above into a little table that looks like the table we used to describe Nash equilibrium. It is important to remember that isn t what this table does. It just mimics the rankings given above for the applicants and organizations. The rankings of the organization over the applicants are given as the first entry in each cell, the second entry is the corresponding ranking or organizations by the applicants. SFU 1,3 2,2 3,2 4,3 UBC 2,1 1,1 3,1 4,1 UT 4,2 2,3 1,3 3.2 Now the applicants start to apply Each applicant sends an application to their favorite organization. They all like UBC the best so all the applications go there. The applications are marked with asterisks in the next table: SFU 1,3 2,2 3,2 4,3 UT 4,2 2,3 1,3 3,2 UBC has four applications, and it likes the one from b the best, so it rejects the other three. Lets mark the rejected applications in red. The rejected applicants a, c, and d cannot make an application to UBC again.

DEFERRED ACCEPTANCE 4 SFU 1,3 2,2 3,2 4,3 UT 4,2 2,3 1,3 3,2 Now the rejected applicants try again as we described above. Apart from UBC, a s favorite school is UT, so he should apply there. Similar for c and d, so we just mark the new applications with asterisks. SFU 1,3 2,2 3,2 4,3 UT 4,2 2,3 1,3 3,2 UT has two applications this tim and it prefers the application from d to the one from a, so it rejects a. SFU 1,3 2,2 3,2 4,3 UT 4,2 2,3 1,3 3,2 Now a has only one option, apply to SFU, which is his least favorite school. At this point SFU has two applications one from a and one from c. Since it prefers a, it rejects the application from c. This is why it is called deferred acceptance SFU accepted c initially, but only until a better alternative came along. SFU 1,3 2,2 3,2 4,3 UT 4,2 2,3 1,3 3,2 Applicantcnow applies to UT. Sincecis preferred to the incumbentd,d sapplication is rejected, a s is accepted and d is just out of luck. SFU 1,3 2,2 3,2 4,3 UT 4,2 2,3 1,3 3,2 Algorithms. The point of all this want to try to compute a matching that was stable. How can we be sure the resulting matching is stable? If it weren t then we could find what is a blocking pair, an organization j and an applicant i for whom i j µ(j) while j i µ(i). Notice that during the deferred acceptance algorithm, applicant i always has to apply to his or her favorite organization among all the ones that haven t rejected them. If thats true and i is matched with µ(i) which she doesn t like as much, then that could only mean that i applied to j and was rejected. Yet if j rejected i, it could only be because it already had an application from an applicant it preferred. Since it would subsequently only accept applicants that were even better, it has to be that µ(j) i, which is a contradiction. Implementing the Deferred Acceptance Solution. The market with which I am most familiar is the market for junior academic economists. The applicants are economics students graduating with Ph d degrees. The organizations are Universities, Governments, and Consulting firms throughout the world. The market runs

DEFERRED ACCEPTANCE 5 through much of the year, but the primary hiring period begins in October when Universities place job ads. In 2014 there were a little more than 4000 applicants registered at econjobmarket.org, one of the main advertising and recruiting sites. The number of academic openings is somewhere between 1200 and 1600. Junior economists apply to schools they are interested in. The schools review applications, interview applicants at a centralized meeting in January, then make offers to the applicants they like. The applicants, many of whom receive multiple offers, choose the offer that they like. This might give you some idea about the potential size of a market, and how complex it might be to find some kind of stable matching. It mostly illustrates that it won t be feasible to find a good solution by scribbling on pieces of paper, as we did above. In 2013, the Vancouver School Board implemented a matching program for children in special kindergarten programs. There were four programs, French Immersion, Mandarin Immersion, Montessori, and Fine Arts, spread over 19 schools. In the year prior to their program, about 1400 students participated. The school board discussed the possibility of matching students using deferred acceptance, but later changed their mind and used a simple computerized lottery using only parents first choice. This system replaced one in which parents physically traveled to as many schools as they wanted and submitted an application. Schools then ran their own lotteries. Neither of these examples actually use the deferred acceptance algorithm. In the school board case, the board was concerned about the difficulty parents might have expressing their preferences over schools as well as with the fact that parents have a strong tendency to change their minds and give up their matching once they get it. In the the academic job market, universities don t have clear preferences at the start of the process and need time to develop them. There is no hope of implementing a pareto optimal and stable matching if you don t know participants preferences. The Vancouver school board example is an interesting case in point. The way their current matching program works is that each parent lists three schools in order or their preference. The actual lottery only makes use of the first choice. Each child is entered into a draw for their parents first choice program. If they win the draw, that is great. If they don t, they are put on a waiting list for that school in case another family who did win the lottery decides to decline. Since parents who listed a school as their first choice are always put on a waiting list, the second and third choice are basically not attainable. If parents are very anxious to get their children into a special program, they need to choose the program where they think they are most likely to get in. This may or may not be the one they most prefer for their child. This is one of the reasons that deferred acceptance seems advantageous. The side who make proposals (parents in the case of the Vancouver School Board, students in the college application example) have no reason to mis-represent their preferences the way they do with the Vancouver School Board example. That would be great except that, as I mentioned, parents don t always know their preferences. It isn t always in everyone s interest to submit their preferences truthfully. For example, suppose we look at a simpler problem with only SFU and UBC and only two students, 1 and 2. We ll add the option of not going to university and suppose

DEFERRED ACCEPTANCE 6 that preferences look like this UBC 1 2 while the students preferences are and SFU 2 1 1 SFU UBC OUT 2 UBC SFU OUT The student proposing algorithm has 1 applying to SFU and 2 applying to UBC. That is it, there are no more proposals. So m(1) = SFU, m(2) = UBC. The school proposing algorithm has UBC proposing to 1 and SFU proposing to 2, so the matching is m(1) = UBC, m(2) = SFU. Notice that both the schools are better off in the school proposing algorithm than they are in the student proposing algorithm. I described this example earlier. Now notice that something strange happens in this example. Suppose that in the school proposing version, that student 1 simply lies and says that if he can t get into school, he would rather not to go school at all. In other words, he or she submits the preference 1 SFU OUT UBC. Lets run the school proposing version of the algorithm - UBC proposes to 1 and SFU proposes to 2. At this point, our computerized algorithm decides that 1 should reject UBC s proposal because it thinks he would rather not go to school at all. Since its offer has been rejected, UBC now proposes to its second favorite choice, student 1, who drops the SFU offer and goes to UBC. SFU now has to make an offer to student 1, who accept it. By lying student 1 makes himself strictly better off, but only in the school proposing version of the algorithm. 0.1. A slightly more complicated problem: Lets make things slightly more complicated by adding a few more students, another university, and another option, The additional option will be not going to university at all. Here are the preferences. At this point you can imagine that these are preferences that were actually submitted through the web page. The problem is just to do the matching. Here are the preferences written in two different ways: SFU 1 4 2 3 UBC 1 3 4 2 UOT 2 3 1 4 UFV 2 3 4 1 1 UBC SFU UOT UFV OUT 2 UBC UOT SFU UFV OUT 3 UBC SFU UOT UFV OUT 4 UBC UOT SFU OUT UFV

DEFERRED ACCEPTANCE 7 UBC 1,1 4,1 2,1 3,1 SFU 1,2 3,3 4,2 2,3 UFV 1,4 1,4 2,4 3,5 UOT 3,3 1,2 2,3 4,2 We ve added a fourth university (if you like name UFV means University of the Fraser Valley). There is also a fourth student who only wants to go to UBC, SFU or UOT, but is not interested in UFV. Lets find a stable matching using the algorithm: (1) All students propose to UBC, which tentatively accepts student 1 and rejects the other proposals; (2) Students 2 and 4 propose to UOT, while student 3 proposes to SFU, SFU tentatively accepts student 3, UOT tentatively accepts student 2 who it prefers; (3) Student 4, who has been rejected by UBC and UOT, now proposes to his remaining favorite SFU. SFU prefers 4 to their current acceptance, 3, so they throw 3 out and accept 4; (4) Student 3 has been rejected by UBC and now SFU, so he proposed to his next favorite, UOT who has currently accepted 2 who they prefer, student 3 s application is rejected; (5) Finally, student 3 proposes to UFV who accepts him. This gives us m(1) = UBC,m(2) = UOT,m(3) = UFV,m(4) = SFU. Now in pictures: UBC 1,1* 4,1* 2,1* 3,1* SFU 1,2 3,3 4,2 2,3 UFV 1,4 1,4 2,4 3,5 UOT 3,3 1,2 2,3 4,2 UBC 1,1* 4,1* 2,1* 3,1* SFU 1,2 3,3 4,2* 2,3 UFV 1,4 1,4 2,4 3,5 UOT 3,3 1,2* 2,3 4,2* UBC 1,1* 4,1* 2,1* 3,1* SFU 1,2 3,3 4,2* 2,3* UFV 1,4 1,4 2,4 3,5 UOT 3,3 1,2* 2,3 4,2*

DEFERRED ACCEPTANCE 8 UBC 1,1* 4,1* 2,1* 3,1* SFU 1,2 3,3 4,2* 2,3* UFV 1,4 1,4 2,4 3,5 UOT 3,3 1,2* 2,3* 4,2* UBC 1,1* 4,1* 2,1* 3,1* SFU 1,2 3,3 4,2* 2,3* UFV 1,4 1,4 2,4* 3,5 UOT 3,3 1,2* 2,3* 4,2* Exercise: (1) Find the stable outcome associated with the university proposing deferred acceptance algorithm for this last example. Are they the same? Can you see why this means that the stable matching is unique in this case? Can you see why neither schools or students want to misrepresent their preferences in this case? (2) Suppose all the students agree on the ranking of the schools (pick your favorite ranking). What happens. Is there a difference between the student proposing and the school proposing outcome? (3) As special case of the above occurs when all the schools agree on the ranking of students, and all the students agree on a ranking of schools. What happens then? This outcome is called assortative matching. (4) Go back to the problem we discussed above in which students lied about their preferences when using the school proposing algorithm. Can you describe one or more Nash equilibrium outcomes having the property that every students and schools report about their preferences is a best reply to the reports of the others? How do schools report in these equilibria? Indifference. Lets look at a slightly simpler problem in which 3 students rated 3 schools according to 1 UBC UOT SFU 2 UBC SFU UOT 3 UOT UBC SFU Now when the students submitted these preferences, lets suppose that 1 and 2 are exactly as stated, but that 2 really doesn t care whether he goes to UBC or SFU, but strictly prefers both of them to UOT. He had to fill out something as his favorite choice, so he flipped a coin and it came out UBC. Furthermore, lets change the preferences of the schools so that they don t really care who they admit, they just want to fill their slots. What should you do then? Recall that the student proposing deferred acceptance algorithm supports a stable outcome and has the property that students report their preferences truthfully. To make it work, we needed the schools to reject applications. We can make them do that by having them run a lottery which ranks the students. So the administrators in the different schools create a spreadsheet with the three students listed in one column and then sort the column randomly. Once they do this they submit

DEFERRED ACCEPTANCE 9 these randomized preferences. They could look like anything, but suppose they were SFU 3 1 2 UBC 2 3 1 UOT 1 2 3. Now the program runs, and 2 gets into UBC, 1 gets into UOT and 3 gets into SFU. This is stable given the stated preferences, but these preferences are masking a lot of indifference. In fact, if we switched 1 to UBC, 2 to SFU and 3 to UOT, 1 and 3 would be strictly better off and 2 would be no worse than he was initially. Since the schools don t really care, this new matching would constitute a pareto improvement - not good. In this simple case, there is an easy way to resolve this. It provides an example of something called the top cycle algorithm. In the matching above µ(2) = UBC, µ(1) = UT, µ(3) = SFU. The students learn this information. Suppose we now give them the option to propose one or more schools that they would be willing to trade for their existing allocation - encouraging them to include another school if they don t really care whether they are matched with their existing school or their alternative proposal. The proviso is that they must be willing to give up their existing school for the alternative they specify. The system will switch them to the new school if they can. Hopefully, student 2 will propose that he is willing to trade UBC for SFU. Student 1 should propose to trade UBC for UT. Student 3 should propose trading either UT or UBC for his current allocation at SFU. The top cycle algorithm takes these proposed trades and goes through the following routine: (1) Choose any student, say student 1 and check whether there are any schools he would like to trade for his current match. Student 1 has proposed UBC as an alternative to UT. So we start looking for a cycle using student 1. (2) UBC is owned by student 2, so check whether there is any school that student 2 is willing to trade for UBC. We find he has proposed SFU as an alternative he would be willing to trade. So lets add student 2 to our cycle, getting 1 2. (3) SFU is owned by student 3, so check whether there is any school that 3 is willing to trade. One of the schools he has proposed is UBC, so lets add student 3 to the cycle 1 2 3. (4) UBC is owned by student 2 who is willing to trade for UBC, so add him 1 2 3 2. In this last step, we added a student who is already in the list. This gives us a top cycle. If we continued to apply the steps in the algorithm above we would cycle back and forth between student 2 and 3. The reason for the cycle is that 2 prefers the school that 3 has and 3 prefers the school that 2 has. So switching them creates a pareto improvement. We might as well switch them and change the matching to µ(2) = SFU, µ(1) = UT, µ(3) = UBC. Notice that we made some students better off, and didn t hurt anyone. You only propose trades you prefer - you might get them or you might get nothing. No one is being made any worse off that they were initially. We might as well ask the question again, are there any schools you would be willing to trade for your new

DEFERRED ACCEPTANCE 10 allocation. All three of them have schools they prefer - 1 prefers UBC to his new allocation at UT, 2 also prefers UBC while 3 prefers UT. So lets do it again: (1) 1 prefers UBC to UT so lets add him to the cycle 1 ; (2) UBC is now owned by student 3 who prefers UT, so lets add her to the cycle 1 3; (3) UT is owned by 1 who prefers UT so we have 1 3 1 - a top cycle. So student 1 and 3 should switch schools giving µ(2) = SFU, µ(1) = UBC, µ(3) = UT. If we try this again we will find the only student we can add to a cycle is student 2 who prefers UBC, but it is owned by student 1 who is no longer willing to move - our algorithm comes to an end with an allocation that is pareto optimal and stable as long as the students haven t lied about their preferences. In fact, if you recall, we assumed that student 2 didn t really care whether he got UBC or SFU, so each of the students actually gets his favorite choice.