Number of 5-digit numbers in which all digits are distinct is equal
Answers
There are 9 choices for the first digit, since 0 can't be used. For the second digit, any of the remaining 9 digits can be used. For the third digit any of the 8 digits not already used, can be used. For the next digit, there are 7 choices. And for the final digit there are 6 choices left. Multiplying the values together gives the stated answer: 9 x 9 x 8 x 7 x 6.
We also need to count how many cases include a 0 in the final four digits, because only these will leave 6 digits available for the first digit. If the last 4 don't include 0, we are left only with 5 choices, for the first one. Since the number of distinct-4-digits arrangements which don't include a 0 is 9C4×4!, the calculation gives -
(9C4×4!)×5+((10C4−9C4)×4!)×6
which simplifies to 9×8×7×(30+60−36), i.e. 9 x 9 x 8 x 7 x 6