Practice free →
HomeGATE CSEcomputerscienceDiscrete Mathematics › $|A \cup B|$ (size of union) equals

$|A \cup B|$ (size of union) equals

A$|A| + |B|$
B$|A| \cdot |B|$
C$|A| + |B| - |A \cap B|$
D$\max(|A|, |B|)$
Answer & Solution
Correct answer: C. $|A| + |B| - |A \cap B|$
1. PRINCIPLE OF INCLUSION-EXCLUSION (PIE) for two sets: $|A \cup B| = |A| + |B| - |A \cap B|$. 2. Adding $|A|$ and $|B|$ double-counts the elements in BOTH (the intersection). Subtract once to correct. 3. Special case: if $A$ and $B$ are DISJOINT ($A \cap B = \emptyset$), then $|A \cup B| = |A| + |B|$ (option A's case). 4. PIE generalises to 3 sets: $|A \cup B \cup C| = |A|+|B|+|C| - |A\cap B| - |A\cap C| - |B\cap C| + |A\cap B\cap C|$. 5. Other options would over-count or under-count. _Source: Oscar Levin, "Discrete Mathematics: An Open Introduction", §1.2 + Counting (PIE)._
Solve this in the app — GATE CSE practice & 24k+ MCQs →
Related questions