Re: o-1 Knapsack problem



Radha wrote:
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.


Try all possible subsets, and pick the one with the most profit.
.



Relevant Pages

  • Re: [UKSF XI] Gracious concession
    ... I look forward to working with the new Manager in whatever capacity he ... You're going to wait by the riverbank with a big sack, ...
    (uk.sport.football)
  • o-1 Knapsack problem
    ... n objects x1...xn, each having weight wi and profit pi, are to be ... algorithm that determines which objects should be placed in the sack ... inorder to maximize the profit. ...
    (comp.theory)