
4. Find the number of all 6-digit natural numbers having exactly three odd digits and three even digits.


Solution: First we choose 3 places for even digits. This can be done in $\binom{6}{3}=20$ ways. Observe that the other places for odd digits get automatically fixed. There are 5 even digits and 5 odd digits. Any of these can occur in their proper places. Hence there are $5^{6}$ ways of selecting 3 even and 3 odd digits for a particular selection of place for even digits. Hence we get $20 \times 5^{6}$ such numbers. But this includes all those numbers having the first digit equal to 0 . Since we are looking for 6 -digit numbers, these numbers have to be removed from our counting. If we fix 0 as the first digit, we have, 2 places for even numbers and 3 places for odd numbers. We can choose 2 places for even numbers in $\binom{5}{2}=10$ ways. As earlier, for any such choice of places for even digits, we can choose even digits in $5^{2}$ ways and odd digits in $5^{3}$ ways. Hence the number of ways of choosing 3 even and 3 odd digits with 0 as the first digit is $10 \times 5^{5}$. Therfore the number of 6 -digit numbers with 3 even digits and 3 odd digits is

$$
20 \times 5^{6}-10 \times 5^{5}=10 \times 5^{5}(10-1)=281250
$$
