## Ten Different Digits

What is the probability that a number chosen at random from the range $1,\!000,\!000,\!000$ to $9,\!999,\!999,\!999$ inclusive will contain ten different digits? Round your answer to the nearest millionth.
Source: NCTM Mathematics Teacher, January 2006

Solution
We divide the large range into nine smaller ranges:
$1,\!000,\!000,\!000$ to $1,\!999,\!999,\!999$
$2,\!000,\!000,\!000$ to $2,\!999,\!999,\!999$
$3,\!000,\!000,\!000$ to $3,\!999,\!999,\!999$
$\cdots$
$8,\!000,\!000,\!000$ to $8,\!999,\!999,\!999$
$9,\!000,\!000,\!000$ to $9,\!999,\!999,\!999$

We examine the first range in details.
The first digit after $1$ has nine choices $\left \{0,2,3,4,5,6,7,8,9\right \}$
The second digit after $1$ has eight choices
The third digit after $1$ has seven choices, etc.
Number of desirable outcomes
$1\times 9\times 8\times 7\times 6\times 5\times 4\times 3\times 2\times 1 = 9!$
Similarly, each of the other ranges has $9!$ desirable outcomes.
Total number of desirable outcomes = $9\times 9!$
Total number of possible outcomes
$9,\!999,\!999,\!999-1,\!000,\!000,\!000+1=9\times 10^9$

Probability that a number chosen at random will contain ten different digits
$\dfrac{9\times 9!}{9\times 10^9}=\dfrac{9!}{10^9}$
$=0.000363$

Answer: $0.000363$