Find all 5 digit number from (0,1,2...9) such that exactly one of it's digit is repeated twice? i am trying to find all the numbers such that exactly one of it's digit is repeated twice e.g- 12334, 18197, 34299 and so on, how can i do it?
i know to find numbers of 5 digit is repition not allowed as =10 * 9 * 8 * 7 * 1
and if repeatition allowed as=10 * 10* 10* 10* 10.
how can i do it?
note: 01123 is also counted as 5 digit.
 A: You can follow the following steps to create such a number:

*

*Pick the number that will be repeated

*Pick the two positions for this number

*Pick the remaining three numbers from the remaining 9 possible numbers

*Pick the spots for these three numbers

To find how many numbers of the form you are looking for exist, we must find out in how many ways we can perform each of these steps and multiply those numbers together. So for instance there are $10$ ways of picking the number to be repeated, then there are $\binom{5}{2}$ ways to pick the two places this digit will occupy, etc.
A: Note first that if you disallow any repetitions, the answer is not $5\cdot4\cdot3\cdot2\cdot1$ but $10\cdot9\cdot8\cdot7\cdot6$, because there are $10$ choices for the first digit, not $5$, etc. Likewise, if repetitions are allowed without restriction, the answer is $10^5$, not $5^5$.
With the exactly-one-repetition restriction, the answer is
$${5\choose2}\cdot10\cdot9\cdot8\cdot7$$
That is, first pick which two positions to put the repeated digit in, then choose one of the ten available digits for those positions, and finally fill in the remaining positions, say from left to right, with digits not yet used, which is doable in $9\cdot8\cdot7$ ways.
Note, this assumes (as the OP stipulates) that five-digit numbers beginning with a $0$ are included in the count. If you don't include them, the answer is a bit trickier; you have to break things into a couple of cases.
A: first choose 4 number out of 10 in 210 ways. then out of 4 choose 1 for repetition in 4 ways,then this 5 digit number can be rearranged in factorial(5) divided by factorial(2) which equals 60 ways. so total numbervpossible are 210 * 60 * 4 =50,400  which should be the answer to the best of my understanding. Thank you everyone for the answer.
A: Identify all the 4 digit numbers with no repetition.
For each of these 4 digit numbers, you can pick each of its digits and repeat it.
There are 5 distinct slots for this repeated digit.
However, this will method will yield each 5 digit number twice, so divide answer by 2.
For OP question, this gives $10*9*8*7*4*5/2=50,400$
