Number of $6$ digit natural numbers with $3$ odd and $3$ even digits

I know this has been asked before but I am stuck and need help. For arranging $6$ digits there are $6! = 720$ ways. One way is $3$ odd first then $3$ even, which is $$5 \times 4 \times 3 \times 5 \times 4 \times 3.$$ This is one way, so we multiply this by $720$ (no. of ways) then deduct the numbers where $0$ comes first, but the answer is coming huge, more than total no. of $6$ digit numbers. Where am I wrong?

• Why do you multiply by $720$? The correct answer is $5 \cdot 4 \cdot 3 \cdot 5 \cdot 4 \cdot 3$ – user261263 Sep 19 '17 at 10:32
• @EugenCovaci The answer you gave is correct if each of the digits is distinct. However, the problem does not state that the digits must be distinct. – N. F. Taussig Sep 19 '17 at 10:40

For arranging $6$ digits, there are $6! = 720$ ways.

This claim is true only if all six digits are distinct. However, $434152$ is a six-digit number with three even and three odd digits.

Find the number of six-digit natural numbers with three even and three odd digits.

Method 1: We add the number of six-digit numbers whose leading digit is odd to those whose leading digit is even.

If the leading digit is odd, two of the remaining five digits are odd. We choose their positions in $\binom{5}{2}$ ways. Each of the three odd digits can be filled in $5$ ways. Each of the three even digits can be filled in $5$ ways. Hence, there are $$\binom{5}{2} \cdot 5^3 \cdot 5^3 = \binom{5}{2}5^6$$ six-digit natural numbers whose leading digit is odd.

If the leading digit is even, it cannot be zero, so it can be filled in $4$ ways. Two of the remaining five digits are even. Their positions can be selected in $\binom{5}{2}$ ways. Each of those positions can be filled in $5$ ways, as can each of the three positions that are filled with odd digits. Hence, there are $$\binom{5}{2} 4 \cdot 5^2 \cdot 5^3 = \binom{5}{2} \cdot 4 \cdot 5^5$$

Hence, the total number of six-digit natural numbers with three even and three odd digits is $$\binom{5}{2}(5^6 + 4 \cdot 5^5) = 5^5\binom{5}{2}(4 + 4) = 9 \cdot 5^5\binom{5}{2} = 90 \cdot 5^5$$

Method 2: We count six-digit sequences with three even and three odd digits, then multiply by $9/10$ to account for the fact that the leading digit cannot be zero.

There are $\binom{6}{3}$ ways to choose the positions of the even digits. The three even digits can each be filled in $5$ ways. The three odd digits can each be filled in $5$ ways. Hence, the number of permissible sequences is $$\frac{9}{10} \binom{6}{3} \cdot 5^3 \cdot 5^3 = \frac{9}{10} \cdot 20 \cdot 5^6 = 9 \cdot 2 \cdot 5 \cdot 5^5 = 90 \cdot 5^5$$

First we choose 3 places for even digits. This can be done in6 3= 20 ways. Observe that the other places for odd digits get automatically ﬁxed. There are 5 even digits and 5 odd digits. Any of these can occur in their proper places. Hence there are 56 ways of selecting 3 even and 3 odd digits for a particular selection of place for even digits. Hence we get 20×56 such numbers. But this includes all those numbers having the ﬁrst digit equal to 0. Since we are looking for 6-digit numbers, these numbers have to be removed from our counting. If we ﬁx 0 as the ﬁrst digit, we have, 2 places for even numbers and 3 places for odd numbers. We can choose 2 places for even numbers in5 2= 10 ways. As earlier, for any such choice of places for even digits, we can chooseeven digits in 5 2 ways and odd digits in 53 ways. Hence the number of ways of choosing 3 even and 3 odd digits with 0 as the ﬁrst digit is 10×55. Therfore the number of 6-digit numbers with 3 even digits and 3 odd digits is 20×56 −10×55 = 10×55(10−1) = 281250.

Let us take EEEOOO where E stands for even and O stands for odd.

Here even and odd numbers can be arranged in $$\frac{6!}{(3!)(3!)}$$( $$6!$$ is divided by $$3!$$ because E and O is are repeated 3 times each). Now, even numbers can be arranged in $$5^3$$ and odd in $$5^3$$ ways. So one might think that $$5^6 *\frac{6!}{(3!)(3!)}$$ is the total possible arrangements. But if you notice carefully, the first digit can't be $$0$$. So let us remove the arrangements with $$0$$ as the first digit from the total arrangement.

When we fix $$0$$ as the first digit, there are $$5^5 * \frac{5!}{(2!)(3!)}$$ ways in which $$0$$ is the first digit of the 6 digit number(actually 5 digit now).

Now we can deduce that total number of arrangement = $$\left[5^6 * \frac{6!}{(3!)(3!)}\right] - \left[5^5 * \frac{5!}{(2!)(3!)}\right]$$