3

In each of the following 6-digit natural numbers: $333333,225522,118818,707099$, every digit in the number appears at least twice. Find the number of such 6-digit natural numbers.

This is how I'm intending to do.

1) Find the total number of 6-digit combinations.

2) Subtract the number of times there's 0 and 1 repetition of digits so that I can get at least 2 repetitions.

Total Combinations = $9 \times 10^5$

Repeat 0 Times = $9 \times 9 \times 8 \times 7 \times 6 \times 5$

Repeat 1 Time = Not sure how to calculate

The answer is 11754 but I'm struggling to get it!

  • For 'repeat $0$ times, you seem to be counting cases with no repeated digits. I'm thinking for 'repeat $1$ time' you are calculating cases with one repeated digit (e.g., 353217). But there are other cases to consider such as two repeated digits and two singles; or a triple digit, a double digit, and a single; etc. – paw88789 Sep 20 '14 at 09:44

2 Answers2

4

First let us also accept numbers starting with a $0$.

Let $d$ denote the number of distinct digits in the number. For $d>3$ there are $0$ possibilities.

For $d=1$ there are $10$ choices of the digit and every choice leads to $1$ possibility.

For $d=3$ there are $\binom{10}{3}=120$ choices for the digits and each choice leads to $\frac{6!}{2!2!2!}=90$ possibilities.

For $d=2$ we have two split-ups.

One of them is $6=3+3$ with $\binom{10}{2}=45$ choices for the digits and each choice leads to $\binom{6}{3}=20$ possibilities.

The other is $6=4+2$. Here the chosen digits are distinghuisable. One of them is used $4$ times and the other $2$ times. So we have $10\times9=90$ choices and each choice leads to $\binom{6}{2}=\binom{6}{4}=15$ possibilities.

Adding up we find $10\times 1+120\times90+45\times20+90\times15=13060$ possibilities.

Subtracting the numbers that start with a $0$ we find $\frac{9}{10}\times13060=11754$ possibilities.

drhab
  • 151,093
  • Thanks drhab! I'm slightly unclear why the numbers starting with a 0 is one tenth of the total. – Faizal Ismaeel Sep 20 '14 at 10:42
  • Thought about it again and I got it! =) – Faizal Ismaeel Sep 20 '14 at 10:45
  • For d=2, for the case where one digit is used 4 times and the other 2 times, why do we have $10 \times 9$ choices? – Faizal Ismaeel Sep 29 '14 at 18:53
  • 1
    First choose the digit that appears $4$ times in the number. There are $10$ options. Then choose the digit that appears $2$ times. $9$ options are left. This gives $10\times 9$ possible choices. – drhab Sep 29 '14 at 18:59
  • Hmm, I don't understand why don't we do the same for the case where $d=3$? The first digit can be chosen in 10 ways, the second 9 ways and the third 8 ways? – Faizal Ismaeel Sep 29 '14 at 19:16
  • If e.g. the first choice is a $0$, the second a $1$ and the third a $2$, then you end up with the same result if e.g the first choice is a $1$, the second a $2$ and the third a $0$. This is doublecounting and must be avoided. – drhab Sep 29 '14 at 19:25
  • Can't this be said for the d = 2 also? If the first choice is 0 and the second choice is a 1, we get the same result e.g the first choice is a 1 and the second a 0? – Faizal Ismaeel Sep 29 '14 at 19:44
  • 1
    No, if $d=2$ and the split up is $6=4+2$ then if the first choice is a $0$ and the second a $1$ then you have $4$ times a $0$ and $2$ times a $1$. It the first choice is a $1$ and the second a $0$ then you have $2$ times a $0$ and $4$ times a $1$. These situtations are distinct. That's why I used the term distinguishable in my answer. – drhab Sep 29 '14 at 21:15
  • Thanks a lot for clarifying! Really appreciate it. – Faizal Ismaeel Sep 29 '14 at 22:37
  • You are very welcome. Glad to help. – drhab Sep 30 '14 at 07:18
  • @drhab What if the repetition is global meaning not specific to a digit but whole number? How to get all the variations between 0 and 1000000 with for example 4 repetitions? – Eftekhari Sep 11 '21 at 19:59
  • @Eftekhari I do not understand what you are trying to ask. Anyhow, if your question is okay then this spot is not the place to handle it. You could just pose your question eventually with a link to this answer. – drhab Sep 12 '21 at 11:02
  • @drhab Thanks for the reply. This is the question that I have >> https://math.stackexchange.com/questions/4247472/permutations-with-global-limited-repetition-without-the-need-for-providing-digit – Eftekhari Sep 12 '21 at 17:04
  • @drhab Very simple, how to get count of variations with n repetitions allowed; not more, not less. – Eftekhari Sep 12 '21 at 17:05
  • @drhab Like all the variations between 0000000000 and 9999999999 with 5 repetition in each number. – Eftekhari Sep 12 '21 at 17:08
1

I think I'd suggest direct counting, with cases being: (1) same digit six times; (2) a quadruple digit and a double digit; (3) two triple digits; (4) three double digits. Things get a bit messier because if one of your digits is $0$, you need to keep it out of the leading position.

Let's try counting case (3), and I'll leave the other cases to you:

Case 3a: Two triple digits, neither being $0$: Choose two nonzero digits ($9 \choose{2}$ ways). Pick three of six positions for one of the digits ($6\choose 3$ ways). This gives a total of $36\cdot 20=720$ possibilities for this subcase.

Case 3b: Two triple digits, one being $0$: Choose a nonzero digit for the other digit (9 ways). Choose $3$ of $5$ positions for the $0$s (you have to avoid the first position). This gives $9\cdot {5\choose 3}=90$ possibilities for this subcase.

So your total for case 3 is $720+90=810$.

paw88789
  • 40,402