Hello, my question is more about programing than
java in particular. I want to make a Java program that for given items that have a weight and a cost, fills a knapsack of capacity C with items that have exactly C weight (or as close to C as possible) with the minimum cost possible (each item can be selected only once). I want to use dynamic programing and I am having trouble finding the recursive relation for this problem. I found this article:
https://www.researchgate.net/publication/308337819_An_Effective_Dynamic_Programming_Algorithm_for_the_Minimum-Cost_Maximal_Knapsack_Packing but I cant understand the recursive relation and the pseudocode with all this mathematical bs... Can you describe what the recursive relation would be for this problem, or even provide some code? Thanks is advance!