Question: Q. 4 Consider a knapsack problem. We have given a knapsack of capacity M and objects 6 are present in two sets A and B.

 Q. 4 Consider a knapsack problem. We have given a knapsack

Q. 4 Consider a knapsack problem. We have given a knapsack of capacity M and objects 6 are present in two sets A and B. Each object of both sets has weight and profit corresponding to it. However, the objects are selected in sequence order. At first an object from set A then an object from set B and this order is repeated. Provide the solution to knapsack problem using Greedy method for the followings. Assume the fractional object selection is allowed. Capacity of the knapsack is 25, Set A: Object Al A2 A3 A4 A5 Weight 10 5 9 3 11 Profit 10028 16 71 14 Set B: Object B1 B2 B3 B4 B5 Weight 7 15 2 31 14 Profit 90 4 55 20041 Represent the knapsack diagrammatically showing which all objects are selected into it. Compute the maximum profit achieved

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!