In a class of $140$ students numbered $1$ to $140$, all even numbered students opted Mathematics course, those whose number is divisible by $3$ opted Physics course and those whose number is divisible by $5$ opted Chemistry course. Then the number of students who did not opt for any of the three courses is
(A)
$42$
(B)
$102$
(C)
$1$
(D)
$38$
MEDIUM
Correct Answer:D
Explanation
Let $A$ be the set of students who opted for Mathematics, $B$ be the set of students who opted for Physics, and $C$ be the set of students who opted for Chemistry. We are given:
Total number of students $= 140$
$n(A) = \lfloor\frac{140}{2}\rfloor = 70$
$n(B) = \lfloor\frac{140}{3}\rfloor = 46$
$n(C) = \lfloor\frac{140}{5}\rfloor = 28$
$n(A \cap B) = \lfloor\frac{140}{6}\rfloor = 23$
$n(B \cap C) = \lfloor\frac{140}{15}\rfloor = 9$
$n(C \cap A) = \lfloor\frac{140}{10}\rfloor = 14$
$n(A \cap B \cap C) = \lfloor\frac{140}{30}\rfloor = 4$
Using the principle of inclusion-exclusion:
$n(A \cup B \cup C) = n(A) + n(B) + n(C) - n(A \cap B) - n(B \cap C) - n(C \cap A) + n(A \cap B \cap C)$
$n(A \cup B \cup C) = 70 + 46 + 28 - 23 - 9 - 14 + 4 = 102$
The number of students who did not opt for any of the three courses is:
$140 - n(A \cup B \cup C) = 140 - 102 = 38$