I have a list of 365 customers. Each of them has a potentially unique list of products they are allowed to order, up to 18 out of 24 total products (at present). I would like to
Thanks to Anon and Gordon Linoff, and much googling on my own: this is an example of the set-cover problem, or perhaps even more difficult, and solving this is just not worth it. We will go with the 24 groups solution with some users being a member of 18 groups at a time. This is known to be far from minimal but it will work and that's all we need. Only the input phase requires care.