Found on a little knapsack problem

As we all know, knapsack problem is very important.


 

I believe most people are the first to write a backpack enumerated items, in fact, part of the backpack may also be the first enumeration volume .

For example 01 backpack, when the two-dimensional non-optimized, you can enumerate j, in the enumeration i, does not affect the outcome.

There are totally backpack (there are numerous items), can be optimized to enumerate j.

Whose real first enumeration i, j on essentially the same, you need to pay attention to the fact that in the calculation of this state, the previous state must be calculated until they have finished.

 


 

This finding has no effect, real water!

Guess you like

Origin www.cnblogs.com/yinyuqin/p/11220803.html