[algogeeks] 0-1 knapsack problem: uniqueness of optimal solutions

2010-07-15 Thread Greg
Hello: This is a problem in theoretical computer science and algorithms. When solving the 0-1 knapsack problem using dynamic programming, how can you use the resulting table to determine whether the optimal solution is unique? The problem is the following: A thief is going to steal some items

[algogeeks] 0-1 Knapsack Problem

2006-02-20 Thread shooshweet
n objects x1...xn, each having weight wi and profit pi, are to be placed into a sack with capacity M. Can somebody please help me write a algorithm that determines which objects should be placed in the sack inorder to maximize the profit. --~--~-~--~~~---~--~~