This is the knapsack problem. It is NP-hard. Were you to find a polynomial-time solution to it, you'd have basically solved all the hardest problems in computer science.
There are heuristic approaches that shoot for decent solutions that don't attempt or claim to be optimal solutions. If you follow the Google link above, you'll probably find some.
In reply to Re: Knapsack problem
by Zed_Lopez
in thread Knapsack problem
by stu96art
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |