1
$\begingroup$

How many $4$ digit numbers are there which have exactly one $4$ and exactly one $5$ ?

My Try :-

$4\choose2$ $\times 2! \times8\times 8$ - $3\choose2$ $\times 2!\times 8$

OR

I can write it as :-

$3*2*8*7 + 2*3*8*8$

I am not sure of the answer. Am I right here ?

  • 0
    Please check my answer.2017-01-03
  • 0
    Could you give your reasoning and not just the number. Why the subtraction?2017-01-03
  • 0
    Oh, I see. Start with zero. Seems good to me.2017-01-03

3 Answers 3

4

You are counting the ways to select two position and arrange 4 and 5 within them, and to select two other digits in the other two positions.

Then you have excluded the possibility of leading zeros.   Counting ways to select two positions from three, arrange the digits 4 and 5 among them, and select another digit in the remaining place.

That is done okay. $${^4\mathrm C_2}~2!~8^2-{^3\mathrm C_2}~2!~8$$

1

Hint -

As we have 10 digits.

First digit cannot be 0.

Then we have total number of ways including repetition 9 * 10 * 10 * 10.

Now exclude cases with more than one 4 and one 5.

1

You can write it down. $45XX$ where X is a number from $0-9$ but not 4 or $5$.

There are $\frac{4!}{2!\cdot 1! \cdot 1!}=12$ ways of arrangments. And for $XX$ you have $8\cdot 8 =64$ arrangements. In total $12\cdot 64=768$. This is equal to your first summand.

If do not count combinations with leading zeros you have to substract them.

One leading zero:

We have $04X5, 05X4, 045X, 054X$ ($0$ is fix).

There are $4\cdot 8=32$ ways of arrangements.

Two leading zeros

The are only two possible numbers: $0045$ and $0054$

In total we have $768-32-2=768-34=734$

  • 0
    Why do you multiply by 6 in the leading 0. Should it just be 4 times 8? And aren't you double counting the ones where X is 0?2017-01-03
  • 0
    @fleablood Yeah, i counted it multiple times. I´ve corrected it. Thanks.2017-01-03