Knapsack problem BB method