Questions: Greedy Algorithms

3 questions to test your understanding

Score: 0 / 3
Question 1 Multiple Choice

You have coins of denominations [1, 6, 10] and want to make change for 12. The greedy algorithm (always pick the largest coin that fits) returns [10, 1, 1] = 3 coins. What is the actual minimum?

A3 coins: [10, 1, 1]
B2 coins: [6, 6]
C2 coins: [10, 2] — but 2 doesn't exist
D4 coins: [1, 1, 1, 1, ...]
Question 2 True / False

If a problem has both the greedy-choice property and optimal substructure, then a greedy algorithm is guaranteed to find the global optimum.

TTrue
FFalse
Question 3 Short Answer

What is an exchange argument, and why is it used to prove greedy algorithms correct?

Think about your answer, then reveal below.