分配preferences [英] Allocating preferences

查看:113
本文介绍了分配preferences的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果n床将被分配给米people.Each可具有多个preferences与否preFER可言。如何满足最高的人。一个人谁了preference,得到了同样的将被计入一个满意的人。

If n beds are to be allocated to m people.Each may have multiple preferences or not prefer at all. How to satisfy maximum people. A person who had a preference and got the same will be accounted as a satisfied person.

我试过分配一个人用最小的preferences先用pferred最低$ P $床。有一些情况下,我缺少的,因为它给了我一个错误的答案?

I tried allocating a person with minimum preferences first with minimum preferred bed. Is there some case I am missing, because it gave me a wrong answer?

推荐答案

这是<一href="http://en.wikipedia.org/wiki/Matching_%28graph_theory%29#Maximum_matchings_in_bipartite_graphs"相对=nofollow>最大二分匹配的问题。 Wiki有良好的算法,也仰望最大流量

This is the maximum bipartite matching problem. Wiki has good algorithms, also look up maximum flow.

这篇关于分配preferences的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