Greedy algorithm , the coin change problem proof

algorithmscomputer scienceproof-writing

How to proof that a greedy algorithm will work on this set of coins $ S = {1,2,3…K} $.
I haven't seen a proof on this type of sets but saw on this set $1,5,10$

Best Answer

The greedy algorithm will use $\lceil \frac nK\rceil$ coins. Any better method would use $r$ coins for some $r$ with $rK<n$, which is absurd.