Number of $6$ digit numbers which can be formed with $4$ specific different digits such that each digit appears at least once

combinationscombinatoricspermutations

My problem is that I'm getting different answers with two different approaches:

Approach 1:
I have taken two cases:

Case 1: $2$ alike, $2$ alike, $2$ different

Number of ways of such a case is $$\binom{4}2\frac{6!}{2!2!}=1080$$
Case 2: $3$ alike, $3$ different

Number of ways of such a case is $$\binom{4}1\frac{6!}{3!}=480$$

Hence total number of numbers which can be formed are $1080+480=1560$.

Approach 2: I am first taking the $4$ digits and placing them in $4$ spaces in the number to be formed which can be done in $\binom{6}44!=360$ ways. Now that I have ensured that each digit has appeared once, I can fill the remaining 2 places in $4^2=16$ ways($4$ ways of filling each space and there are $2$ spaces).

So total ways is $360×16=5760$.

Where am I going wrong in any of my approaches?

Best Answer

Your first approach works:

  1. Pick the number you will use two or three times using a combination.
  2. There are $6!$ strings in 6 different digits
  3. divide by the amount of possible arrangments for digits you used double.

The second approach counts double: Say you need to choose between the digits ${1,2,3,4}$ and you'll use 2 and 4 two times.

  1. You put 1,2,3,4 in the first four spots, then 2 in the fifth, 4 in the sixth spot. Result: 123424.
  2. You put 1,2,3,4 in the first, fifth, third and sixth spot, then 2 in the second spot and 4 in the fourth spot. Result: 123424

However, you counted those two options as being different in your second approach. This does not happen in your first approach.