dynamic programming - For 0/1 classic kanpsack with 1 bag ( capacity: 2V) or 2 bags (each capacity: V), which choice is better? -
i think variant of classic 0/1 knapsack problem. say, assume plan steal treasure given capacity limit(say 2v). given capacity limit, have 2 choices: 1 bag capacity 2v, or 2 bags capacity v sepetately. there mathmatical formula can use pre-compute solution better(give better optimal value)? or have compute optimal value seperately via different recurrence regulation , choose better one?
more over, can generalize problem one: given capacity limit(v), can take 1 bag capcity v or take k bags capcity v/k conduct stealing. , eonchoose best 1 solve problem
one bag better. content of n bags solution can fit 1 bag, not vice versa.
Comments
Post a Comment