Difference between revisions of "2025 AIME II Problems/Problem 8"
m (→Solution 1) |
|||
Line 1: | Line 1: | ||
== Problem == | == Problem == | ||
− | From an unlimited supply of 1-cent coins, 10-cent coins, and 25-cent coins, Silas wants to find a collection of coins that has a total value of <math>N</math> cents, where <math>N</math> is a positive integer. He uses the so-called greedy algorithm, successively choosing the coin of greatest value that does not cause the value of his collection to exceed <math>N | + | From an unlimited supply of <math>1</math>-cent coins, <math>10</math>-cent coins, and <math>25</math>-cent coins, Silas wants to find a collection of coins that has a total value of <math>N</math> cents, where <math>N</math> is a positive integer. He uses the so-called <math>\textit{greedy algorithm}</math>, successively choosing the coin of greatest value that does not cause the value of his collection to exceed <math>N</math>. For example, to get <math>42</math> cents, Silas will choose a <math>25</math>-cent coin, then a <math>10</math>-cent coin, then <math>7</math> <math>1</math>-cent coins. However, this collection of <math>9</math> coins uses more coins than necessary to get a total of <math>42</math> cents; indeed, choosing <math>4</math> <math>10</math>-cent coins and <math>2</math> <math>1</math>-cent coins achieves the same total value with only <math>6</math> coins. |
+ | |||
+ | In general, the greedy algorithm succeeds for a given <math>N</math> if no other collection of <math>1</math>-cent, <math>10</math>-cent, and <math>25</math>-cent coins gives a total value of <math>N</math> cents using strictly fewer coins than the collection given by the greedy algorithm. Find the number of values of <math>N</math> between <math>1</math> and <math>1000</math> inclusive for which the greedy algorithm succeeds. | ||
==Solution 1== | ==Solution 1== |
Revision as of 22:54, 24 February 2025
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 25-cent coin, and no problem arises.
From to
, the greedy algorithm will select the 25-cent coin along with 5 1-cent coins to reach a total of 30, while the optimal solution would involve using 3 10-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 25 numbers, with 10 of the 25 numbers in each cycle not working. The cycle starts at 30, and the next cycle will start 25 numbers later, at 55, then 80, and so on, continuing until 980–1005 for the last cycle.
The total number of cycles is given by:
and each cycle contains 10 problematic numbers. Therefore, the total number of problematic numbers is:
The cycle from 980 to 1005 has the problematic numbers from 980 to 984 and from 990 to 994, which gives another 10 problematic numbers.
Thus, the total number of unsuccessful numbers from 1 to 1000 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.