MIT6_042JF10_rec07_sol

# MIT6_042JF10_rec07_s - 6.042/18.062J Mathematics for Computer Science Tom Leighton and Marten van Dijk October 1 2010 Notes for Recitation 7 1 A

This preview shows pages 1–4. Sign up to view the full content.

6.042/18.062J Mathematics for Computer Science October 1, 2010 Tom Leighton and Marten van Dijk Notes for Recitation 7 1 A Protocol for College Admission Next, we are going to talk about a generalization of the stable marriage problem. Recall that we have some horses and we’d like to pair them with stables so that there is no incentive for two horses to swap stables. Oh wait, that’s a diﬀerent problem. The problem we’re going to talk about is a generalization of the one done in lecture. In the new problem, there are N students s 1 ,s 2 ,...,s N and M universities u 1 ,u 2 ,...,u M . M University u i has n i slots for students, and we’re guaranteed that i =1 n i = N . Each student ranks all universities (no ties) and each university ranks all students (no ties). Design an algorithm to assign students to universities with the following properties 1. Every student is assigned to one university. 2. i , u i gets assigned n i students. 3. There does not exist s i ,s j ,u k ,u where s i is assigned to u k , s j is assigned to u , s j prefers u k to u , and u k prefers s j to s i . 4. It is student-optimal. This means that of all possible assignments satisfying the Frst three properties, the students get their top choice of university amongst these assign- ments. The algorithm will be a slight modiFcation of the mating algorithm given in lecture. ±or your convenience, we have provided a copy of the mating algorithm on the next page.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 Recitation 7 Each Day: Morning: Each girl stands on her balcony Each boy stands under the balcony of his favorite girl whom he has not yet crossed oﬀ his list and serenades. If there are no girls left on his list, he stays home and does 6.042 homework. Afternoon: Girls who have at least one suitor say to their favorite from among the suitors that day: “Maybe, come back tomorrow.” To the others, they say “No, I will never marry you!” Evening: Any boy who hears “No” crosses that girl oﬀ his list. Termination Condition: If there is a day when every girl has at most one suitor, we stop and each girl marries her current suitor (if any).
3 Recitation 7 Solution. Each Day: Morning: Each university asks which students are interested in applying. Each

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 01/19/2012 for the course CS 6.042J / 1 taught by Professor Tomleighton,dr.martenvandijk during the Fall '10 term at MIT.

### Page1 / 6

MIT6_042JF10_rec07_s - 6.042/18.062J Mathematics for Computer Science Tom Leighton and Marten van Dijk October 1 2010 Notes for Recitation 7 1 A

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online