In United States, there are four common coins people carry,
\begin{align*} 1 \text{ Penny} &= \$0.01 \\ 1 \text{ Nickel} &= \$0.05 \\ 1 \text{ Dime} &= \$0.10 \\ 1 \text{ Quarter} &= \$0.25 \\ \end{align*}
Define making the exact change as not getting any coins back from the cashier, i. e., paying the fractional dollar in exact coins. E. g., one buys two gallons of milk for $\$10.19$ then making the exact change here means paying the fractional dollar as a dime, a nickel and four pence.
Some people (like myself) always pay the ceiling of the total bill and end-up with an ever increasing pile of coins under the armrest of their cars. To remedy that, I started thinking if I could assure myself of making the exact change each time, I will be better encouraged to actually take some of those coins with me.
Clearly, the more random coins one carries, the greater the probability of making the exact change but,
What is the least amount of pence, nickels, dimes and quarters that guarantees making any change exactly?
Taking a greedy approach, you can conclude that you need 3 quarters since if you needed four then you are paying in a dollar, 2 dimes since three means you can use a quarter, 1 nickel since two of them mean you can use a dime and 4 pence since five would mean you can use a nickel.
Now I want to prove this in a more algebraic way where 4 pence, 1 nickel, 2 dimes and 3 quarters fall out as a solution of something. Let $\lceil x_1\rceil, \lceil x_2\rceil, \lceil x_3\rceil, \lceil x_4\rceil$ be the number of pence, nickels, dimes and quarters then,
- Assume that we will on average need 2 of each type of coins.
- The coins will have to sum up to more than $\$0.98$ since otherwise we can't make $\$0.99$.
One way I have done it is using this system,
\begin{align*} x_1+x_2+x_3+x_4 &> 8 && \text{By assumption 1}\\ x_1+5x_2+10x_3+25x_4 &> 98 && \text{By observation 2}\\ x_1+x_2 &> 4 && \text{By assumption 1}\\ x_1+5x_2 &> 6 && \text{By an observation similar to 2}\\ \end{align*}
Solving this system does yield,
$$ \lceil x_1\rceil, \lceil x_2\rceil, \lceil x_3\rceil, \lceil x_4\rceil = 4, 1, 2, 3 $$
But I find this proof to be kinda hand-wavy and obvious in its reverse-engineering. Does someone see a better, more elegant algebraic/combinatoric proof here? Maybe something with the binomials or a generating function?