- #1
mathmari
Gold Member
MHB
- 5,049
- 7
Hey!
I am asked to state the two versions of the Knapsack problem and their differences. Could I formulate it as followed?? (Wondering)
The Knapsack problem is the following:
There are $n$ items, where the $i^{th}$ item has a benefit of $v_i$ and it has weight $w_i$.
We want to pick some items so that we maximize the total benefit while keeping the total weight of $W$.
The difference between the integer and the fractional version of the Knapsack problem is the following:
At the integer version we want to pick each item either fully or we don't pick it.
At the fractional version we can take a part of the item.
I am asked to state the two versions of the Knapsack problem and their differences. Could I formulate it as followed?? (Wondering)
The Knapsack problem is the following:
There are $n$ items, where the $i^{th}$ item has a benefit of $v_i$ and it has weight $w_i$.
We want to pick some items so that we maximize the total benefit while keeping the total weight of $W$.
The difference between the integer and the fractional version of the Knapsack problem is the following:
At the integer version we want to pick each item either fully or we don't pick it.
At the fractional version we can take a part of the item.