How many four-digit numbers can be formed from the digits $0,1,2,3,4,5$ with repetition if it contains exactly $3$ different digits?

360 Views Asked by At

How many four-digit numbers can be formed from the digits $0,1,2,3,4,5$ with repetition if it contains exactly $3$ different digits?

My attempt: First let me choose $2$ numbers from the six numbers $6C2$.

Then I arrange it in any $2$ places out of $4$. $4P2$

Then I chose any one of the two numbers to fill other places $2C1$.

I have to subtract the cases where zero comes in first place.

So let me choose any other digit along with zero as two distinct digits. $5$ ways.

Then I arrange them such that $0$ is in first place. Then for remaining $3$ digits, I can have $2$ zeroes or $1$ zeroes or $0$ zeroes or $3$ zeroes. So number of ways of doing this is $3! \times 3!$ ways. Subtracting these two main cases, I get $180$. But ans is given as $175$. Where I am wrong?

2

There are 2 best solutions below

0
On BEST ANSWER

How many four-digit numbers can be formed from the digits $0,1,2,3,4,5$ if it contains exactly three different digits?

If exactly three distinct digits appear in a four-digit number, one digit must appear twice and two other digits each appear once.

Method 1: We consider two cases, depending on whether or the leading digit is repeated.

The leading digit is repeated: Since the leading digit cannot be zero, it can be chosen in five ways. Choose in which of the other three places that digit appears. Choose which of the five remaining numbers (as we can now use zero) appears in the first open position, then which of the four remaining numbers appears in the final open position. There are $5 \cdot 3 \cdot 5 \cdot 4$ such arrangements.

The leading digit is not repeated: Since the leading digit cannot be zero, it can be chosen in five ways. Choose which of the five remaining numbers appears twice. Choose two of the remaining three positions for that digit. Choose which of the remaining four numbers appears in the final open position. There are $5 \cdot 5 \cdot \binom{3}{2} \cdot 4$ such arrangements.

Total: Since the two cases are mutually exclusive and exhaustive, the number of admissible arrangements is found by adding the above numbers, which yields $$5 \cdot 3 \cdot 5 \cdot 4 + 5 \cdot 5 \cdot \binom{3}{2} \cdot 4 = 600$$ As JMoravitz indicated in the comments, the stated answer of $175$ is incorrect for the stated problem.

Method 2: We subtract the number of four-digit strings in which exactly three digits appear and the leading digit is zero from the number of four-digit strings in which exactly three digits appear.

We first count the number of four-digit strings in which exactly three digits appear. Choose the repeated digit. Choose in which two of the four positions it appears. Choose which of the five remaining digits appears in the first open position, then choose which of the four remaining digits appear in the second open position. There are $$6 \cdot \binom{4}{2} \cdot 5 \cdot 4$$ such strings.

From these, we subtract those in which the leading digit is $0$. There are two cases, depending on whether the digit $0$ is repeated.

Four-digit strings with exactly three distinct digits in which the leading digit is $0$ and the leading digit is repeated: Place a $0$ in the leading position. Choose in which of the other three positions $0$ appears. Choose which of the other five numbers fills the first open position, then choose which of the other four numbers fill the final open position. There are $3 \cdot 5 \cdot 4$ such arrangements.

Four-digit strings with exactly three distinct digits in which the leading digit is $0$ and the leading digit is repeated: Place a $0$ in the leading position. choose which of the other five digits is repeated. Choose two of the three remaining positions for that digit. Choose which of the remaining four numbers fill the remaining open position. There are $5 \cdot \binom{3}{2} \cdot 4$ such arrangements.

Therefore, the number of admissible arrangements is $$6 \cdot \binom{4}{2} \cdot 5 \cdot 4 - 3 \cdot 5 \cdot 4 - 5 \cdot \binom{3}{2} \cdot 4 = 600$$

Notice that both methods agree with the answer obtained by JMoravitz in the comments.

To see where you went wrong, compare your steps with those I outlined in my second method.

0
On

HINT:

I would divide it up into two cases

1) zero is not included

2) zero is included.

We start with 1), in this case we have to choose $3$ digits from the set $\{ 1,2,3,4,5 \}$ this can be done in $\binom{5}{3}$ different ways. Now we need to choose one more digit from these three to have $4$ digits. This can be done in $\binom{5}{3}\cdot 3$ and now we have $4$ digits where one is a duplicate.

Now we have to permute these which can be done in $\frac{4!}{2!}$ ways giving the final answer for 1) which is

$$ \binom{5}{3}\cdot 3\cdot \frac{4!}{2}. $$

For 2) I would pick $2$ numbers from $\{ 1,2,3,4,5 \}$. Put one of these as the "highest" value and then add $0$ to the chosen set of $2$ and fill the remaining $3$ places according to the rules. I hope I helped and you can figure out the rest.