1

我有一个问题,我可以将其概念化如下:

我们有一组n个人。以及代表他们种族的m个子集,如白人、西班牙裔、亚洲人等。鉴于这些人的任意组合,我想检查它是否是一个多元化的群体。

多样化组是满足若干要求的组,每个要求的形式为“组中至少有Ki人属于子集Si ”。这是棘手的部分,一个人只能满足一个要求。例如,您不能将他/她用于多个要求。

一个例子:

鉴于:

至少有两个西班牙人= {a,b,c}

至少两个亚洲人={a,d,e}

组 {a,c,d} 是一个多元化的组吗?

{a,c,d} 组并不多样化,因为您不能将a算作西班牙裔和亚洲裔。但是,组 {a,c,d,e,f} 是多样化的,因为我们有两个西班牙裔 a 和 c 以及两个亚洲裔 d 和 e。

试图:

这是分配问题的一个例子。工作就是种族,我们可以根据要求放置尽可能多的种族。例如,如果我们需要两个西班牙裔,那么我们就放置两个西班牙裔工作。然而,只有一些人能够完成一项特定的工作。

这是我迄今为止的尝试:

我将构建一个二分图,一方面是人的集合P ,另一方面是种族的集合S。如果他/她属于种族,我们将在人p_i和种族S_i之间放置一个边缘。现在,我们将修改图形,为每个种族S_i复制它k_i次(S_{i,1}, S_{i,2}, ... , S_{i,k_i})。并相应地添加新边缘。求该图的最大匹配 M。

现在,将S_{i,j}合并到一个S_i中,你就有了一个多样化的组。然而,最大匹配只是该问题的可能解决方案。我的问题是一个决策问题,我想检查一个给定的组是否是一个解决方案。

4

1 回答 1

1

I think this is an instance of the http://en.wikipedia.org/wiki/Assignment_problem, usually described in terms of assigning people to jobs, so in your case the job is "sit there and look white" or "sit there and look hispanic". Only some people are qualified to do any particular job, and they can only do one job at a time.

Normally the assignment algorithm minimizes a cost, but you can just use cost 0/cost 1 for "is in the right ethnic group" or not.

One means of solving this is the http://en.wikipedia.org/wiki/Hungarian_algorithm. This is often presented for the case in which there are exactly as many workers as jobs, but you can always invent dummy jobs or dummy workers, with all costs associated with dummies the same cost, so that optimizing the problem with dummies reproduces exactly the relative order of costs you would get if you ignored assignments to dummies, and so the optimum with dummies is the same choice, after ignoring dummies, as the optimum without.

于 2013-03-14T20:32:51.203 回答