算法-穩(wěn)定匹配StableMatchingPPT課件_第1頁
算法-穩(wěn)定匹配StableMatchingPPT課件_第2頁
算法-穩(wěn)定匹配StableMatchingPPT課件_第3頁
算法-穩(wěn)定匹配StableMatchingPPT課件_第4頁
算法-穩(wěn)定匹配StableMatchingPPT課件_第5頁
已閱讀5頁,還剩18頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)

文檔簡介

1、1 Salute Lloyd Shapley Lloyd Stowell Shapley (June 2, 1923 March 12, 2016) 1980 Nobel Memorial Prize in Economic Sciences(2012) Stable Matching 3 Matching Residents to Hospitals Goal. Given a set of preferences among hospitals and medical school students, design a self-reinforcing admissions process

2、. Unstable pair: applicant x and hospital y are unstable if: nx prefers y to its assigned hospital. ny prefers x to one of its admitted students. Stable assignment. Assignment with no unstable pairs. nNatural and desirable condition. nIndividual self-interest will prevent any applicant/hospital deal

3、 from being made. 4 Stable Matching Problem Goal. Given n men and n women, find a suitable matching. nParticipants rate members of opposite sex. nEach man lists women in order of preference from best to worst. nEach woman lists men in order of preference from best to worst. ZeusAmyClareBertha Yancey

4、BerthaClareAmy XavierAmyClareBertha 1st2nd3rd Mens Preference Profile favoriteleast favorite ClareXavierZeusYancey BerthaXavierZeusYancey AmyYanceyZeusXavier 1st2nd3rd Womens Preference Profile favoriteleast favorite 5 Stable Matching Problem Perfect matching: everyone is matched monogamously. nEach

5、 man gets exactly one woman. nEach woman gets exactly one man. Stability: no incentive for some pair of participants to undermine assignment by joint action. nIn matching M, an unmatched pair m-w is unstable if man m and woman w prefer each other to current partners. nUnstable pair m-w could each im

6、prove by eloping. Stable matching: 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. 6 Stable Matching Problem Q. Is assignment X-C, Y-B, Z-A stable? ZeusAmyClareBertha YanceyBerthaClareAmy XavierA

7、myClareBertha 1st2nd3rd Mens Preference Profile ClareXavierZeusYancey BerthaXavierZeusYancey AmyYanceyZeusXavier 1st2nd3rd Womens Preference Profile favoriteleast favoritefavoriteleast favorite 7 Stable Matching Problem Q. Is assignment X-C, Y-B, Z-A stable? A. No. Bertha and Xavier will hook up. Ze

8、usAmyClareBertha YanceyBerthaClareAmy XavierAmyClareBertha ClareXavierZeusYancey BerthaXavierZeusYancey AmyYanceyZeusXavier 1st2nd3rd1st2nd3rd favoriteleast favoritefavoriteleast favorite Mens Preference ProfileWomens Preference Profile 8 Stable Matching Problem Q. Is assignment X-A, Y-B, Z-C stable

9、? A. Yes. ZeusAmyClareBertha YanceyBerthaClareAmy XavierAmyClareBertha ClareXavierZeusYancey BerthaXavierZeusYancey AmyYanceyZeusXavier 1st2nd3rd1st2nd3rd favoriteleast favoritefavoriteleast favorite Mens Preference ProfileWomens Preference Profile 9 Stable Roommate Problem Q. Do stable matchings al

10、ways exist? A. Not obvious. Stable roommate problem. n2n people; each person ranks others from 1 to 2n-1. nAssign roommate pairs so that no unstable pairs. Observation. Stable matchings do not always exist for stable roommate problem. B Bob Chris AdamC A B D D DoofusABC D C A 1st2nd3rd A-B, C-D B-C

11、unstable A-C, B-D A-B unstable A-D, B-C A-C unstable 10 Propose-and-reject algorithm. Gale-Shapley 1962 Intuitive method that guarantees to find a stable matching. Propose-And-Reject Algorithm Initialize each person to be free. while (some man is free and hasnt proposed to every woman) Choose such a

