文件名称:gale_shapley
介绍说明--下载内容来自于网络,使用问题请自行百度
稳定婚姻问题算法,给定n男n女,以及每个人对异性对象的喜好程度(按1至n排列)。安排男女结婚,使得不出现以下不稳定情形:
在n男n女中的存在两对夫妇(M, W)和(m, w),M男对w女喜好度大于现任妻子W女,并且w女对M男喜好度也大于现任丈夫m男。(In mathematics, economics, and computer science, the stable marriage problem (also stable matching problem or SMP) is the problem of finding a stable matching between two equally sized sets of elements given an ordering of preferences for each element. A matching is a mapping from the elements of one set to the elements of the other set. A matching is not stable if:
There is an element A of the first matched set which prefers some given element B of the second matched set over the element to which A is already matched, and
B also prefers A over the element to which B is already matched.
In other words, a matching is stable when there does not exist any match (A, B) by which both A and B would be individually better off than they are with the element to which they are currently matched.)
在n男n女中的存在两对夫妇(M, W)和(m, w),M男对w女喜好度大于现任妻子W女,并且w女对M男喜好度也大于现任丈夫m男。(In mathematics, economics, and computer science, the stable marriage problem (also stable matching problem or SMP) is the problem of finding a stable matching between two equally sized sets of elements given an ordering of preferences for each element. A matching is a mapping from the elements of one set to the elements of the other set. A matching is not stable if:
There is an element A of the first matched set which prefers some given element B of the second matched set over the element to which A is already matched, and
B also prefers A over the element to which B is already matched.
In other words, a matching is stable when there does not exist any match (A, B) by which both A and B would be individually better off than they are with the element to which they are currently matched.)
相关搜索: gale shapley
(系统自动生成,下载前可以参看下载内容)
下载文件列表
文件名 | 大小 | 更新时间 |
---|---|---|
gale_shapley1.1.py | 2235 | 2016-10-13 |
gale_shapley.py | 1761 | 2016-10-13 |
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.