[Math] how many $4$ digit numbers are there with $3$ distinct digits, using all $3$ of them.

combinationsprobability

My question is, if I have for example digits $\{1,2,3\}$, how many $4$ digit numbers can I obtain if I have to use all of them in each combination?

Correct combinations:

$\{1,1,2,3\}$

$\{1,1,3,2\}$

$\{3,2,1,2\}$

$\{2,2,3,1\}$

Wrong combinations:

$\{1,1,2,1\}$ There is not digit $\{3\}$

$\{1,1,3,3\}$ There is not digit $\{2\}$

$\{2,2,2,3\}$ There is not digit $\{1\}$

And which would be the probability of this happening?
I guess that finding the combinations all I have to do is to divide this result by the total number of possible combinations.

Best Answer

{1,2,3,A} 4 digits combinations: 4x3x2x1=24

{1,2,3,1} 4 digits combinations: 4x3x2x1/2=12 since 1,1 replacing 1,A A,1

{1,2,3,1} 4 digits combinations: 12

{1,2,3,2} 4 digits combinations: 12

{1,2,3,3} 4 digits combinations: 12

Total: 12x3=36

Hope it helps