选择公平的团队-并用数学来证明这一点 [英] Picking fair teams - and the math to prove it

查看:57
本文介绍了选择公平的团队-并用数学来证明这一点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

应用程序:类似于挑选运动场团队.

Application: similar to picking playground teams.

我必须将按顺序排列的n个元素的集合划分为n/2的两个团队.团队必须尽可能平均".如上所述,在运动队方面考虑偶数".排名表明相对的技能"或价值水平.元素#1值得1个点",元素#2值得2个,依此类推.没有其他约束.

I must divide a collection of n sequentially ranked elements into two teams of n/2. The teams must be as "even" as possible. Think of "even" in terms of playground teams, as described above. The rankings indicate relative "skill" or value levels. Element #1 is worth 1 "point", element #2 is worth 2, etc. No other constraints.

因此,如果我有一个集合[1,2,3,4],则需要两个由两个元素组成的团队.可能性是

So if I had a collection [1,2,3,4], I would need two teams of two elements. The possibilities are

[1,2]& [3,4]

[1,2] & [3,4]

[1,3]& [2,4]

[1,3] & [2,4]

[1,4]& [2,3]

[1,4] & [2,3]

(顺序并不重要.)

在这种情况下,第三个选项似乎是最好的.但是我怎样才能最好地评估更大的集合呢?平均值/均值是一种方法,但是对于以下候选对,其结果将保持相同的排名,否则看起来是不均衡的:

Looks like the third option is the best in this case. But how can I best assess larger sets? Average/mean is one approach, but that would result in identical rankings for the following candidate pair which otherwise seem uneven:

[1,2,3,4,13,14,15,16]& [5,6,7,8,9,10,11,12]

[1,2,3,4,13,14,15,16] & [5,6,7,8,9,10,11,12]

我可以使用蛮力评估我的问题领域的所有候选解决方案.

I can use brute force to evaluate all candidate solutions for my problem domain.

是否可以使用一些数学/统计方法来验证两个团队的均匀性"?

Is there some mathematical/statistical approach I can use to verify the "evenness" of two teams?

谢谢!

推荐答案

您的第二个较长示例对我来说似乎并不平衡(或不公平).实际上,它符合您认为是第一个示例的首选答案.

Your second, longer example, does not seem uneven (or unfair) to me. In fact, it accords with what you seem to think is the preferred answer for the first example.

其中存在与问题无关的与编程无关的小结.您所拥有的是序数,而您想要的是基数.要将前者变成后者,您必须定义自己的映射,没有通用的现成方法.

Therein lies the non-programming-related nub of your problem. What you have are ordinal numbers and what you want are cardinal numbers. To turn the former into the latter you have to define your own mapping, there is no universal, off-the-shelf approach.

例如,您可以依次比较2个集合中的每个元素,例如a1 vs b1, a2 vs b2, ...,并且如果a优于b的情况数目与案例数目大致相同,则认为这些集合足够均匀b比a好.

You might, for example, compare each element of the 2 sets in turn, eg a1 vs b1, a2 vs b2, ... and regard the sets as even enough if the number of cases where a is better than b is about the same as the number of cases where b is better than a.

但是对于您的应用程序,我认为您不会比使用游乐场算法做得更好,每个团队负责人都选择最佳的未选球员,然后轮流选择其他人.为什么您需要更复杂的东西?

But for your application, I don't think you will do better than use the playground algorithm, each team leader chooses the best unchosen player and turns to choose alternate. Why do you need anything more complicated ?

这篇关于选择公平的团队-并用数学来证明这一点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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