Solve the knapsack problem using memory functions.Item 1 2 3 4weight 2 6 4 8value (in rs.) 12 16 30 40knapsack capacity is given as w=12. Analyze the knapsack problem using memory functions with the help of the values given above.
Answers
Answered by
0
Explanation:
SOLUTION:
Let:-
☆Given N items with certain weights & values, to accommodate it into a bag of limited capacity W, so that total value of items in bag is maximum.☆
0/1 knapsack :--
☆0/1 knapsack problem solves it by either selecting each item as whole or none.☆
Fractional knapsack:-
☆Fractional knapsack solves it by allowing fraction of item to maximise the value.☆
☆I hope its help
Similar questions