How many six digit numbers are even or are divisible by 5?

282 Views Asked by At

Here is my attempt:

$$\text{Let A be the set of 6-digit numbers that are even.}$$ $$\text{Let B be the set of 6-digit numbers divisible by 5.}$$ $$\text{Thus, $A\cap B$ is the set of 6-digit numbers that are even and divisible by 5.}$$ $$|A|=9\cdot 10^4\cdot 5,\space|B|=9\cdot 10^4\cdot 2$$ $$\implies |A\cup B|=9\cdot 10^4+9\cdot 10^4\cdot 5-|A\cap B| $$

I must use the Principle of Inclusion-Exclusion but I'm having difficulty finding $A\cap B$. I only know I have 2 choices (0 or 5) for the ones digit since it must be divisible by 5.

2

There are 2 best solutions below

0
On BEST ANSWER

A number is even or a multiple of 5 exactly when it's final digit is one of $\{0,2,4,5,6,8\}$. There are $9$ possible choices for the first digit, $10$ choices for digits 2 to 5, and $6$ choices for the final digit, making a total of $9 \times 10^4 \times 6 = 540,000$ such numbers.

If you want to use the principle of inclusion-exclusion, observe that a number is even exactly when it ends in one of $\{0,2,4,6,8\}$, and is divisible by 5 exactly when the final digit is one of $\{0,5\}$. So, if a number is both even and divisible by 5, it must end in $0$, as the only number in both lists.

You have calculated $|A|$ and $|B|$ correctly, hopefully it is now clear that $|A \cap B|$ is just $9 \times 10^4$, and the final answer can be obtained with the inclusion-exclusion formula as you had in your question: $$9 \times 10^4 \times 5 + 9 \times 10^4 \times 2 - 9 \times 10^4 = 9 \times 10^4 \times 6 = 540,000.$$

1
On

Alternative approach.

Construe the problem as a probability problem.

The number of elements in the set

$$\{100000, 100001, \cdots, 999999\}$$

is $~999999 - 99999 = 900000.$

Since the digits $~\{0,1,\cdots, 9\}~$ are (in effect) each equally likely to occur in the rightmost place of the $~6~$ digit number, and since the constraints will be satisfied if and only if the rightmost digit is an element of $~\{0,2,4,5,6,8\},~$ rather than an element of $~\{1,3,7,9\},~$ you may infer that the probability of a random $~6~$ digit number having the appropriate rightmost digit is $~\dfrac{6}{10}.$

Therefore, the number of satisfying 6 digit numbers must be

$$900000 \times \frac{6}{10}.$$