1

This is a problem that involves matching students with various skills into groups so that there are as many groups as possible while ensuring that each group has certain skills present. I've reduced it to this:

  1. Given a set of $N$ people with $S$ skills where $A_{n,s}$ is the quantity of skill $s$ that person $n$ has.
  2. Group the $N$ people into as many groups as possible, such that there are no more than $G$ people in any group, and so that the sum of each skill in each group is at least $B_s$.

Constraints: $N, S, G < 100$ and $A_{n,s}, B_s < 10$

I haven't been able to come up with a better solution that a brute force so far. Would be very keep for some pointers as to what I should be searching for to find an algorithm for this class of problem.

D.W.
  • 167,959
  • 22
  • 232
  • 500
thomasfedb
  • 113
  • 4

1 Answers1

3

I suggest expressing this as an instance of integer linear programming (ILP). Express boolean logic operations in zero-one integer linear programming (ILP) might be useful to you in figuring out how to do that.

In particular, introduce zero-or-one variables $x_{n,j}$, which is one if person $n$ is placed into group $j$, or zero otherwise. You can now express each of your requirements as a linear inequality, and then use an ILP solver to test for feasibility. Now do binary search (or simple iterative search) over the number of groups, to find the maximum number of groups for which you can find a feasible solution.

D.W.
  • 167,959
  • 22
  • 232
  • 500