# Giving change - what denominations guarantees an optimal greedy algorithm?

I was thinking about how giving change is a greedy algorithm for the optimal result, where the optimal result is getting the lowest amount of bills and coins possible. The algorithm I am referring to is where you go from the largest denomination to the smallest, at each point saying "how many of X bills can I give?", subtracting from the total, and moving down to the next bill.

However, this does not guarantee the optimal solution always.

A simple, constructed example is if your denominations are $1$ cent penny, $\$1.50$bill, and$\$2.00$ bill. If you want to give $\$3$change, this algorithm will make you end up getting a$\$2.00$ bill and $100$ pennies instead of $2$ $\$1.50\$ bills.

So, my question is, what properties of denominations makes this greedy algorithm effective?