Why does the method of inclusion/exclusion give the wrong answer when finding the number of integers b/w 1 and 10 that are not divisible by 2,3 or 5?

138 Views Asked by At

Let $S=\{1,2,\dots, 10\}$.


METHOD 1: I'm first counting the integers that are divisible by $2, 3$ or $5$ in $S$ and then subtracting from the total as follows:

Let $A, B, C$ be the set of integers that are divisible by $2, 3$ and $5$, respectively.

$A=\{2,4,6,8,10\}, B=\{3, 6, 9\}$ and $C=\{5, 10\}$.

We have $|A\cup B\cup C|=|A|+|B|+|C|-|A\cap B| - |A\cap C| - |B\cap C| + |A\cap B\cap C|=5+3+2-1-1-0=8$ is the number of integers that are divisible by $2, 3$ or $5$, so that $10-8=2$ must be those not divisible by either of $2, 3$ or $5$.


METHOD 2: Here I'm counting the integers not divisible by $2, 3$ or $5$ in $S$ directly as follows:

Let $A, B, C$ be the set of integers that are not divisible by $2, 3$ and $5$, respectively.

$A=\{1,3,5,7,9\}, B=\{1,2,4,5,7,8,10\}$ and $C=\{1,2,3,4,6,7,8,9\}$.

Then $|A\cup B\cup C|=|A|+|B|+|C|-|A\cap B| - |A\cap C| - |B\cap C| + |A\cap B\cap C|=5+7+8-3-4-5+2=10$, which is clearly wrong.

1

There are 1 best solutions below

0
On BEST ANSWER

In the second method you want to get $|A\cap B \cap C|$ not $|A \cup B \cup C|$.