Explain the greedy criterion. Apply greedy method for the following instance of knapsack problem

Explain the greedy criterion. Apply greedy method for the following instance of knapsack problem. Capacity of knapsack (M) = 5.

Answer:-

Greedy Criterion: By selecting items with the highest value-to-weight ratio, we ensure that the knapsack is filled in a way that maximizes its total value.

Leave a Reply

Your email address will not be published. Required fields are marked *