Boris has an incredible coin-changing machine. When he puts in a quarter, it returns five nickels; when he puts in a nickel, it returns five pennies; and when he puts in a penny, it returns five quarters. Boris starts with just one penny. Which of the following amounts could Boris have after using the machine repeatedly?
- A)$3.63
- B)$5.13
- C)$6.30
- D)$7.45
- E)$9.07
Answer
D
Key insight
Trading a quarter or a nickel keeps the money the same. Trading a penny adds exactly 124 cents. So any total is 1 cent more than a multiple of 124.
Solution
1. Watch what each trade does to the total amount of money, in cents.
- A quarter ( cents) becomes five nickels ( cents). No change.
- A nickel ( cents) becomes five pennies ( cents). No change.
- A penny ( cent) becomes five quarters ( cents). A gain of cents.
2. Boris starts with cent. Only the penny trade changes the total, and each time it adds . So his total is always
that is, more than a multiple of .
3. Subtract from each choice and see which result divides evenly by :
| choice | minus 1 | divided by 124 |
|---|---|---|
| remainder | ||
| remainder | ||
| remainder | ||
| exactly | ||
| remainder |
- Only works. It really can happen: he always has a penny available (break a quarter into nickels and a nickel into pennies if needed), so he can do the penny trade times.
The answer is .
Why this works
When a process has only a few kinds of moves, ask what each move does to one simple number, here the total in cents. Two moves leave it alone and one adds a fixed , so the total is always "start plus some number of 124s." That one fact rules out four choices without acting out a single trade.
The trap
Trying to act out the machine step by step, or checking whether a choice is a multiple of 124 instead of 1 more than a multiple of 124.
Concise solution
Track the total value in cents through each kind of exchange.
- Quarter in, five nickels out: , no change.
- Nickel in, five pennies out: , no change.
- Penny in, five quarters out: , a gain of .
So no matter what Boris does, his total is cents, where counts how many pennies he has fed in. Subtract from each choice and test divisibility by :
Only fits, with . (It is also reachable: each time, break a quarter into nickels and a nickel into pennies, then feed in a penny.)
The answer is .
Review in the AoPS books
- Introduction to Number Theory, Chapter 12: Introduction to Modular Arithmetic
- Intermediate Counting & Probability, Chapter 13: Events With States (§13.4)
- Introduction to Number Theory, Chapter 10: Units Digits
- Introduction to Number Theory, Chapter 14: Linear Congruences (§14.4)
Techniques
Use an invariant, parity, or coloring argument