将人分成每组最多多样性的算法 [英] Algorithm to split people into groups with most diversity per group

查看:80
本文介绍了将人分成每组最多多样性的算法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要一种算法,可以将人们分组参加即将举行的会议.来自不同地区,部门,性别等的人很多,他们想尽可能地分散人员,以便在每个组中获得多样性.

I'd like an algorithm to put people into groups for an upcoming conference. There's lots of people going, from different regions, departments, genders etc, and they want to split people up as much as possible so get diversity in each group.

那么,(例如)Excel中是否有众所周知的算法甚至工具,或者某种可以解决此问题的东西,这必须很常见?

So is there either a well known algorithm or even tool in (say) Excel or something to solve this problem, which must be very common?

为简化问题,请说有n人(比方说100人)要分成g个组(例如6个),每组应有接近偶数的数字.

To simplify the problem say there are n people (say 100) To be split into g groups (say 6) and there should be as close to even number in each group.

它们有以下地区:伦敦,北部,中部地区,西部,苏格兰(主要是伦敦)

They have regions: London, North, Midlands, West, Scotland (mostly London)

性别:女性,男性,其他

Gender: Female, Male, Other

部门:销售,支持,管理

Departments: Sales, Support, Management

等级:6个不同的等级

其他信息每个类别中人员的比例不同,即销售量多于管理人员.

Additional info There are differing proportions of people in each category, i.e. more sales than management.

排序中可能有一个优先事项,他们希望性别平均分配比部门平均分配更多.

There probably is a priority in the ordering, they want an even gender split more than an even department split.

我使用C#工作,但很乐于阅读任何内容.

I work in C# but happy to read in anything.

谢谢!本

推荐答案

首先定义一个实用函数.我们想要一个准确但可以快速计算的人,那么与每个类别的实际比例相比,每个类别中的人群在一个组中的比例有多接近?

Lets first define a utility function. We want one that's accurate but quick to calculate, so how about how close the proportion of people of each category is in a group compared to the actual proportion of each category in total.

因此,如果一个8人一组中有5个男性,3个男性,4个销售人员和4个支持人员,但男性和女性的总人数相等,则销售人数占总人数的2/3,则其他1/3rd支持实用程序功能将-((5/8-1/2)+(3/8-1/2)+(4/8-2/3)+(4/8-1/3))

so if a group of 8 has 5 males, 3 males , 4 salespeople and 4 support, but there is an equal split of males and females in total, and 2/3rds the total number of people are sales, the other 1/3rd support the utility function will be -((5/8-1/2)+(3/8-1/2)+(4/8-2/3)+(4/8-1/3))

前面有一个负号的原因是这样,效用函数随多样性而增加.

The reason there is a minus in front is so that the utility function increases with diversity.

定义了效用函数后,有很多方法可以使用它,例如,包括模拟退火.但是,出于您的目的,我建议您使用随机重启的方式进行爬坡,因为我认为这样就足够了.

Once you've defined a utility function, there's a lot of ways to go about it, including simulated annealing for example. However for your purposes I recommend hill climbing with random restart, as I think it will be sufficient.

将人员随机分配到不同的组,然后计算效用函数.从一个组中随机选择一个人,然后从另一个组中随机选择另一个人,如果在您交换他们时实用程序会更高.继续交换一些回合(例如200),然后记录分配和实用程序功能.从新的随机分配重新开始,然后重复整个过程几次.选择效用最高的那个.

Randomly assign people to different groups, then calculate the utility function. Randomly select one person from 1 group and another from another group, and if the utility will be higher when you swap them do so. Continue swapping, for a number of rounds (eg,200), and then record the assignment and the utility function. Restart from a new random assignment, and repeat the whole process a few more times. Pick the one with the highest utility function.

如果不清楚,请让我澄清.

If that's not clear, ask me to clarify.

这篇关于将人分成每组最多多样性的算法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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