How many different 4-digit numbers can be made with the digits from 12333210

combinatoricscombinatorics-on-words

How many different 4-digit numbers can be made with the digits from $12333210$?

Attempt. So I've tried splitting into cases:

Case 1: Only single letters.

1 2 3 0, except for when 0 is at the first place, so total arrangements minus the arrangements where 0 is in the first place. That is: $$4!-3!$$ (I think)

Case 2: One double only.

So either (the "[]" represent the remaining letters for the other 2 places), 1 1 [2,3,0], or 2 2 [1,3,0], or 3 3 [1,2,0]. $$\frac{4P2}{2!}\cdot 3P2\cdot 3-\frac{3P2}{2!}\cdot 2P1\cdot 3$$ the $4P2$ is for the double to be arranged in the any 2 of 4 places, the $3P2$ is the 3 remaining letters to be arranged in the 2 remaining places, and times 3 because we have 3 cases of this as I wrote above, and finally substracting the other term for the arrangements where 0 is in the first place, $3P2$ to arrange the double onto the remaining 3 places, $2P1$ to arrange the remaining 2 letters onto the last space and 3 times due to the 3 cases. And any of the $/2!$ is to account the repeated digits on the doubles.

Case 3: 2 doubles?? I'm unsure whether I should compute this because it may be accounted on the 2nd case already

Case 4: 1 triple.

The only way to exist a triple is the one such that 3 3 3 [0,1,2], substracting once again the times where 0 is in the first place: $$\frac{4P3}{3!}\cdot 3P1-1$$ $\frac{4P3}{3!}$ on account of the triple to be arranged on the 4 places, $3P1$ for the 3 remaining letters to be arranged at the remaining space and $-1$ on account of the arrangement where 0 is in the first place and followed by 333. Hence my final answer would be to add all these 3 or 4 cases, but I'm unsure if any case arrangement is wrong, if I should account for the 3rd case or not, and if I've managed with the "0 can't be on the first place" correctly by accounting it on each case individually.

And please, if I have something wrong with my arrangements calculations, please let me know why my thinking is incorrect, I've added the reason to everything I've posted as a result for a reason.

Best Answer

Your working is correct but you need to count numbers with two doubles separately. It is not counted in case $\small 2$.

Here is an alternate solution before I come to your working.

Count of four digit numbers $ \displaystyle \small = 3 \cdot (3^3 - 2) + (3^4 - 3 - 2 \cdot 2 \cdot 4) = 137$

Explanation:

First term is four digit numbers with zero. There are $3$ places for zero. Rest of the digits can be any permutations of $1, 2, 3$ with repetition except no triples of $1$ and $2$ (as we have only two $1$'s and $2$'s).

Second term is four digit numbers without zero. All digits have choice of $1, 2, 3$ except that we cannot have any of them $4$ times so we subtract $3$. We also cannot have triples of $1$ or $2$. For each triple, we can have fourth digit from remaining two and they can be in any of the four places. So we subtract $\displaystyle \small 2 \cdot 2 \cdot 4$.


Coming back to your solution:

Case $3$: Two doubles. First choose two doubles from $ \{1, 2, 3\} $ and so count of $4$ digit numbers,

$ = \displaystyle \small {3 \choose 2} \frac{4!}{2!2!} = 18$

Case $1$: All digits are different. Choose one of the three places for $0$ and then remaining $3$ digits can be permuted in $3!$ ways. So count of $4$ digits numbers $\displaystyle \small = 3 \cdot 3! = 18$

Case $2$: One double. Choose one double from $ \{1, 2, 3 \}$ and then we either have other two digits from rest of $ \{1, 2, 3 \}$ one each or we have one of them along with $0$. So count of $4$ digit numbers,

$ \displaystyle \small = {3 \choose 2} \cdot \bigg[\frac{4!}{2!} + 2 \cdot \frac{3 \cdot 3!}{2!} \bigg]= 90$

Case $4$: Triple. We have total of $\displaystyle \small 2 \cdot 4 + 3 = 11$ four digit numbers.

That leads to total count of $\displaystyle \small 137$ four digit numbers.

Related Question