Hamilton 2016 Q3
3. Alex is given £1 by his grandfather and decides:
He only decides how to spend the rest of the money when he gets to the shop, but he spends all of the £1 on toffees, packs of bubblegum and jellybeans.
What are the possibilities for the number of jellybeans that he buys?
Hamilton Olympiad 2016, Question 3. © UK Mathematics Trust. Original paper on ukmt.org.uk
Answer: a number from 5 to 16, or 19
It follows from decision (i) that Alex spends at least 35p on toffees; it follows from decision (ii) that he spends at least 27p on bubblegum; and it follows from decision (iii) that he spends at least 10p on jellybeans. Therefore, out of the total £1 that he will spend, he has to decide how to spend 28p.
He may spend the whole 28p on jellybeans, which is an extra 14 jellybeans.
He cannot spend 26p or 24p on jellybeans, because he cannot spend the remaining money (2p or 4p) on the other items.
But he may spend any even amount from 22p downwards on jellybeans, since the remaining money would then be an even amount from 6p to 28p, and he is able to spend this on toffees or bubblegum (or both), as the following table shows.
| Remaining money | Toffees at 5p | Bubblegum at 3p |
| 6p | 0 | 2 |
| 8p | 1 | 1 |
| 10p | 2 | 0 |
| 12p | 0 | 4 |
| 14p | 1 | 3 |
| 16p | 2 | 2 |
| 18p | 0 | 6 |
| 20p | 1 | 5 |
| 22p | 2 | 4 |
| 24p | 0 | 8 |
| 26p | 1 | 7 |
| 28p | 2 | 6 |
Note that in some cases there are other ways to spend the money.
Thus the number of additional jellybeans that he may buy is a number from 0 to 11, or is 14.
But these are in addition to the five he buys as a result of decision (iii). Therefore the number of jellybeans that he buys is a number from 5 to 16, or is 19.
Solution © UK Mathematics Trust, from the Hamilton Olympiad 2016 solutions.