Let us consider all possible positive whole numbers (not containing any leading zeroes) with the proviso that in each of the numbers, none of its digits can be repeated.
Note: any given number may or may not contain all the digits from 0 to 9 (Examples: 7; 20; 1056; 3067941825 etc.)
These numbers are now arranged in descending order of magnitude.
What would be the 200,136th number?
The number of permutations that exist for all possible whole numbers not containing leading zeroes with no digit repeated with n digits can be expressed as ( (10! - 9!) / (10 - n)! ).<o:p></o:p>
For the total number of permutations that exist for 1 to 6 digits, the count is 168570.<o:p></o:p>
For the total number of permutations that exist for 1 to 7 digits, the count is 712890.<o:p></o:p>
As 168570 < 200136 <= 712890, the 200136th digit must be a 7-digit number. <o:p></o:p>
<o:p> </o:p>
Subtracting 168570 from 200136 gives a result of 31566, therefore the 31566th number of the 7-digits numbers is the 200136th number.<o:p></o:p>
<o:p> </o:p>
(10! – 9!) / (10 – 7)! = 544320<o:p></o:p>
<o:p> </o:p>
544320 / 9 [the number of available digits {1, 2, 3, 4, 5, 6, 7, 8, 9}] = 60480<o:p></o:p>
<o:p> </o:p>
0*(60480) < 31566 <= 1*(60480), therefore the first digit is the first available digit: 1.<o:p></o:p>
<o:p> </o:p>
31566 – 0*(60480) = 31566<o:p></o:p>
<o:p> </o:p>
60480 / 9 [the number of available digits {0, 2, 3, 4, 5, 6, 7, 8, 9}, equals 6720<o:p></o:p>
<o:p> </o:p>
4*(6720) < 31566 <= 5*(6720), therefore the second digit is the fifth available digit: 5.<o:p></o:p>
<o:p> </o:p>
31566 – 4*(6720) = 4686<o:p></o:p>
<o:p> </o:p>
6720 / 8 [the number of available digits {0, 2, 3, 4, 6, 7, 8, 9}, equals 840<o:p></o:p>
<o:p> </o:p>
5*(840) < 4686 <= 6*(840), therefore the third digit is sixth available digit: 7.<o:p></o:p>
<o:p> </o:p>
4686 – 5*(840) = 486<o:p></o:p>
<o:p> </o:p>
840 / 7 [the number of available digits {0, 2, 3, 4, 6, 8, 9}, equals 120<o:p></o:p>
<o:p> </o:p>
4*(120) < 486 <= 5*(120), therefore the fourth digit is the fifth available digit: 6.<o:p></o:p>
<o:p> </o:p>
486 – 4*(120) = 6<o:p></o:p>
<o:p> </o:p>
120 / 6 [the number of available digits {0, 2, 3, 4, 8, 9}, equals 20<o:p></o:p>
<o:p> </o:p>
0*(20) < 6 <= 1*(20), therefore the fifth digit is the first available digit: 0.<o:p></o:p>
<o:p> </o:p>
6 – 0*(20) = 6<o:p></o:p>
<o:p> </o:p>
20 / 5 [the number of available digits {2, 3, 4, 8, 9}, equals 4<o:p></o:p>
<o:p> </o:p>
1*(4) < 6 <= 2*(4), therefore the sixth digit is the second available digit: 3.<o:p></o:p>
<o:p> </o:p>
6 – 1*(4) = 2<o:p></o:p>
<o:p> </o:p>
4 / 4 [the number of available digits {2, 4, 8 9}, equals 1<o:p></o:p>
<o:p> </o:p>
1*(1) < 2 <= 2*(1), therefore the seventh digit is the second available digit: 4.<o:p></o:p>
<o:p> </o:p>
Thus the 200,136th number is 1,576,034. <o:p></o:p>
|
Posted by Dej Mar
on 2006-02-03 01:23:22 |