[Math] How many six digit numbers contain exactly 4 different digits

combinatorics

Following the logic from the link
Number of 4-digit numerals with at most 2 different digits

Writing steps in the same manner :

1) In this question, we have to find exactly 4. ( not like in that question where atmost 2 distinct digits were required ) . So this case NA.

2) Here I tried C(9,4)( C(4,2)*6!/2!.2! + C(4,1)*6!/3! ).
This is the case where we exclude 0.

3) In this case, we consider 0, I didnt understand this case in that question too.

So , Can anyone verify if my approach is correct. What could be the third case in this question, following like they did in the question linked above ?

OR if you can suggest other approach altogether. I consider few more approaches for the linked question (How many 4 digit numbers are there which contains not more than 2 different digits?). But, I could not extrapolate their concept to 6 digits and 4 distinct numbers.

Best Answer

In 2, you are picking the four different digits with C(9,4), then the C(4,2)picks the two of them that will be paired and the $\frac {6!}{2!2!}$ chooses the order. The other terms handles three of one digit plus three more. This is correct.

If you consider zero and allow it to be leading, you just change the $9$ to $10$ in your previous answer as you have one more kind of digit to choose from.

The hard part comes where you don't allow zero in the lead position. But there is a simple way to fix that: do the computation allowing all ten digits in any position. As the digits are treated on an equal footing, one tenth will start with zero. So multiply by $\frac 9{10}$