How many different three-digit numbers contain both the digit $2$ and the digit $6$?

1.9k Views Asked by At

How many different three-digit numbers contain both the digit $2$ and the digit $6$?

There are six possible permutations: $$ \overline{26x},\ \overline{62x},\ \overline{2x6},\ \overline{6x2},\ \overline{x26},\ \overline{x62}. $$

In the first four groups $x$ can be any number in $[0,9]$, in the two last groups $x$ can be any number in range $[1,9]$. So $$ 4 \times 10 + 2 \times 9 = 58. $$ However, the right answer is $52$. Could you, please, point out the mistake in the reasoning?

2

There are 2 best solutions below

0
On BEST ANSWER

Your method overcounts the numbers $266(26x;2x6),622(62x;6x2),262(26x;x62),626(62x;x26),662(6x2;x62),226(x26;2x6)$

Another approach to this problem

Case 1 : The 3 digit number contains all distinct digits

Numbers formed= $\binom {8}{1}.3!$

But we also count in this the numbers which start with 0 so we subtract them.

Numbers in this case hence=$\binom {8}{1}3!-2!=46$

Case 2: The 3 digit number contains exactly 2 digits same.

The two digits can be $2$ or $6$

Hence numbers in this case = $\binom {2}{1}\cdot \frac {3!}{2!}=6$

Hence total numbers required =$46+6=52$

1
On

You should also take into account the repetition of a number. The following numbers are repeated:

$226({x26\text{ and }2x6})$

$262(26x\text{ and }x62)$

$266(26x\text{ and }2x6)$

$622(62x\text{ and }6x2)$

$626(62x\text{ and }x26)$

$662(6x2\text{ and }x62)$

So after subtracting the number of repeated numbers (i.e. $6$) from $58$, we get $52$.

A genuine approach to this problem is given in the other answer of Manthanein.