# Thread: problem related to digits.

1. ## problem related to digits.

How many six digit number contains exactly 4 different digit?

Any help would be greatly appreciated?

Thanks,

2. Hello, a69356!

How many six-digit numbers contains exactly 4 different digits?
I will assume that the number may begin with zero.

First, select 4 digits from the available 10 digits.
. . There are: .$\displaystyle {10\choose4}\:=\:{\color{blue}210}$ choices.

Then there are two possible distributions of the digits.

. . . $\displaystyle \begin{array}{cc}(1)& \{A,A,A,B,C,D\} \\ \\[-4mm] (2) & \{A,A,B,B,C,D\} \end{array}$

Case (1): .$\displaystyle A,A,A,B,C,D$
. . We have a Triple and three Singletons.

There are 4 choices for the Triple

Then the letters can be arranged in: $\displaystyle {6\choose3,1,1,1} = {\color{blue}120}$ ways.

There are: .$\displaystyle 210\cdot4\cdot120 \:=\:110,\!800\text{ Case-one numbers.}$

Case (2): .$\displaystyle A,A,B,B,C,D$
. . We have two Pairs and two Singletons.

There are: $\displaystyle {4\choose2} \:=\:{\color{blue}6}$ choices for the two Pairs.

Then the letters can be arranged in: $\displaystyle {6\choose2,2,1,1} \:=\:{\color{blue}180}$ ways.

There are: .$\displaystyle 210\cdot6\cdot180 \:=\:226,800 \text{ Case-two numbers.}$

Therefore, there are: .$\displaystyle 100,\!800 + 226,\!800 \;=\;\boxed{327,\!600}$ six-digit numbers
. . that contain four different digits.

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

If leading zeros are not allowed, consider this fact:
. . One-tenth of the above numbers begin with zero.

3. Thanks a lot Soroban it is really helpful.

again thanks