《算法-稳定匹配StableMatching》由会员分享,可在线阅读,更多相关《算法-稳定匹配StableMatching(22页珍藏版)》请在人人文库网上搜索。

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: 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 self-interest will prevent any applicant/hospital deal fro。

3、m being made.,4,Stable Matching Problem,Goal. Given n men and n women, find a suitable matching. Participants rate 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.,Zeus,Amy,Clare,Bertha,Yancey,Ber。

4、tha,Clare,Amy,Xavier,Amy,Clare,Bertha,1st,2nd,3rd,Mens Preference Profile,favorite,least favorite,Clare,Xavier,Zeus,Yancey,Bertha,Xavier,Zeus,Yancey,Amy,Yancey,Zeus,Xavier,1st,2nd,3rd,Womens Preference Profile,favorite,least favorite,5,Stable Matching Problem,Perfect matching: everyone is matched mo。

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

6、could each improve 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?,Zeus,Amy,Clare,Bertha,Yancey,Berth。

7、a,Clare,Amy,Xavier,Amy,Clare,Bertha,1st,2nd,3rd,Mens Preference Profile,Clare,Xavier,Zeus,Yancey,Bertha,Xavier,Zeus,Yancey,Amy,Yancey,Zeus,Xavier,1st,2nd,3rd,Womens Preference Profile,favorite,least favorite,favorite,least favorite,7,Stable Matching Problem,Q. Is assignment X-C, Y-B, Z-A stable? A. 。

8、No. Bertha and Xavier will hook up.,Zeus,Amy,Clare,Bertha,Yancey,Bertha,Clare,Amy,Xavier,Amy,Clare,Bertha,Clare,Xavier,Zeus,Yancey,Bertha,Xavier,Zeus,Yancey,Amy,Yancey,Zeus,Xavier,1st,2nd,3rd,1st,2nd,3rd,favorite,least favorite,favorite,least favorite,Mens Preference Profile,Womens Preference Profil。

9、e,8,Stable Matching Problem,Q. Is assignment X-A, Y-B, Z-C stable? A. Yes.,Zeus,Amy,Clare,Bertha,Yancey,Bertha,Clare,Amy,Xavier,Amy,Clare,Bertha,Clare,Xavier,Zeus,Yancey,Bertha,Xavier,Zeus,Yancey,Amy,Yancey,Zeus,Xavier,1st,2nd,3rd,1st,2nd,3rd,favorite,least favorite,favorite,least favorite,Mens Pref。

10、erence Profile,Womens Preference Profile,9,Stable Roommate Problem,Q. Do stable matchings always exist? A. Not obvious. Stable roommate problem. 2n people; each person ranks others from 1 to 2n-1. Assign roommate pairs so that no unstable pairs. Observation. Stable matchings do not always exist for 。

11、stable roommate problem.,B,Bob,Chris,Adam,C,A,B,D,D,Doofus,A,B,C,D,C,A,1st,2nd,3rd,A-B, C-D B-C unstableA-C, B-D A-B unstableA-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 ea。

12、ch person to be free. while (some man is free and hasnt proposed to every woman) Choose such a 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 。

13、m ,11,Proof 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. Claim. Algorithm terminates after at most n2 iterations of while loop. Pf. Each time through the whi。

14、le loop a man proposes to a new woman. There are only n2 possible proposals. ,n(n-1) + 1 proposals required,12,Proof of Correctness: Perfection,Claim. All men and women get matched. Pf. (by contradiction) Suppose, for sake of contradiction, that Zeus is not matched upon termination of algorithm. The。

15、n 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. ,13,Claim. No unstable pairs. Pf. (by contradiction) Suppose A-Z is an unstable pair: each prefers each other to partner in Gale-Shapley ma。

16、tching S*. Case 1: Z never proposed to A. Z prefers his GS partner to A. A-Z is stable. Case 2: Z proposed to A. A rejected Z (right away or later) A prefers her GS partner to Z. A-Z is stable. In either case A-Z is stable, a contradiction. ,Proof of Correctness: Stability,Bertha-Zeus,Amy-Yancey,S*,。

17、. . .,men propose in decreasingorder 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. Gale-Shapley algorithm. Guarantees to find a stable matching for any problem instance. Q. How to implement 。

18、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. Representing men and women. Assume men are named 1, , n. Assume women are named 1, , n. Engagements. Maintain a li。

19、st of free men, e.g., in a queue. Maintain two arrays wifem, and husbandw. set entry to 0 if unmatched if m matched to w then wifem=w and husbandw=m Men proposing. For each man, maintain a list of women, ordered by preference. Maintain an array countm that counts the number of proposals made by man 。

20、m.,16,Efficient Implementation,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.,for i = 1 to n inverseprefi = i,Amy prefers man 3 to 6since inverse3 inverse6,2,7,17,U。

21、nderstanding the Solution,Q. For 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? An instance with two stable matchings. A-X, B-Y, C-Z. A-Y, B-X, C-Z.,Zeus,Yancey,Xavier,A,B,A,1st,B,A,B,2nd,C,C,C,3rd,。

22、Clare,Bertha,Amy,X,X,Y,1st,Y,Y,X,2nd,Z,Z,Z,3rd,18,Understanding the Solution,Q. For 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 stabl。

23、e 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 is a stable matching! No reason to believe that man-optimal assignment is perfect, let alone stable. Simultaneously best for each and ev。

24、ery man.,19,Man Optimality,Claim. GS matching S* is man-optimal. Pf. (by contradiction) Suppose some man is paired with someone other than best partner. Men propose in decreasing order of preference some man is rejected by valid partner. Let Y be first such man, and let A be first validwoman that rejects him. Let S be a stable matching where A 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.,resident A unwilling towork in Cleveland,hospital X wants to hire 3 residents。

