156 reputation
2
bio website
location United States
age
visits member for 3 years
seen Mar 17 at 13:29

Jun
29
comment Converting a bounded knapsack problem to 0/1 knapsack problem
Where did you get the if statement: 'if (w-weights[i]==0 or t) and (K[i][w]==0 or t+values[i] < K[i][w]):' ? If forget now the source of my DP algorithm, but I had no zero checks, only check for '(t+value[i] < K[i][w])'
Jun
29
awarded  Nice Question
Dec
10
comment Converting a bounded knapsack problem to 0/1 knapsack problem
Yup, that is exactly what I doing to fill out weight and value. I was computing for max value, rather than min. I just now changed the code to compute for min as you suggested, and initialized row 0 of the DP table to be the MAXINT. Still the same result, dynamic programming solution for knapsack problems still ends up picking 6+3+3+3 instead of 10+3+2 or 7+6+2.
Nov
3
comment The dreaded C# programming interview test - any advice?
Is this a C# language test, or a .NET Framework test?
Oct
31
comment Converting a bounded knapsack problem to 0/1 knapsack problem
I was torn between the generic stackoverflow, and here. Reading the FAQ's on both sites, this site list data structures and algorithms first. Reading the FAQ for the math site, it seemed to be suggest asking at cstheory site instead.
Oct
31
awarded  Student
Oct
31
asked Converting a bounded knapsack problem to 0/1 knapsack problem