AMC12 2025 A
AMC12 2025 A · Q23
AMC12 2025 A · Q23. It mainly tests Basic counting (rules of product/sum), Combinations.
Call a positive integer fair if no digit is used more than once, it has no $0$s, and no digit is adjacent to two greater digits. For example, $196, 23$ and $12463$ are fair, but $1546, 320,$ and $34321$ are not. How many fair positive integers are there?
称正整数为公平数,若无数字重复使用、无 $0$,且无数字邻接两个更大的数字。例如,$196, 23$ 和 $12463$ 是公平数,但 $1546, 320,$ 和 $34321$ 不是。公平正整数有多少个?
(A)
511
511
(B)
2584
2584
(C)
9841
9841
(D)
17711
17711
(E)
19682
19682
Answer
Correct choice: (C)
正确答案:(C)
Solution
To satisfy the conditions, a $\textit{fair}$ integer must have no digit be a local minimum. Let's say we have $n$ distinct digits, with each digit being a number from $1$ to $9$. To create a $\textit{fair}$ integer, we begin by placing the largest digit. For the second-largest digit, we can either place this digit to the right or to the left of the string already created. We have these $2$ options for the third-largest digit, and so on. Therefore, there are $2^{n-1}$ valid permutations to create a $\textit{fair}$ integer.
We must also choose which digits will be in the permutation. If you are creating an $n$-digit long $\textit{fair}$ integer, there are $9\choose{n}$ ways to pick which digits will be in the number.
Therefore, for each $n \in \{1,2,\dots, 9\}$, the number of fair integers of length $n$ is:
\[\binom{9}{n} \cdot 2^{n-1}.\]
Summing over all $n$:
\[\sum_{n=1}^9{\binom{9}{n} \cdot 2^{n-1}}=\frac{1}{2}\left(\sum_{n=0}^9{\binom{9}{n}}2^n -1\right)=\frac{1}{2}\left((1+2)^9 -1 \right) = \frac{1}{2}(19682) = \boxed{9841}.\]
要满足条件,公平整数不得有局部极小值。设有 $n$ 个不同数字,每个数字从 $1$ 到 $9$。创建公平整数,先放置最大数字。对于第二大数字,可以放在已创建字符串的左边或右边。对于第三大数字也有 $2$ 个选择,依此类推。因此,有 $2^{n-1}$ 个有效排列创建公平整数。
还需选择哪些数字在排列中。若创建 $n$ 位公平整数,有 $\binom{9}{n}$ 种选择数字的方式。
因此,对每个 $n \in \{1,2,\dots, 9\}$,长度为 $n$ 的公平整数个数为:
\[\binom{9}{n} \cdot 2^{n-1}.\]
对所有 $n$ 求和:
\[\sum_{n=1}^9{\binom{9}{n} \cdot 2^{n-1}}=\frac{1}{2}\left(\sum_{n=0}^9{\binom{9}{n}}2^n -1\right)=\frac{1}{2}\left((1+2)^9 -1 \right) = \frac{1}{2}(19682) = \boxed{9841}.\]
Topics
Related Questions
Practice full AMC exams on amcdrill.
Try full-length practice and diagnostics at www.amcdrill.com.