So, I have a knapsack where a number of items that can be placed into the knapsack has a limit, while the amount of weight of the items also has a limit.
So given item limit 5, and weight 100: We would find the 5 items (can repeat 5x same item) that best fit weight 100.
I have solved both unbounded and bounded(each item has a limit, but the total amount of items used has no limit) in dynamic programming. But I'm a bit confused with how to do this new approach. Would this be a multidimensional knapsack problem, like volume and weight? But instead, we want item's used and weight? Or is it a 0-1 knapsack with alterations?
If anyone able to break this down into smaller logical steps or point me in the direction of some solid code to read (my google-fu is struggling to find solutions) that would be greatly appreciated.
Thank you for your time!