Aspire Faculty ID #18590 · Topic: UGC NET Computer Science Dec 2022 Shift I (Paper II) · Just now
UGC NET Computer Science Dec 2022 Shift I (Paper II)

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}$


What is the maximum value of items you can carry if maximum weight allowed is $25$ with a fractional knapsack?

Solution

Take items in decreasing profit by weight ratio:

Item 5: weight $1$, profit $6$

Item 1: weight $2$, profit $9$

Item 7: weight $3$, profit $9$

Item 6: weight $9$, profit $16$

Item 2: weight $5$, profit $5$

Total weight used:

$1+2+3+9+5=20$

Total profit:

$6+9+9+16+5=45$

Remaining capacity:

$25-20=5$

Next best item is item 4 with profit $7$ and weight $11$.

Fractional profit:

$5\times \frac{7}{11}=\frac{35}{11}=3.18$

Maximum profit:

$45+3.18=48.18\approx 48.1$

Correct option is:

$\boxed{(a)\ 48.1}$

Previous 10 Questions — UGC NET Computer Science Dec 2022 Shift I (Paper II)

Nearest first
1
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}$$…
Topic: UGC NET Computer Science Dec 2022 Shift I (Paper II)
2
 Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason R. A: Artifici…
Topic: UGC NET Computer Science Dec 2022 Shift I (Paper II)
3
Consider the following statements:A. For every regular language, we can design Turing Machine.B. For every context free…
Topic: UGC NET Computer Science Dec 2022 Shift I (Paper II)
4
The primary objectives of the SWE-IPT are to: A. Solicit stakeholder needs and expectations. B. Specify the software re…
Topic: UGC NET Computer Science Dec 2022 Shift I (Paper II)
5
Given below are the two statements:Statement I: Any retrieval request that is specified in the basic relational algebra…
Topic: UGC NET Computer Science Dec 2022 Shift I (Paper II)
6
A disk has $300$ cylinders $(0$ to $299)$. If the initial position of the read-write head is at cylinder $101$, moving …
Topic: UGC NET Computer Science Dec 2022 Shift I (Paper II)
7
Given below are the two statements: Statement I: The main objective for using virtual memory is to increase the effecti…
Topic: UGC NET Computer Science Dec 2022 Shift I (Paper II)
8
Which of the following is related to function of layers in a neural network? A. Information $\to$ Input layer $\to$ Hid…
Topic: UGC NET Computer Science Dec 2022 Shift I (Paper II)
9
 Arrange the following in the correct order with respect to key generation for RSA algorithm. A. Choose an integer…
Topic: UGC NET Computer Science Dec 2022 Shift I (Paper II)
10
The precedence of regular expression operators from lowest to highest precedence is:
Topic: UGC NET Computer Science Dec 2022 Shift I (Paper II)

Next 10 Questions — UGC NET Computer Science Dec 2022 Shift I (Paper II)

Ascending by ID
Ask Your Question or Put Your Review.

loading...