1
$\begingroup$

I have this problem:

How many numbers of 5 digits consisted of 1,2,3,4 there are, such that the number 3 shows only once, and the hundreds place is different from the tens place?

(One solution I have that we can divide the problem into two parts, the first is when the number 3 is on the tens place / hundreds place, and the other one is the opposite). Is there a different way to do this?

1 Answers 1

0

Your approach of using cases is optimal.

For case one we choose one of three slots that are not the hundreds or tens place for our $3$ and then we have three choices for our tens and two choices for our hundreds place and three choices for our remaining digit positions. Then when three is not in the tens or hundreds we have

$$\binom{3}{1}\cdot 3^3 \cdot 2$$

valid numbers.

When $3$ is in either the tens or hundreds place we can select one of these places in two ways and the remaining digits may be any of the other three digits we have. Thus the number of ways where three is in our tens or hundreds position is

$$\binom{2}{1}\cdot3^4.$$

The answer is the sum of these possibilities

$$\binom{3}{1}\cdot 3^3 \cdot 2 + \binom{2}{1}\cdot3^4.$$