recategorized by
7,338 views
1 votes
1 votes

Consider the fractional knapsack instance

$n = 4, (p_{1} , p_{2} , p_{3} , p_{4} ) = (10, 10, 12, 18), (w_{1} , w_{2} , w_{3} , w_{4} ) = (2, 4, 6, 9)$ and $M = 15$.

The maximum profit is given by (Assume $p$ and $w$ denotes profit and weight of objects respectively)

  1. $40$
  2. $38$ 
  3. $32$
  4. $30$ 
recategorized by

2 Answers

3 votes
3 votes
p1/w1 5
p2/w2 2.5
p3/w3 2
p4/w4 2

now select the one which has max(p/w) ratio

that is p1/w1=5 so select 10

next   p2/w2=2.5  select 10

now p3/w3 and p4/w4 has same ratio but p4 gives maximum profit so select p4

therefore the total weight=(2+4+9)=15 and max profit=10+10+18=38

Answer:

Related questions

0 votes
0 votes
1 answer
1
0 votes
0 votes
1 answer
3
Parshu gate asked Nov 16, 2017
8,259 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
4
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...