Professional Documents
Culture Documents
DAA Module 2
DAA Module 2
DAA Module 2
KNAPSACK PROBLEM:
Out of three feasible solutions, solution 4 yields maximum profit. This solution is an optimal solution for
a given problem. All the solutions are shown below.
2st Feasible solution: Select the objects according to decreasing order of their profits.
4th Feasible solution: Select the objects according to decreasing order of their profit/weight(pi/wi)
PRIM’S ALGORITHM: