1. 一些算法问题
1.1 稳定匹配 Stable Matching Problem
GS算法 Propose-and-reject algorithm (GS algorithm)
伪码:
Initialize each person to be free.
while (some man is free and hasn't proposed to every woman) {
Choose such a man m
w = 1st woman on m's 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
}
时间复杂度:
O(n2n^2n2)
性质:
- M按喜好降序请求
- W匹配后无法自由,只能被交易
- 全部M和W都会匹配
- 无不稳定匹配
- 对M最优匹配
- 对W最差匹配
- 每次执行产生相同匹配
- W有可能通过假偏好表改良匹配
本文详细解析了稳定匹配问题中的GS算法(Propose-and-reject algorithm),包括其伪代码、时间复杂度、关键性质如M的最优匹配和W的最差匹配。讨论了匹配过程中的规则,以及W如何通过假偏好表改善匹配。
817

被折叠的 条评论
为什么被折叠?



