Question: Subject:Design and Analysis of an algorithm Question 8: [Marks: 06+01+01+02 = 10] Your friend Ali is coming home from Dubai and wants to pack his

Subject:Design and Analysis of an algorithm
Question 8: [Marks: 06+01+01+02 = 10] Your friend Ali is coming home from Dubai and wants to pack his bag that gives him maximum benefit. He has one bag with capacity W=13 and he want to utilize that to carry maximum number of items with overall best benefit in terms of value. He is having trouble filling the bag to maximize benefit. He has called you for some provide him a quick solution to his problem. Following table shows the list of 6 items (i) along with corresponding weights (w;) and values (b;). Help him out in getting the maximum benefit out of it as you yourself want maximum value gifts from him. Wi (weight of ith item) 5 4 Item # 1 12 13 14 15 16 7 b (value of ith item) 9 6 7 4 3 5 3 1 2 a) What is the maximum value/benefit (B) that can be achieved? b) Item number/s that can be added in the bag to achieve the above max value benefit (B)? c) If an item 17 is introduced with w7 = 2 and bz = 7. What effect would this item have on the value of B? Show your working. OR Consider the diagram in Q10 as an undirected weighted graph where In is a node and out is also a node. The edges where the weight is not mentioned, write the weight same as the node they are connecting to, e.g: the weight of an edge joining from node 7 to node 4 will be 4 and so on. Then apply any Minimum Spanning Tree algorithm to make a minimum spanning tree from the graph showing all working and cost of the tree. [10] Ac GO
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
