0
$\begingroup$

Example : 2 digit number : so all two digit number except 11 22 33 44 55 66 77 88 99...this is simple but how to generalize for a number of n digit?(Also at each place any digit from 0 to 9 can come so 012 is perfectly valid.)

$\endgroup$
  • $\begingroup$ 001 has two identical digits... if you are saying that it is valid, you need to clarify the statement of the problem. $\endgroup$ – Roger Burt Aug 2 '14 at 18:26
  • $\begingroup$ I am sorry Roger...Edited :) $\endgroup$ – johri21 Aug 2 '14 at 18:29
2
$\begingroup$

It's simple, the first number has $10$ options, the second digit has $9$ options and so on. You just need to multiply those numbers.
After $10$ digit numbers all digits have ben used aleast once so there's no numbers matching with $11$ or more digits.

Here's a formula that gives the amount of numbers which have no equal digits for $n$ digit numbers

$$\prod_{k=0}^{n - 1} 10 - k=(10 - 0) \times (10 - 1) \times \cdots\times(10-(n-1))$$

Note that this formula equals $0$ for $n>10$, since if $n>10$ the expression $10-10=0$ appears in the numbers that are multiplied better

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.