A Piece of the Pi: mathematics explained

A Piece of the Pi: mathematics explained

The best denominations for coins

and how many to keep in your wallet

Richard Green's avatar
Richard Green
Jul 07, 2023
∙ Paid

What is the best way to give change so as to minimize the number of coins used? The obvious way to do this using the widely used coins in the US (25, 10, 5, and 1 cent) is to use the greedy algorithm. This works as follows: start with the largest value coin, keep giving that coin until the amount left is less than the value of the coin, then move to the…

User's avatar

Continue reading this post for free, courtesy of Richard Green.

Or purchase a paid subscription.
© 2026 A Piece of the Pi · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture