in reply to Geometric Optimisation and Perl

this sounds like the knapsack problem. a google search or a supersearch here should help, this question comes up a lot!