Question? Leave a message!




REPRESENTATIVE PROBLEMS

REPRESENTATIVE PROBLEMS
1. REPRESENTATIVE PROBLEMS stable matching ‣ five representative problems ‣ Lecture slides by Kevin Wayne Copyright © 2005 PearsonAddison Wesley Copyright © 2013 Kevin Wayne http://www.cs.princeton.edu/wayne/kleinbergtardos Last updated on Mar 14, 2014, 5:36 PM1. REPRESENTATIVE PROBLEMS stable matching ‣ five representative problems ‣ SECTION 1.1Matching medschool students to hospitals Goal. Given a set of preferences among hospitals and medschool students, design a selfreinforcing admissions process. Unstable pair: student x and hospital y are unstable if: x prefers y to its assigned hospital. y prefers x to one of its admitted students. Stable assignment. Assignment with no unstable pairs. Natural and desirable condition. Individual selfinterest prevents any hospital–student side deal. 3Stable matching problem Goal. Given a set of n men and a set of n women, find a "suitable" matching. Participants rank members of opposite sex. Each man lists women in order of preference from best to worst. Each woman lists men in order of preference from best to worst. favorite least favorite favorite least favorite st nd rd st nd rd 1 2 3 1 2 3 Xavier Amy Bertha Clare Amy Yancey Xavier Zeus Yancey Bertha Amy Clare Bertha Xavier Yancey Zeus Zeus Amy Bertha Clare Clare Xavier Yancey Zeus men's preference list women's preference list 4Perfect matching Def. A matching S is a set of ordered pairs m–w with m ∈ M and w ∈ W s.t. Each man m ∈ M appears in at most one pair of S. Each woman w ∈ W appears in at most one pair of S. Def. A matching S is perfect if S = M = W = n. st nd rd st nd rd 1 2 3 1 2 3 Xavier Amy Bertha Clare Amy Yancey Xavier Zeus Yancey Bertha Amy Clare Bertha Xavier Yancey Zeus Zeus Amy Bertha Clare Clare Xavier Yancey Zeus a perfect matching S = X–C, Y–B, Z–A 5Unstable pair Def. Given a perfect matching S, man m and woman w are unstable if: m prefers w to his current partner. w prefers m to her current partner. Key point. An unstable pair m–w could each improve partner by joint action. st nd rd st nd rd 1 2 3 1 2 3 Xavier Amy Bertha Clare Amy Yancey Xavier Zeus Yancey Bertha Amy Clare Bertha Xavier Yancey Zeus Zeus Amy Bertha Clare Clare Xavier Yancey Zeus Bertha and Xavier are an unstable pair 6Stable matching problem Def. A stable matching is a perfect matching with no unstable pairs. Stable matching problem. Given the preference lists of n men and n women, find a stable matching (if one exists). Natural, desirable, and selfreinforcing condition. Individual selfinterest prevents any man–woman pair from eloping. st nd rd st nd rd 1 2 3 1 2 3 Xavier Amy Bertha Clare Amy Yancey Xavier Zeus Yancey Bertha Amy Clare Bertha Xavier Yancey Zeus Zeus Amy Bertha Clare Clare Xavier Yancey Zeus a perfect matching S = X–A, Y–B, Z–C 7Stable roommate problem Q. Do stable matchings always exist A. Not obvious a priori. Stable roommate problem. 2 n people; each person ranks others from 1 to 2 n – 1. Assign roommate pairs so that no unstable pairs. st nd rd 1 2 3 no perfect matching is stable Adam B C D A–B, C–D ⇒ B–C unstable Bob C A D A–C, B–D ⇒ A–B unstable Chris A B D A–D, B–C ⇒ A–C unstable Doofus A B C Observation. Stable matchings need not exist for stable roommate problem. 8GaleShapley deferred acceptance algorithm An intuitive method that guarantees to find a stable matching. GALE–SHAPLEY (preference lists for men and women) INITIALIZE S to empty matching. WHILE (some man m is unmatched and hasn't proposed to every woman) w ← first woman on m's list to whom m has not yet proposed. IF (w is unmatched) Add pair m–w to matching S. ELSE IF (w prefers m to her current partner m') Remove pair m'–w from matching S. Add pair m–w to matching S. ELSE w rejects m. RETURN stable matching S. 9Proof of correctness: termination Observation 1. Men propose to women in decreasing order of preference. Observation 2. Once a woman is matched, she never becomes unmatched; she only "trades up." 2 Claim. Algorithm terminates after at most n iterations of while loop. Pf. Each time through the while loop a man proposes to a new woman. 2 There are only n possible proposals. ▪ st nd rd th th st nd rd th th 1 2 3 4 5 1 2 3 4 5 Victor A B C D E Amy W X Y Z V Wyatt B C D A E Bertha X Y Z V W Xavier C D A B E Clare Y Z V W X Yancey D A B C E Diane Z V W X Y Zeus A B C D E Erika V W X Y Z n(n1) + 1 proposals required 10Proof of correctness: perfection Claim. In GaleShapley matching, all men and women get matched. Pf. by contradiction Suppose, for sake of contradiction, that Zeus is not matched upon termination of GS algorithm. Then some woman, say Amy, is not matched upon termination. By Observation 2, Amy was never proposed to. But, Zeus proposes to everyone, since he ends up unmatched. ▪ 11Proof of correctness: stability Claim. In GaleShapley matching, there are no unstable pairs. Pf. Suppose the GS matching S does not contain the pair A–Z. Case 1: Z never proposed to A. men propose in decreasing order ⇒ Z prefers his GS partner B to A. of preference ⇒ A–Z is stable. A – Y Case 2: Z proposed to A. B – Z ⇒ A rejected Z (right away or later) women only trade up ⋮ ⇒ A prefers her GS partner Y to Z. ⇒ A–Z is stable. In either case, the pair A–Z is stable. ▪ GaleShapley matching S 12Summary Stable matching problem. Given n men and n women, and their preferences, find a stable matching if one exists. Theorem. GaleShapley 1962 The GaleShapley algorithm guarantees to find a stable matching for any problem instance. Q. How to implement GS algorithm efficiently Q. If there are multiple stable matchings, which one does GS find 13Efficient implementation 2 Efficient implementation. We describe an O(n ) time implementation. Representing men and women. Assume men are named 1, …, n. Assume women are named 1', …, n'. Representing the matching. Maintain a list of free men (in a stack or queue). Maintain two arrays wifem and husbandw. if m matched to w, then wifem = w and husbandw = m set entry to 0 if unmatched Men proposing. For each man, maintain a list of women, ordered by preference. For each man, maintain a pointer to woman in list for next proposal. 14Efficient implementation (continued) Women rejecting/accepting. Does woman w prefer man m to man m' For each woman, create inverse of preference list of men. Constant time access for each query after O(n) preprocessing. st nd rd th th th th th 1 2 3 4 5 6 7 8 pref 8 3 7 1 4 5 6 2 woman prefers man 3 to 6 since inverse3 inverse6 1 2 3 4 5 6 7 8 inverse th th nd th th th rd st 4 8 2 5 6 7 3 1 for i = 1 to n inverseprefi = i 15Understanding the solution For a given problem instance, there may be several stable matchings. Do all executions of GS algorithm yield the same stable matching If so, which one st nd rd st nd rd 1 2 3 1 2 3 Xavier Amy Bertha Clare Amy Yancey Xavier Zeus Yancey Bertha Amy Clare Bertha Xavier Yancey Zeus Zeus Amy Bertha Clare Clare Xavier Yancey Zeus an instance with two stable matching: M = AX, BY, CZ and M' = AY, BX, CZ 16Understanding the solution Def. Woman w is a valid partner of man m if there exists some stable matching in which m and w are matched. Ex. Both Amy and Bertha are valid partners for Xavier. Both Amy and Bertha are valid partners for Yancey. Clare is the only valid partner for Zeus. st nd rd st nd rd 1 2 3 1 2 3 Xavier Amy Bertha Clare Amy Yancey Xavier Zeus Yancey Bertha Amy Clare Bertha Xavier Yancey Zeus Zeus Amy Bertha Clare Clare Xavier Yancey Zeus an instance with two stable matching: M = AX, BY, CZ and M' = AY, BX, CZ 17Understanding the solution Def. Woman w is a valid partner of man m if there exists some stable matching in which m and w are matched. Manoptimal assignment. Each man receives best valid partner. Is it perfect Is it stable Claim. All executions of GS yield manoptimal assignment. Corollary. Manoptimal assignment is a stable matching 18Man optimality Claim. GS matching S is manoptimal. Pf. by contradiction Suppose a man is matched with someone other than best valid partner. Men propose in decreasing order of preference ⇒ some man is rejected by valid partner during GS. Let Y be first such man, and let A be the first A – Y valid woman that rejects him. B – Z Let S be a stable matching where A and Y are matched. ⋮ When Y is rejected by A in GS, A forms (or reaffirms) engagement with a man, say Z. stable matching S ⇒ A prefers Z to Y. Let B be partner of Z in S. Z has not been rejected by any valid partner because this is the first (including B) at the point when Y is rejected by A. rejection by a valid partner Thus, Z has not yet proposed to B when he proposes to A. ⇒ Z prefers A to B. Thus A–Z is unstable in S, a contradiction. ▪ 19Woman pessimality Q. Does manoptimality come at the expense of the women A. Yes. Womanpessimal assignment. Each woman receives worst valid partner. Claim. GS finds womanpessimal stable matching S. Pf. by contradiction Suppose A–Z matched in S but Z is not worst valid partner for A. There exists stable matching S in which A is paired with a man, say Y, whom she likes less than Z. ⇒ A prefers Z to Y. A – Y Let B be the partner of Z in S. By manoptimality, B – Z A is the best valid partner for Z. ⋮ ⇒ Z prefers A to B. Thus, A–Z is an unstable pair in S, a contradiction. ▪ stable matching S 20Deceit: Machiavelli meets GaleShapley Q. Can there be an incentive to misrepresent your preference list Assume you know men’s proposeandreject algorithm will be run. Assume preference lists of all other participants are known. Fact. No, for any man; yes, for some women. men's preference list women's preference list st nd rd st nd rd 1 2 3 1 2 3 X A B C A Y X Z Y B A C B X Y Z Z A B C C X Y Z Amy lies st nd rd 1 2 3 A Y Z X B X Y Z C X Y Z 21Extensions: matching residents to hospitals Ex: Men ≈ hospitals, Women ≈ med school residents. Variant 1. Some participants declare others as unacceptable. resident A unwilling Variant 2. Unequal number of men and women. to work in Cleveland Variant 3. Limited polygamy. hospital X wants to hire 3 residents Def. Matching is S unstable if there is a hospital h and resident r such that: h and r are acceptable to each other; and Either r is unmatched, or r prefers h to her assigned hospital; and Either h does not have all its places filled, or h prefers r to at least one of its assigned residents. 22Historical context National resident matching program (NRMP). Centralized clearinghouse to match medschool students to hospitals. Began in 1952 to fix unraveling of offer dates. hospitals began making Originally used the "Boston Pool" algorithm. offers earlier and earlier, up to 2 years in advance Algorithm overhauled in 1998. medschool student optimal deals with various side constraints stable matching is no (e.g., allow couples to match together) longer guaranteed to exist 38,000+ residents for 26,000+ positions. The Redesign of the Matching Market for American Physicians: Some Engineering Aspects of Economic Design By ALVIN E. ROTH AND ELLIOTT PERANSON We report on the design of the new clearinghouse adopted by the National Resident Matching Program, which annually fills approximately 20,000 jobs for new physi cians. Because the market has complementarities between applicants and between positions, the theory of simple matching markets does not apply directly. However, computational experiments show the theory provides good approximations. Fur thermore, the set of stable matchings, and the opportunities for strategic manipu lation, are surprisingly small. A new kind of “core convergence” result explains this; that each applicant interviews only a small fraction of available positions is important. We also describe engineering aspects of the design process. (JEL C78, B41, J44) 23 The entrylevel labor market for new physi employment, rather than waiting to participate cians in the United States is organized via a in the larger market. (By the 1940’s, contracts centralized clearinghouse called the National were typically being signed two years in ad Resident Matching Program (NRMP). Each vance of employment.) Although the matching year, approximately 20,000 jobs are filled in a algorithm has been adapted over time to meet process in which graduating physicians and changes in the structure of medical employ other applicants interview at residency pro ment, roughly the same form of clearinghouse gramsthroughoutthecountryandthencompose market mechanism has been used since 1951 and submit Rank Order Lists (ROLs) to the (seeRoth,1984).Thekindofmarketfailurethat NRMP, each indicating an applicant’s prefer gave rise to this clearinghouse has since been ence ordering among the positions for which seen in many markets (Roth and Xiaolin Xing, she has interviewed. Similarly, the residency 1994), a number of which have also organized programs submit ROLs of the applicants they clearinghouses in response. have interviewed, along with the number of In the mid 1990’s, in an environment of rap positionstheywishtofill.TheNRMPprocesses idly changing healthcare financing with many these ROLs and capacities to produce a match implications for the medical labor market, the ing of applicants to residency programs. market began to suffer a crisis of confidence The clearinghouse used in this market dates concerningwhetherthematchingalgorithmwas from the early 1950’s. It replaced a decentral unreasonably favorable to employers at the ex izedprocessthatsufferedamarketfailurewhen pense of applicants, and whether applicants residency programs and applicants started to could “game the system” by strategically ma seek each other out individually through infor nipulating the ROLs they submitted. The con mal channels, earlier and earlier in advance of troversy was most clearly expressed in an exchange in Academic Medicine (Peranson and Richard R. Randlett, 1995a,b; Kevin J. Roth: Department of Economics, and Graduate School Williams, 1995a,b). In reaction to this ex of Business Administration, Harvard University, Cam change, groups such as the American Medical bridge, MA 02138 (email: alrothharvard.edu); Peran Student Association together with Ralph Nad son:NationalMatchingServices,Inc.,595BayStreet,Suite er’s Public Citizen Health Research Group 301, Box 29, Toronto, ON M5G 2C2, Canada. We thank Aljosa Feldin for able assistance with the theoretical com (1995), and the Medical Student Section of the putations reported in Section VI. Parts of this work were American Medical Association (AMAMSS, sponsoredbytheNationalResidentMatchingProgram,and 1995)advocatedthatthematchingalgorithmbe parts by the National Science Foundation. 7482012 Nobel Prize in Economics Lloyd Shapley. Stable matching theory and GaleShapley algorithm. Alvin Roth. Applied GaleShapley to matching new doctors with hospitals, students with schools, and organ donors with patients. Lloyd Shapley Alvin Roth 24Lessons learned Powerful ideas learned in course. Isolate underlying structure of problem. Create useful and efficient algorithms. Potentially deep social ramifications. legal disclaimer Historically, men propose to women. Why not vice versa Men: propose early and often; be honest. Women: ask out the men. Theory can be socially enriching and fun COS majors get the best partners (and jobs) 251. REPRESENTATIVE PROBLEMS stable matching ‣ five representative problems ‣ SECTION 1.2Interval scheduling Input. Set of jobs with start times and finish times. Goal. Find maximum cardinality subset of mutually compatible jobs. jobs don't overlap a b b c d e e f g h h time 0 1 2 3 4 5 6 7 8 9 10 11 27Weighted interval scheduling Input. Set of jobs with start times, finish times, and weights. Goal. Find maximum weight subset of mutually compatible jobs. 23 12 20 26 26 13 20 11 16 16 time 0 1 2 3 4 5 6 7 8 9 10 11 28Bipartite matching Problem. Given a bipartite graph G = (L ∪ R, E), find a max cardinality matching. Def. A subset of edges M ⊆ E is a matching if each node appears in exactly one edge in M. matching 29Independent set Problem. Given a graph G = (V, E), find a max cardinality independent set. Def. A subset S ⊆ V is independent if for every (u, v) ∈ E, either u ∉ S or v ∉ S (or both). independent set 30Competitive facility location Input. Graph with weight on each node. Game. Two competing players alternate in selecting nodes. Not allowed to select a node if any of its neighbors have been selected. Goal. Select a maximum weight subset of nodes. 1 5 1 15 10 1 5 15 5 10 Second player can guarantee 20, but not 25. 31Five representative problems Variations on a theme: independent set. Interval scheduling: O(n log n) greedy algorithm. Weighted interval scheduling: O(n log n) dynamic programming algorithm. k Bipartite matching: O(n ) maxflow based algorithm. Independent set: NPcomplete. Competitive facility location: PSPACEcomplete. 32
sharer
Presentations
Free
Document Information
Category:
Presentations
User Name:
Dr.AlexanderTyler
User Type:
Teacher
Country:
India
Uploaded Date:
21-07-2017