linear optimization - the knapsack problem