Determine the probability that a 15-digit base ten positive integer with no leading zero contains each of the digits from 0 to 9 at least once, but at most twice.
As a bonus, determine the probability that a 15-digit base ten positive integer having no zero digit contains each of the digits from 1 to 9 at least once, but at most twice.
There are 10^15-10^14 = 900000000000000 such numbers, so we need to divide this into how many fit the criterion sought.
There are C(10,5) = 252 choices of which of the ten digits is duplicated in the satisfactory numbers. Of these, C(9,4) = 126 have a zero as one of the repeated digits and the remaining 126 do not.
Those where zero is not duplicated:
Identify each of the digits by a unique letter A-O. There are 14*14! permutations of these that do not start with the zero, but each pair of identical digits does not matter in their order within the pair, so the number sought is 14*14! / 2^5 = 38140502400. Multiply this by the 126 choices of five digits other than zero, giving 4805703302400.
Those where zero is duplicated:
This time there are 13*14! permutations that don't start with a zero, but again we have to divide by 2^5:
13*14! / 2^5 = 35416180800
Multiply by the 126 choices of five digits where one of the five duplicated, giving 4462438780800.
The total successful cases is then the sum of these two numbers: 4462438780800 + 4805703302400 = 9268142083200.
This then needs be divided by the 900000000000000, to give the probability: about .010297935648 or 1 in 97.1068410389818. The exact reduced fraction is 321810489/31250000000.
Bonus:
There are 9^15 numbers in the category.
The successful numbers are as follows:
There are C(9,6) = 84 choices of digits to be duplicated, as six must now be duplicated. The rearrangements within each choice are 15! / 2^6. The probability is therefore (84 * 15! / 2^6) / 9^15 ~= 0.008336068632674 or 1 in 119.9606246139065. The exact fraction is 784784000/94143178827.
|
Posted by Charlie
on 2010-01-31 14:09:57 |