2

I have checked out the other questions (especially this one) but I don't think any of them really tackles my problem.

Let's say we have N number of Buckets (tagged with a number) each of them contains an finite and greater than 0 number of token M(i) (M can change between different buckets).

Each token has two properties x and y (you can think at them like real numbers). My problem is to find the configurations that satisfy:

1) Only one or zero element can be selected from each bucket.

2) each element selected in the final configuration must have x properties greater than an input value X.

3) the sum over all the element of the properties y in the final configuration must be greater or equal of an input value Y. However, removing any of the element in the final list must result in a sum strictly less than Y.

4) configuration with less element should be preferred

Now, it appears to me similar to the multiple constraint Knapsack problem, however, there are a couple of differences and I cannot really wrap my head around (mainly the buckets and condition 3).

Questions

Because, I don't want to reinvent the wheel.

Has my problem a name and an known solution?

If not, which one is the closest algorithm to start with? Am I missing something obvious to make my problem to fall back to the Knapsack one?

Note

Ideally, I am looking for a c++ (library/example/analysis), but I am happy to get references in any programming languages.

Community
  • 1
  • 1
Alessandro Teruzzi
  • 3,918
  • 1
  • 27
  • 41
  • I recommend a customized Mixed-Integer Programming formulation. For C++, there is GLPK and CBC, although the formulation might be more low-level style. What about a small example? It migh help to understand your problem. What is the use-case? The constraint on removing elements resulting in < Y sounds like there are many many infeasible instances. – sascha Jul 15 '16 at 19:21

0 Answers0