Assignment on Knapsack Problem Using Greedy Method. 1. A thief enters a house for robbing it. He can carry a maximal weight of 70 kg into his bag. There are 5 items in the house with the following weights and values. What items should thief take if he can even take the fraction of any item with him? Item Weight Value 1 5 30 2 10 40 3 20 45 4 22 77 5 30 90 2. Knapsack Capacity W = 30 Item A B C D Value 50 140 60 60 Size 5 20 10 12 3. Solve the Greedy Knapsack Problem Where m=10,n=4,P=(40,42,25,12), W=(4,7,5,3) ...
Comments
Post a Comment