in reply to Re^2: knapsack problem solved by regex
in thread knapsack problem solved by regex
Cool. I knew (guessed) it was too easy, but it worked for several test sets. Thanks for the explanation.
Actually, scrap the above, because according to the wikipedia page,
The most common formulation of the problem is the 0-1 knapsack problem, which restricts the number xj of copies of each kind of item to zero or one.
So you can't have 2 of one item?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: knapsack problem solved by regex
by rubasov (Friar) on Mar 14, 2010 at 18:29 UTC | |
by BrowserUk (Patriarch) on Mar 14, 2010 at 18:34 UTC |