I’ve run into a thinking trouble and I’m just frustrated. I have a working algorithm of the knapsack problem, using dynamic programming, where I specify
- Max load
- Items (their weight)
and the algorithm calculates the optimal fill of the knapsack using those items. But now I need to fill it completely, using least items, but I have unlimited amount of each item. (Those items have weights {1; w1; w2; ...} so it is always possible to complete).
How do I fit this in the ‘classic’ algorithm?
Thanks
Let