Having a set of n-values, I need to divide these items into subsets that do not exceed the value (sum of all items) stipulated and assure me that the formation of the set is as close as possible to the stipulated value. >
For example, having a set of n-items that the total value is 100D, I want to create lists of these items that do not exceed the total value of 20D. In that case, the first set should offer me the items that its values are the best possible solution to reach the 20D.
I do not know if I'm being too confused, or prolix, in my problem. However, I need to fit performance and fulfillment of this requirement into this solution. I have already researched the backpack theorem and Ags to solve this problem, but I believe there is some simpler solution ...
Any suggestions?