Aspire's Library

A Place for Latest Exam wise Questions, Videos, Previous Year Papers,
Study Stuff for MCA Examinations - NIMCET

Previous Year Question (PYQs)



For a knapsack problem, $P$ and $W$ are profits and weights for a set of $7$ items as given below:

$P={9,5,2,7,6,16,9}$

$W={2,5,6,11,1,9,3}$
Find the optimal solution for fractional knapsack problem when its maximum capacity is $15$.





Solution

$P={9,5,2,7,6,16,9}$

$W={2,5,6,11,1,9,3}$

Find profit by weight ratio:

Item 5: $\frac{6}{1}=6$

Item 1: $\frac{9}{2}=4.5$

Item 7: $\frac{9}{3}=3$

Item 6: $\frac{16}{9}=1.77$

Now take items in decreasing ratio:

Total weight $=1+2+3+9=15$

Total profit $=6+9+9+16=40$

Correct option is:

$\boxed{(b)\ 40}$



Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More

Ask Your Question or Put Your Review.

loading...