算法分析稳定匹配问题c语言,算法-稳定匹配StableMatching相关推荐

  1. 稳定伴侣问题c语言步骤,稳定匹配问题

    这是 Algorithm Design 一书开篇介绍的一个很有意思的问题 问题描述 有n个男人和n个女人(n>=2),每个男人对所有女人有一个好感度排名,每个女人对所有男人也有一个好感度排名.将 ...

  2. 数据结构与算法学习笔记15:最大流问题 / 二分图 / 有权无权二分图的匹配 / 匈牙利算法 / 银行家算法 / 稳定婚配

    数据结构与算法学习笔记15:最大流问题 / 二分图 / 有权无权二分图的匹配 / 匈牙利算法 / 银行家算法 / 稳定婚配 引入小题:最短路径 最大流问题(maximum flow problem) ...

  3. Ergo生态:首个算法稳定币SigmaUSD正式启动

    据Ergo平台官方消息,由Ergo平台社区开发者启动的算法稳定币SigmaUSD今日正式启动.SigmaUSD基于优于Maker DAO的AgeUSD算法稳定币协议,也是Ergo平台上的首个算法稳定币 ...

  4. 算法稳定币项目Basis Cash将于2月7日启动V2迁移计划

    官方消息,算法稳定币项目Basis Cash公布V2迁移计划,将于 UTC 时间2021年2月7日0:00 开始进行代币迁移,迁移将开放15天直到2月22日0:00.在迁移窗口期间,用户将必须手动将其 ...

  5. YFI与Curve合作项目初始支持6种算法稳定币

    1月19日,根据yearn.finance官方公布的内容,yearn.finance和Curve的合作项目crv.finance主要针对算法稳定币.该项目支持用户在Curve.fi上使用任何稳定币和3 ...

  6. 基于Tezos的算法稳定币Kolibri启动测试版

    据官方消息,基于Tezos的算法稳定币Kolibri宣布启动测试版,同时启动KolibriDiscord频道.用户可基于Kolibri上的智能合约抵押XTZ代币发行无需信任的算法稳定币kUSD,与美元 ...

  7. 字符串括号匹配c语言,数据结构C语言括号的检验源程序 , 数据结构(C) 请用类C语言实现括号匹配的检验这个算法...

    问题标题 数据结构C语言括号的检验源程序 , 数据结构(C) 请用类C语言实现括号匹配的检验这个算法 2019-8-21来自ip:13.149.196.77的网友咨询 浏览量:270 手机版 问题补充 ...

  8. [Algorithms] Gale-Shapley算法(婚姻匹配问题,高考录取机制)

    盖尔-沙普利算法(Gale-Shapley) 简称"GS算法",也称为延迟接受算法.是盖尔和沙普利为了寻找一个稳定匹配而设计出的市场机制. 稳定婚配问题 这是GS算法主要的应用领域 ...

  9. 算法与数据结构c语言版PPT,C语言算法与数据结构.ppt

    C语言算法与数据结构.ppt 第十二章 算法与数据结构12.1 算法的基本概念,该节知识点所占试题比重为12,属于重点考查对象,基本上每次必考,主要考查算法的定义和对算法复杂度的理解.历次试题分值在0 ...

  10. c语言婚姻管理程序,C语言实现婚姻匹配有关问题

    C语言实现婚姻匹配问题 最近因为课程需要,看了看婚姻稳定匹配问题,用了两天把代码写完了. 具体问题就不详细写了,这里给出参看的网址. EOJ上面的问题叙述:http://202.120.106.94/ ...

最新文章

  1. 用Python解“打印九九乘法表”题
  2. Alphabet以3.8亿美元收购董事格林创业公司Bebop
  3. 计算机是怎样知道屏幕位置的,如何看自己的电脑显示器是多少寸
  4. build vue 选哪个_分析vue-cli项目,简单修改,来快速理解这个项目的结构
  5. Linux 文件系统与设备文件系统 (二)—— sysfs 文件系统与Linux设备模型
  6. xshell部署web项目_前端轻量化部署脚手架实践
  7. html5 中keygen用法,HTML5: keygen 标签
  8. 让系统自动登录的方法
  9. 关于sqlmap的配置和基本使用教程
  10. 三句话教你买对房子!买到好房子的都祝福哥三年内赚两个亿!
  11. hadoop大数据平台_Hadoop之外的3个大数据平台
  12. 侧信道实验实验二 S盒DPA侧信道攻击
  13. 公式法求主合取范式和主析取范式的一种思路
  14. 《密码法》之商用密码应用安全性评估----六问
  15. 神奇的月食画面 超级血月出现天文迷大兴奋
  16. APK获取包名的办法
  17. mercury重置密码后服务器无响应,melogin.cn打不开的解决办法 水星路由器重置完无法上网...
  18. H5网页开发新手入门-H5网页如何适应不同手机屏幕分辨率?
  19. 【Leetcode】1905. Count Sub Islands
  20. 王东岳《东西方文化溯源与东西方哲学》

热门文章

  1. python群发邮件 不进垃圾箱_邮件群发不进垃圾箱
  2. html文字发亮_CSS3字体发光效果
  3. js解决m3u8视频无法播放问题
  4. 格式化移动硬盘或者U盘,并设置为NTFS格式
  5. bugku 抄错的字符
  6. C语言入门(一)——程序的基本概念
  7. MAVEN 引入jar包没问题,但是程序中使用jar中的类报错的坑
  8. 天正菜单栏不见了怎么显示出来_天正CAD中菜单栏不见了如何调出来?
  9. 《Two-Archive Evolutionary Algorithm for Constrained Multiobjective Optimization》阅读笔记
  10. jquery实现回到顶部和回到底部