# How many 3 digit numbers can be formed using the digits 0,1,2,3,4 if 2 and 3 are always included?

My attempt : Fixing $2$ and $3$ at the tens and units place. Hundreds place can be filled up by $(1,4)$. Hence $2$ numbers can be formed in this case. Fixing $2$ and $3$ at the hundreds and tens place. Units place can be filled up by $(0,1,4)$. Hence $3$ numbers can be formed in this case. Fixing $2$ at the hundreds place and $3$ at the units place. Tens place can be filled up by $(0,1,4)$. Hence $3$ numbers can be formed. Now we,ll swap the positions of $3$ and $2$ and again apply the same method. Hence there will be a total of $3+3+2+3+3+2 = 16$ numbers that can be formed. But if I apply the formula ${}^{n-k}\mathrm P_{r-k}\times{}^r\mathrm P_k$ which is used to find the number of permutations of $n$ dissimilar things taken $r$ at a time when $k$ particular things always occur, the answer comes out to be $18$. Is it because the results $023$ and $032$ are also included which need to be subtracted as $0$ can't be the leading digit? Is my method right?

If I use the formula $$s![r-(s-1)]\cdot (^{n-s}P_{r-s})$$ which is also used to find the number of permutations of n different objects taken r at a time when s particular things are to be always included in each arrangement, the answer comes out to be 12. Whats the cause of difference?

Yes, your method is correct, and yes, the discrepancy between the two answers is simply that the formula counts $023$ and $032$, which are not $3$-digit numbers.

• If I use the fomula $$s![r-(s-1)]\cdot (^{n-s}P_{r-s})$$ which is used to find the number of permutations of n different objects taken r at a time when s particular things are to be always included in each arrangement, the answer comes out to be 12. What is the cause of difference ? – John Jul 2 '17 at 11:48

Consider this method.

For our third digit, we have $0$, $1$, or $4$.

Each choice creates $6$ possible numbers.

So we have $(3)(6)=18$ numbers.

Except $023$ and $032$. Not $3$ digit numbers.

$18-2=\boxed{16}$ numbers.

So yes, your method is correct.