12、 man m w = 1st woman on ms list to whom m has not yet proposed if (w is free) assign m and w to be engaged else if (w prefers m to her fianc m) assign m and w to be engaged, and m to be free else w rejects m 11 Proof of Correctness: Termination Observation 1. Men propose to women in decreasing order

13、 of preference. Observation 2. Once a woman is matched, she never becomes unmatched; she only trades up. Claim. Algorithm terminates after at most n2 iterations of while loop. Pf. Each time through the while loop a man proposes to a new woman. There are only n2 possible proposals. Wyatt Victor 1st A

14、 B 2nd C D 3rd C B AZeus Yancey XavierC D A B B A D C 4th E E 5th A D E E D C B E Bertha Amy 1st W X 2nd Y Z 3rd Y X VErika Diane ClareY Z V W W V Z X 4th V W 5th V Z X Y Y X W Z n(n-1) + 1 proposals required 12 Proof of Correctness: Perfection Claim. All men and women get matched. Pf. (by contradic

15、tion) nSuppose, for sake of contradiction, that Zeus is not matched upon termination of algorithm. nThen some woman, say Amy, is not matched upon termination. nBy Observation 2, Amy was never proposed to. nBut, Zeus proposes to everyone, since he ends up unmatched. 13 Claim. No unstable pairs. Pf. (

16、by contradiction) nSuppose A-Z is an unstable pair: each prefers each other to partner in Gale-Shapley matching S*. nCase 1: Z never proposed to A. Z prefers his GS partner to A. A-Z is stable. nCase 2: Z proposed to A. A rejected Z (right away or later) A prefers her GS partner to Z. A-Z is stable.

17、 nIn either case A-Z is stable, a contradiction. Proof of Correctness: Stability Bertha-Zeus Amy-Yancey S* . . . men propose in decreasing order of preference women only trade up 14 Summary Stable matching problem. Given n men and n women, and their preferences, find a stable matching if one exists.

18、 Gale-Shapley 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? 15 Efficient Implementation Efficient implementation. We describe O(n2) time implementation. Repres

19、enting men and women. nAssume men are named 1, , n. nAssume women are named 1, , n. Engagements. nMaintain a list of free men, e.g., in a queue. nMaintain two arrays wifem, and husbandw. set entry to 0 if unmatched if m matched to w then wifem=w and husbandw=m Men proposing. nFor each man, maintain

20、a list of women, ordered by preference. nMaintain an array countm that counts the number of proposals made by man m. 16 Efficient Implementation Women rejecting/accepting. nDoes woman w prefer man m to man m? nFor each woman, create inverse of preference list of men. nConstant time access for each q

21、uery after O(n) preprocessing. for i = 1 to n inverseprefi = i Pref 1st 8 2nd 7 3rd 3 4th 4 5th 1526 6th7th8th Inverse4th2nd8th6th5th7th1st3rd 12345678 Amy Amy Amy prefers man 3 to 6 since inverse3 inverse6 27 17 Understanding the Solution Q. For a given problem instance, there may be several stable

22、 matchings. Do all executions of Gale- Shapley yield the same stable matching? If so, which one? An instance with two stable matchings. nA-X, B-Y, C-Z. nA-Y, B-X, C-Z. Zeus Yancey Xavier A B A 1st B A B 2nd C C C 3rd Clare Bertha Amy X X Y 1st Y Y X 2nd Z Z Z 3rd 18 Understanding the Solution Q. For

23、 a given problem instance, there may be several stable matchings. Do all executions of Gale- Shapley yield the same stable matching? If so, which one? Def. Man m is a valid partner of woman w if there exists some stable matching in which they are matched. Man-optimal assignment. Each man receives best valid partner. Claim. All executions of GS yield man-optimal assignment, which

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論