2025 AMC 10A Problems/Problem 24
Call a positive integer fair if no digit is used more than once, it has no
s, and no digit is adjacent to two greater digits. For example,
and
are fair, but
and
are not. How many fair positive integers are there?
Solution 1
Note that the condition that no digit is adjacent to two greater digits means that the digits must be in ascending order up to some largest digit, when they then switch to descending order. To find the number of such numbers, consider two "parts" of the number: the ascending part and the descending part. Note that since each of these has a unique ordering, we just need to divide the digits
among these parts. For each such digit, it can either be in the ascending part, descending part, or not be in the number, giving
possibilities per digit for a total of
possibilities. However, we can see that the number cannot be "empty", so we have to subtract 1. Furthermore, the largest digit can be on either part, as it will not make a difference. For example,
Therefore, we divide by
to get
~krithikrokcs
Solution 2
There is one very interesting detail about fair positive integers: The second a digit becomes less than its preceding one, the rest of the digits following must also be in decreasing order. This implies that every fair positive integer increases, reaches a maximum digit, and then decreases. This type of permutation of numbers is called a unimodal permutation.
Let's say we have a set of
distinct integers. We want to find the number of unimodal permutations of the set. First, we choose the integers to be in the increasing part of the permutation. For each of the
integers, they are either in the increasing sequence or not. This gives
possible increasing sequences, and the decreasing sequence is decided from the remaining integers. But, we must divide this count by
as we do not need to count the choices for our vertex (the vertex is in both the increasing and decreasing sequence). Hence, the number of unimodal permutations of a set of length
is
Therefore, for the number of
digit fair positive integers, there are
ways to choose the
digits, and
ways to make a unimodal permutation with those digits. Our total count is then
- Note: I have no idea how to simplify the above sum to make it easier to compute, so Solution 1 would be easier computation-wise.
~Tacos_are_yummy_1 ~ChatGPT for the term "unimodal" cuz I didn't feel like saying "up then vertex then down" twenty times .-.