You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are $n$ distinct items and a knapsack of capacity $W$. Each item has 2 attributes, weight ($w_{i}$) and value ($v_{i}$).
14
-
It is required to select a number of items to put into the knapsack such that the total weight does not exceed the capacity and the total value is maximized.
14
+
You have to select a subset of items to put into the knapsack such that the total weight does not exceed the capacity $W$ and the total value is maximized.
15
15
16
16
In the above example, since each object has only two possible states (taken or not taken),
17
17
correspoding to binary 0 and 1, this type of problem is called "0-1 knapsack problem".
0 commit comments