2025 AIME II Problems/Problem 8
Problem
From an unlimited supply of -cent coins,
-cent coins, and
-cent coins, Silas wants to find a collection of coins that has a total value of
cents, where
is a positive integer. He uses the so-called
, successively choosing the coin of greatest value that does not cause the value of his collection to exceed
. For example, to get
cents, Silas will choose a
-cent coin, then a
-cent coin, then
-cent coins. However, this collection of
coins uses more coins than necessary to get a total of
cents; indeed, choosing
-cent coins and
-cent coins achieves the same total value with only
coins.
In general, the greedy algorithm succeeds for a given if no other collection of
-cent,
-cent, and
-cent coins gives a total value of
cents using strictly fewer coins than the collection given by the greedy algorithm. Find the number of values of
between
and
inclusive for which the greedy algorithm succeeds.
Solution 1
We begin by noting that all values of work without issue.
Starting from to
, the greedy algorithm will select the
-cent coin, and no problem arises.
From to
, the greedy algorithm will select the
-cent coin along with
-cent coins to reach a total of
, while the optimal solution would involve using
-cent coins. This issue is resolved from
to
, as the greedy algorithm can now select
-cent coins to match the optimal solution.
From to
, a similar problem occurs again. The greedy algorithm selects
-cent coins to reach 40, while the optimal solution would use 4
-cent coins.
The problem occurs again from to
, where
is not as good as using
, and it is resolved at
. From
to
, a similar issue arises, as
is not as optimal as
to approach 65.
We observe that this issue repeats in cycles of numbers, with
of the
numbers in each cycle not working. The cycle starts at
, and the next cycle will start
numbers later, at
, then
, and so on, continuing until
–
for the last cycle.
The total number of cycles is given by:
and each cycle contains problematic numbers. Therefore, the total number of problematic numbers is:
The cycle from to
has the problematic numbers from
to
and
to
, giving another
problematic numbers.
Thus, the total number of unsuccessful numbers from to
inclusive is
, and the desired count of successful numbers is:
(Feel free to make any edits on grammar, and formatting.)
~ Mitsuihisashi14
~ Edited by aoum
See also
2025 AIME II (Problems • Answer Key • Resources) | ||
Preceded by Problem 7 |
Followed by Problem 9 | |
1 • 2 • 3 • 4 • 5 • 6 • 7 • 8 • 9 • 10 • 11 • 12 • 13 • 14 • 15 | ||
All AIME Problems and Solutions |
The problems on this page are copyrighted by the Mathematical Association of America's American Mathematics Competitions.