










l 
Optimal
substructure:




n 
Given
an optimal subset A of items, if remove item




j,
remaining subset A’ = A{j} is optimal solution




to
knapsack problem (S’ = S{j}, W’ = W  w_{j})



l 
Key
insight is figuring out a formula for c[i,w],



value
of soln for items 1..i and max weight w:




n 
Time:
O(nW)



