In a group of 30 students, each student has opted for at least one of

In a group of 30 students, each student has opted for at least one of the two subjects, Hindi and English. Twelve of them have opted for Hindi and twenty-two have opted for English. The number of students who have opted for only English is :

22
18
12
8
This question was previously asked in
UPSC CISF-AC-EXE – 2022
Let H be the set of students who opted for Hindi and E be the set of students who opted for English. We are given the total number of students, $|H \cup E| = 30$ (since each student opted for at least one subject). We are given $|H| = 12$ and $|E| = 22$. The number of students who opted for both subjects is the intersection of H and E, denoted by $|H \cap E|$. Using the principle of inclusion-exclusion for two sets, we have $|H \cup E| = |H| + |E| – |H \cap E|$. Substituting the given values, $30 = 12 + 22 – |H \cap E|$. This gives $30 = 34 – |H \cap E|$, so $|H \cap E| = 34 – 30 = 4$. The number of students who opted for only English is the number of students in E minus the number of students in both H and E. So, number of students who opted for only English = $|E| – |H \cap E| = 22 – 4 = 18$.
– Total students = Students who opted for Hindi only + Students who opted for English only + Students who opted for both.
– $|H \cup E| = |H \text{ only}| + |E \text{ only}| + |H \cap E|$.
– $|H| = |H \text{ only}| + |H \cap E|$.
– $|E| = |E \text{ only}| + |H \cap E|$.
From $|H \cap E|=4$, we can also find the number of students who opted for only Hindi: $|H \text{ only}| = |H| – |H \cap E| = 12 – 4 = 8$.
Check: Total students = (Only Hindi) + (Only English) + (Both) = 8 + 18 + 4 = 30, which matches the given information.