# How many 3 digit numbers have no repeated digits explanation.

The answer is 648 but I tried to solve this problem in reverse, so I ended up with 630. Theee are 10 ways to pick the third digit, 9 ways to pick the second digit, and 7 ways to pick the first digit. So why do these answers differ. Please do not close this question as I am trying to learn mathematics and I have stumbled upon this question.

• How did you get $630$ from $10, 9 , 1$? – John Lou Nov 19 '17 at 22:43
• I'm assuming that you meant 7 and not 1. The problem is you are under counting as the last two digits could be zero. There are 9 ways to pick first digit, 9 ways to pick a different second one, and 8 ways to pick third. So answer is 9*9*8 – while1fork Nov 19 '17 at 22:45

Let's start by picking the 1st digit. There are 9 choices, as it can be any digit but 0. The 2nd digit can be any digit but the first digit, so you have 9 choices. The 3rd digit can be any digit but digit 1 and digit 2, so you have 8 choices. So you have $9*9*8=648$.

If you start by picking the 3rd digit, it's less straightforward. You have 10 choices for the 3rd, and 9 choices for the 2nd. But you run into problems when picking the 1st digit, as your number of choices varies depending on whether 0 has already been picked. If it has, you have 8 choices. If it has not been picked, you have 7 choices, since it cannot be digit 2, digit 3, or 0.

The main restriction that we need to consider is that the hundreds digit cannot be zero. By choosing the hundreds digit first, we handle this restriction immediately, after which our choices depend only on which digits have already been selected.

The restriction that the hundreds digit may not be zero means we have nine choices for the hundreds digit. Since zero may be used in the tens place, we have nine choices for the tens digit (any digit except the hundreds digit). Once the hundreds and tens digits have been selected, we are left with eight choices for the units digits (any digit except the hundreds and tens digits). Therefore, there are $9 \cdot 9 \cdot 8 = 648$ three-digit positive integers with distinct digits.

If we do not start with the hundreds place, the number of choices we have depends on whether or not the number contains a zero. We consider cases:

1. There is a zero in the units place: This leaves us with nine choices for the tens place (any digit except zero) and eight choices for the hundreds place (any digit except zero and the digit in the tens place). Hence, there are $1 \cdot 9 \cdot 8 = 72$ such numbers.
2. There is a zero in the tens place: This leaves us with nine choices for the units digit (any digit except zero) and eight choices for the hundreds place (any digit except zero and the digit in the units place). Hence, there are $9 \cdot 1 \cdot 8 = 72$ such numbers.
3. There is not a zero in either the units place or tens place: This leaves with nine choices for the units place, eight choices for the tens place, and seven choices for the hundreds place. Hence, there are $9 \cdot 8 \cdot 7 = 504$ such numbers.

Since these cases are mutually exclusive and exhaustive, there are $72 + 72 + 504 = 648$ three-digit positive integers with distinct digits, as we found above without doing tedious casework.