retagged by
580 views

1 Answer

1 votes
1 votes
Fractional Knapsack:

Under fractional knapsack prob, when we have to fit in a given object, then we take its fraction only, i.e. based on arrangement.The whole object is not considered. Only a portion/fraction of such object is considered.

0/1 Problem

This is bit diff from Fractional Knapsack. Either the object as a whole is taken or it is not to fit into the capacity of the given knapsack(bag). Once the limit is reached of the knapsack and it can't be filled more, then a 0 is used to indicate tat  it cud no longer be filled.

The basic difference between the two is that while fractional knapsack goes for a fraction of the object, the 0/1 knapsack goes for the object as a whole instead of going for its fraction. Hope  it helps u.

For more detailed explanation it is advisable to go for Sartaj Sahni, the book of algos. :)

Related questions

0 votes
0 votes
1 answer
1
0 votes
0 votes
1 answer
2
Parshu gate asked Nov 16, 2017
8,260 views
The following Knapsack bag. The Knapsack bag maximum Capacity is 50. Find out the maximum profit for Fractional Knapsack. PQRSTUVWWeight1812161416201015Profit341522161722...
0 votes
0 votes
1 answer
3
LavTheRawkstar asked Apr 15, 2017
3,953 views
Consider the following instance of the knapsack problem: n=3 , W=50 , (v1,v2,v3) = (60,100,120) and weight (w1,w2,w3) = (10,20,30) .solve the given knapsack problem apply...
1 votes
1 votes
1 answer
4
LavTheRawkstar asked Feb 28, 2017
13,099 views
Consider the Knapsack incidence with n=3(items) with weights {w1,w2,w3}={2,3,4} and profits are {p1,p2,p3}={1,2,5}Given the capacity is 5,{W/M = 5 } Find the optimal solu...