MHB Versions of the Knapsack problem

  • Thread starter Thread starter mathmari
  • Start date Start date
mathmari
Gold Member
MHB
Messages
4,984
Reaction score
7
Hey! :o


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.
 
Physics news on Phys.org
With what type of programming can each of the two versions be solved?

Which of the two versions has the optimal substructure property ?

Which of the two versions has the greedy choice property ?
For the greedy choice property I thought the following:

Wir choose at each step the "best" item, which is the one with the greatest benefit and the smallest weight. We do the same choice until the Knapsack is full or there aren't any objects that fill in the Knapsack.

Is this correct? The optimal substructure property means that each subproblem we have the optimal solution.

Right? But how can we check which of the versions has these properties?
 
Namaste & G'day Postulate: A strongly-knit team wins on average over a less knit one Fundamentals: - Two teams face off with 4 players each - A polo team consists of players that each have assigned to them a measure of their ability (called a "Handicap" - 10 is highest, -2 lowest) I attempted to measure close-knitness of a team in terms of standard deviation (SD) of handicaps of the players. Failure: It turns out that, more often than, a team with a higher SD wins. In my language, that...
Hi all, I've been a roulette player for more than 10 years (although I took time off here and there) and it's only now that I'm trying to understand the physics of the game. Basically my strategy in roulette is to divide the wheel roughly into two halves (let's call them A and B). My theory is that in roulette there will invariably be variance. In other words, if A comes up 5 times in a row, B will be due to come up soon. However I have been proven wrong many times, and I have seen some...

Similar threads

Replies
11
Views
2K
Replies
1
Views
1K
Replies
30
Views
5K
Replies
14
Views
4K
Replies
1
Views
2K
Replies
20
Views
3K
Back
Top