Question: 1. Is selection sort a greedy algorithm? If so, describe all its characteristics (candidates, selection, solution, feasibility functions) 2. Suppose we are given coins worth

1. Is selection sort a greedy algorithm? If so, describe all its characteristics (candidates, selection, solution, feasibility functions)

2. Suppose we are given coins worth 30, 24, 12, 6, 3, and 1 units. Show that the greedy algorithm does not produce an optimal solution, even when unlimited supply of coins from each denomination is available. Hint: Give a counterexample!

3. Suppose we are given coins worth 50, 25, 20, 10, 5, 2.5, and 1 units. Prove or find a counterexample: When an unlimited supply of coins of each denomination is available, the greedy algorithm finds an optimal solution.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!