Difference between revisions of "2004 AIME II Problems/Problem 4"
Jerry122805 (talk | contribs) (→Solution) |
m (→Solution 2) |
||
Line 24: | Line 24: | ||
If the number <math>n</math> has three digits, there are a total of <math>900</math> three digit numbers, and there are <math>9 \cdot 9 \cdot 8</math> numbers that have all distinct digits so there are <math>900 - 9 \cdot 9 \cdot 8</math> total three digit numbers that work. | If the number <math>n</math> has three digits, there are a total of <math>900</math> three digit numbers, and there are <math>9 \cdot 9 \cdot 8</math> numbers that have all distinct digits so there are <math>900 - 9 \cdot 9 \cdot 8</math> total three digit numbers that work. | ||
− | If the number <math>n</math> has four digits, then we have a total of <math>9 + | + | If the number <math>n</math> has four digits, then we have a total of <math>9 +\binom{9}{2}\left(\binom{4}{1}+\binom{4}{2} +\binom{4}{3}\right) + 9 \cdot \left(\binom{3}{1}+\binom{3}{2} +\binom{3}{3}\right)</math> so in total we get <math>\boxed{927}</math> numbers that work. |
+ | |||
+ | |||
+ | Alternatively, <math>n</math> has four digits can be calculated as follows: When <math>n</math> has one unique digit, there are <math>9</math> possibilities. When <math>n</math> has two unique digits there are two cases. Case 1: two digits are the same with each other and different with the other pair of similar digits. In that case there are <math>\frac{\binom{4}{2}(9^2)}{2}</math> numbers that work. The case had to be divided by <math>2</math> because it counts the cases of distinct digits <math>(x,y)</math> again when <math>(y,x)</math> is picked. Case 2: three digits are the same and one is different. There are <math>4(9^2)</math> numbers that work. | ||
== See also == | == See also == |
Revision as of 21:06, 6 May 2023
Contents
Problem
How many positive integers less than 10,000 have at most two different digits?
Solution
First, let's count numbers with only a single digit. We have nine of these for each length, and four lengths, so 36 total numbers.
Now, let's count those with two distinct digits. We handle the cases "0 included" and "0 not included" separately.
There are ways to choose two digits,
and
. Given two digits, there are
ways to arrange them in an
-digit number, for a total of
such numbers (or we can list them:
). Thus, we have
numbers of this form.
Now, suppose 0 is one of our digits. We have nine choices for the other digit. For each choice, we have
-digit numbers we can form, for a total of
such numbers (or we can list them:
). This gives us
numbers of this form.
Thus, in total, we have such numbers.
Solution 2
We use casework on the number of digits for this problem.
If the number has a single digit, namely the number we can clearly all such
work.
If the number has two digits, or the number we can clearly see all such
work.
If the number has three digits, there are a total of
three digit numbers, and there are
numbers that have all distinct digits so there are
total three digit numbers that work.
If the number has four digits, then we have a total of
so in total we get
numbers that work.
Alternatively, has four digits can be calculated as follows: When
has one unique digit, there are
possibilities. When
has two unique digits there are two cases. Case 1: two digits are the same with each other and different with the other pair of similar digits. In that case there are
numbers that work. The case had to be divided by
because it counts the cases of distinct digits
again when
is picked. Case 2: three digits are the same and one is different. There are
numbers that work.
See also
2004 AIME II (Problems • Answer Key • Resources) | ||
Preceded by Problem 3 |
Followed by Problem 5 | |
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.