nested knapsack