Back to the 2025 paper
Similar questions
Design and Analysis of Algorithms Find the optimal solution using greedy criteria for a knapsack having capacity 100 kg for the following list of items having values and weights as shown in the table. | Item | Value | Weight | |---|---|---| | I_1 | 10 | 15 | | I_2 | 20 | 25 | | I_3 | 30 | 35 | | I_4 | 40 | 45 | | I_5 | 50 | 55 |20227mDesign and Analysis of Algorithms You are a thief planning to rob a jewelry store. The store contains 7 items, each with a profit P and weight W as follows: | Object | 1 | 2 | 3 | 4 | 5 | 6 | 7 | |---|---|---|---|---|---|---|---| | Profit (P) | 5 | 10 | 15 | 7 | 8 | 9 | 4 | | Weight (W) | 1 | 3 | 5 | 4 | 1 | 3 | 2 | You have a knapsack with a weight capacity of 15. Apply the step-by-step greedy approach to obtain the maximum profit.20237mDesign & Analysis of AlgorithmsExplain Knapsack Problem.20247mDesign & Analysis of AlgorithmsState the general Knapsack problem. Write a greedy algorithm for this problem and derive its time complexity.20237m