[snip] This *IS* the knapsack problem. Just because you specify date ranges to get your values and the value isn't a knapsack doesn't change the fact that it is the same problem :) I remember having fun with genetic algorithms and the knapsack problem back in University. [/snip] You're right save for the knapsack problem considered not only volume, but value as well. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php