假设我有一个 50 人的小组,我可以量化他们彼此的了解程度(即 0 到 100 之间的整数)。我想以一种最多样化的方式创建 10 个团队(团队成员彼此“最少”了解)。
在理想情况下,我希望最终得到一个 Python 算法,它根据熟悉度图输入为新团队提供成员列表。
我尝试寻找相应的组合学/图论部分、Python 包,但无法找到它。
这里有一个算法可以做你想做的事。 您应该编写代码来实现它。 如果您在编写代码时遇到问题,请询问。 (编程问题就是这个网站的主题)
List all the possible 10 teams combinations ( binomial coefficient )
Score the amount of familiarity in each team
Select the team with the least familiarity