Why swap the item order of the knapsack lead to the same solution?

Viewed 529

As far as I know, knapsack problem uses dynamic programming to find the best solution of each item depending on its previous items. This hypothesis assumes that the solution is depending on the order of items. Why the final solution is not depend on the order?

1 Answers
Related