Re: Python knapsack problem

2009-02-13 Thread Terry Reedy
Kurioz wrote: I got the assignment to solve the knapsack problem in Python. I have to find the solution to put items in a sack (I have only one item A, B and C) which maxWeight can't be larger than 6 kilograms. Solution of this problem should be A and C but the only solution I'm getting is B

Re: Python knapsack problem

2009-02-13 Thread Matimus
On Feb 13, 8:06 am, "Kurioz" wrote: > Hi, > > I got the assignment to solve the knapsack problem in Python. I have to find > the solution to put items in a sack (I have only one item A, B and C) which > maxWeight can't be larger than 6 kilograms.  Solution of this problem should > be A and C but t

Python knapsack problem

2009-02-13 Thread Kurioz
Hi, I got the assignment to solve the knapsack problem in Python. I have to find the solution to put items in a sack (I have only one item A, B and C) which maxWeight can't be larger than 6 kilograms. Solution of this problem should be A and C but the only solution I'm getting is B and C whic