Quiz 2
Registry Synced

Sets and Set Operations

3546 words
18 min read

Reading compass

Now · 🎯 Learning Objectives

Sets and Set Operations

🎯 Learning Objectives

By the end of this topic, you will be able to:
  1. Classify numbers into N,Z,Q,R,C\mathbb{N}, \mathbb{Z}, \mathbb{Q}, \mathbb{R}, \mathbb{C} and understand their hierarchy
  2. Define a set using roster form and set-builder notation
  3. Perform set operations — union, intersection, complement, difference, symmetric difference
  4. Compute cardinalities using the inclusion–exclusion principle
  5. Construct power sets and determine the number of subsets
  6. Interpret set relationships using Venn diagrams

📋 Prerequisites

  • Basic arithmetic — addition, subtraction, multiplication, division, modulo (remainder)
  • Logical connectives — AND (∧), OR (∨), NOT (¬) — first encountered in primary school logic

📖 Core Content

1.1 Number Systems — The Foundation

1.1.1 Intuition: What Are Numbers?

Numbers are humanity's way of keeping count. Before written language, shepherds notched tally sticks to track sheep — one notch per animal. That simple act of matching is the root of all number systems. Over centuries, we discovered we needed bigger and more flexible kinds of numbers to solve harder problems:
  • Counting → Natural numbers
  • Debt / temperature → Integers
  • Sharing a pizza → Rational numbers
  • The diagonal of a square → Irrational numbers (Real numbers)
  • Square roots of negatives → Complex numbers
💡 Why this matters: In data science, the type of number determines what operations are valid. You cannot average ZIP codes (they are labels, not quantities). You cannot take the log of a negative number (unless you use complex numbers). Understanding number systems prevents subtle bugs in data pipelines.

1.1.2 Formal Definitions

SetSymbolDescriptionExamples
Natural numbersN\mathbb{N}Counting numbers including 00,1,2,3,0, 1, 2, 3, \ldots
IntegersZ\mathbb{Z}Whole numbers, positive & negative,2,1,0,1,2,\ldots, -2, -1, 0, 1, 2, \ldots
Rational numbersQ\mathbb{Q}Fractions pq\frac{p}{q} where p,qZ, q0p,q \in \mathbb{Z},\ q \neq 012,34,5=51\frac{1}{2}, -\frac{3}{4}, 5 = \frac{5}{1}
Real numbersR\mathbb{R}All rational & irrational numbers2,π,e,0.333\sqrt{2}, \pi, e, 0.333\ldots
Complex numbersC\mathbb{C}Numbers of form a+bia + bi , i=1i = \sqrt{-1}1+2i,3i1 + 2i, -3i
Key hierarchical relationship:
NZQRC\mathbb{N} \subset \mathbb{Z} \subset \mathbb{Q} \subset \mathbb{R} \subset \mathbb{C}
Every natural number is an integer, every integer is rational, every rational is real, every real is complex — but the reverse is not true. (Diagram)

1.1.3 Important Properties

Discreteness vs. Density:
  • Integers are discrete. Between 2 and 3 there is no other integer. You can list them in order: ,2,1,0,1,2,\ldots, -2, -1, 0, 1, 2, \ldots
  • Rationals are dense. Between any two rational numbers, there is always another rational. For example, between 13\frac{1}{3} and 12\frac{1}{2}, the average 1/3+1/22=512\frac{1/3 + 1/2}{2} = \frac{5}{12} lies between them.
  • Reals are dense too. Between any two reals, there is another real. But reals also include irrationals like 2\sqrt{2} and π\pi, which cannot be expressed as pq\frac{p}{q}. Prime Numbers: A prime pp is a natural number >1> 1 whose only factors are 11 and pp itself. Examples: 2,3,5,7,11,13,2, 3, 5, 7, 11, 13, \ldots Every integer can be written uniquely as a product of primes (prime factorization). Example: 84=22×3×784 = 2^2 \times 3 \times 7.
🔍 Edge case: 11 is not prime — it has only one factor (itself). There is no largest prime (proved by Euclid).

1.1.4 Worked Examples

Example 1.1 (Easy): Classify each number: 4, 7, 227, 2, 4+14,\ -7,\ \frac{22}{7},\ \sqrt{2},\ 4 + \sqrt{-1}
NumberN\mathbb{N} ?Z\mathbb{Z} ?Q\mathbb{Q} ?R\mathbb{R} ?C\mathbb{C} ?
44
7-7
227\frac{22}{7}
2\sqrt{2}
4+14 + \sqrt{-1}
Example 1.2 (Medium): Find the prime factorization of 1260. Step 1: Start dividing by the smallest prime (2): 1260÷2=6301260 \div 2 = 630 Step 2: 630÷2=315630 \div 2 = 315 (2 doesn't divide 315) Step 3: 315÷3=105315 \div 3 = 105 (3 divides 315 since 3+1+5=93+1+5=9 divisible by 3) Step 4: 105÷3=35105 \div 3 = 35 Step 5: 35÷5=735 \div 5 = 7 Step 6: 77 is prime.
1260=22×32×5×7\boxed{1260 = 2^2 \times 3^2 \times 5 \times 7}
Example 1.3 (Exam-style): Prove that 2\sqrt{2} is irrational.
Proof
Proof by contradiction. Assume 2=pq\sqrt{2} = \frac{p}{q} where p,qZp, q \in \mathbb{Z}, q0q \neq 0, and gcd(p,q)=1\gcd(p,q) = 1 (fraction is in lowest terms).
Squaring both sides: 2=p2q2    p2=2q22 = \frac{p^2}{q^2} \implies p^2 = 2q^2
This means p2p^2 is even, so pp must be even. Write p=2kp = 2k.
Then (2k)2=2q2    4k2=2q2    q2=2k2(2k)^2 = 2q^2 \implies 4k^2 = 2q^2 \implies q^2 = 2k^2
So q2q^2 is even, hence qq is even. But then pp and qq are both even — they share a factor of 2, contradicting gcd(p,q)=1\gcd(p,q) = 1.
Thus 2\sqrt{2} cannot be expressed as pq\frac{p}{q}; it is irrational. ∎

1.2 The Concept of a Set

1.2.1 Intuition: What Is a Set?

A set is simply a collection of distinct objects considered as a single thing. Think of a shopping bag: it holds items (apples, milk, bread), and you carry the bag as one unit. The items inside are the elements (or members) of the set. A set cares only about which items are inside — not the order they're arranged, not whether they're repeated.
💡 Why this matters: Sets are the mathematical language for "grouping things." When we talk about "all users in the database" or "all products whose price > $100," we're implicitly working with sets. SQL's UNION, INTERSECT, and EXCEPT are direct translations of set operations.

1.2.2 Formal Definition

A set is an unordered collection of distinct elements.
  • Roster form: List elements inside curly braces. A={1,2,3,4}A = \{1, 2, 3, 4\}
  • Set-builder form: Describe the property that elements satisfy. A={xxN, x1, x4}A = \{x \mid x \in \mathbb{N},\ x \geq 1,\ x \leq 4\} Read as: "the set of all xx such that xx is a natural number, x1x \geq 1, and x4x \leq 4"
SymbolMeaningExample
\inElement of2{1,2,3}2 \in \{1,2,3\}
\notinNot element of4{1,2,3}4 \notin \{1,2,3\}
\subseteqSubset{1,2}{1,2,3}\{1,2\} \subseteq \{1,2,3\}
\subsetProper subset{1,2}{1,2,3}\{1,2\} \subset \{1,2,3\}
\emptysetEmpty set{}\{\} or \emptyset
\mid or ::"Such that"{xx>0}\{x \mid x > 0\}
Key properties:
  • Unordered: {1,2,3}={3,1,2}\{1,2,3\} = \{3,1,2\}
  • No duplicates: {1,1,2}={1,2}\{1,1,2\} = \{1,2\}
  • Empty set ={}\emptyset = \{\} is a subset of every set.
  • Cardinality A|A| is the number of distinct elements in AA.

1.2.3 Set Comprehension Pattern

Set-builder notation follows a three-step pattern:
{xtransformxSgenerate,P(x)filter}\{\underbrace{x}_{\text{transform}} \mid \underbrace{x \in S}_{\text{generate}}, \underbrace{P(x)}_{\text{filter}}\}
  • Generate: Draw elements from an existing set
  • Filter: Keep only those satisfying a condition
  • Transform: (Optional) Apply a function to each kept element Examples:
  • Even integers: {xxZ, xmod2=0}\{x \mid x \in \mathbb{Z},\ x \bmod 2 = 0\}
  • Perfect squares: {n2nN}\{n^2 \mid n \in \mathbb{N}\}
  • Rational numbers in lowest terms: {p/qp,qZ, q0, gcd(p,q)=1}\{p/q \mid p,q \in \mathbb{Z},\ q \neq 0,\ \gcd(p,q)=1\}

1.2.4 Power Set

The power set of a set AA, denoted P(A)\mathcal{P}(A) or 2A2^A, is the set of all subsets of AA, including the empty set and AA itself. If A=n|A| = n, then P(A)=2n|\mathcal{P}(A)| = 2^n. Reason: Each of the nn elements can either be in or out of a given subset — 2 choices per element → 2n2^n total subsets. Example: A={a,b}A = \{a, b\}
P(A)={,{a},{b},{a,b}}\mathcal{P}(A) = \{\emptyset, \{a\}, \{b\}, \{a,b\}\}
A=2|A| = 2, P(A)=22=4|\mathcal{P}(A)| = 2^2 = 4. (Diagram)

1.2.5 Worked Examples

Example 2.1 (Easy): Write the set {xxZ, 3<x3}\{x \mid x \in \mathbb{Z},\ -3 < x \leq 3\} in roster form. Solution: The integers greater than 3-3 and up to and including 33 are: 2,1,0,1,2,3-2, -1, 0, 1, 2, 3.
{2,1,0,1,2,3}\boxed{\{-2, -1, 0, 1, 2, 3\}}
Example 2.2 (Medium): How many subsets does A={1,2,3,4,5}A = \{1, 2, 3, 4, 5\} have? Step 1: A=5|A| = 5 Step 2: Number of subsets = 25=322^5 = 32 Step 3: Number of proper subsets (excluding AA itself) = 321=3132 - 1 = 31
32 subsets, 31 proper subsets\boxed{32 \text{ subsets, } 31 \text{ proper subsets}}
Example 2.3 (Hard): Let A={1,2,{3,4}}A = \{1, 2, \{3, 4\}\}. Find A|A| and P(A)\mathcal{P}(A). Step 1: Count elements in AA. The elements are: 11, 22, and {3,4}\{3,4\} (a set is a single element). So A=3|A| = 3. Step 2: P(A)\mathcal{P}(A) has 23=82^3 = 8 elements:
{, {1}, {2}, {{3,4}}, {1,2}, {1,{3,4}}, {2,{3,4}}, {1,2,{3,4}}}\{\emptyset,\ \{1\},\ \{2\},\ \{\{3,4\}\},\ \{1,2\},\ \{1,\{3,4\}\},\ \{2,\{3,4\}\},\ \{1,2,\{3,4\}\}\} A=3, P(A)=8\boxed{|A| = 3,\ |\mathcal{P}(A)| = 8}
⚠️ Edge case: {3,4}\{3,4\} is a single element of AA, so its cardinality counts as 1, not 2. This is a common mistake.

1.3 Set Operations

1.3.1 Intuition: Combining Sets

Sets can be combined just like numbers. If sets AA and BB represent "users who liked product X" and "users who liked product Y", then:
  • Union (ABA \cup B): Users who liked X OR Y (or both)
  • Intersection (ABA \cap B): Users who liked both X AND Y
  • Difference (ABA \setminus B): Users who liked X but NOT Y
  • Complement (AcA^c or A\overline{A}): Users who did NOT like X (Diagram)
OperationNotationDefinitionVenn Diagram
UnionABA \cup B{xxA or xB}\{x \mid x \in A \text{ or } x \in B\}
IntersectionABA \cap B{xxA and xB}\{x \mid x \in A \text{ and } x \in B\}
DifferenceABA \setminus B{xxA and xB}\{x \mid x \in A \text{ and } x \notin B\}
ComplementAcA^c or A\overline{A}{xUxA}\{x \in U \mid x \notin A\}
Symmetric Diff.ABA \triangle B(AB)(BA)(A \setminus B) \cup (B \setminus A)
🔍 Key relationship: AB=(AB)(AB)A \triangle B = (A \cup B) \setminus (A \cap B)

1.3.2 Properties of Set Operations

PropertyFormula
CommutativeAB=BAA \cup B = B \cup A , AB=BAA \cap B = B \cap A
Associative(AB)C=A(BC)(A \cup B) \cup C = A \cup (B \cup C)
DistributiveA(BC)=(AB)(AC)A \cap (B \cup C) = (A \cap B) \cup (A \cap C)
IdentityA=AA \cup \emptyset = A , AU=AA \cap U = A
ComplementAAc=UA \cup A^c = U , AAc=A \cap A^c = \emptyset
IdempotentAA=AA \cup A = A , AA=AA \cap A = A
De Morgan's Laws (very important):
  • (AB)c=AcBc(A \cup B)^c = A^c \cap B^c
  • (AB)c=AcBc(A \cap B)^c = A^c \cup B^c
💡 Memory Aid: "Break the parenthesis, flip the operator." Union becomes intersection, intersection becomes union, complement each term.

1.3.3 Cardinality and Inclusion–Exclusion

For finite sets:
SituationFormula
Two sets, possibly overlapping$
Two disjoint sets$
Three sets$
The pattern: add all singles, subtract all pairwise intersections, add all triple intersections.

1.3.4 Worked Examples

Example 3.1 (Easy): Let U={1,2,3,4,5,6,7,8,9,10}U = \{1,2,3,4,5,6,7,8,9,10\}, A={1,2,3,4}A = \{1,2,3,4\}, B={3,4,5,6}B = \{3,4,5,6\}. Find ABA \cup B, ABA \cap B, ABA \setminus B, AcA^c. Step 1: AB={1,2,3,4,5,6}A \cup B = \{1,2,3,4,5,6\} (all elements in A or B) Step 2: AB={3,4}A \cap B = \{3,4\} (common to both) Step 3: AB={1,2}A \setminus B = \{1,2\} (in A but not in B) Step 4: Ac=UA={5,6,7,8,9,10}A^c = U \setminus A = \{5,6,7,8,9,10\}
AB={1,2,3,4,5,6}, AB={3,4}, AB={1,2}, Ac={5,6,7,8,9,10}\boxed{A \cup B = \{1,2,3,4,5,6\},\ A \cap B = \{3,4\},\ A \setminus B = \{1,2\},\ A^c = \{5,6,7,8,9,10\}}
Example 3.2 (Medium): In a class of 50 students, 30 like Mathematics, 20 like Physics, and 10 like both. How many like neither? Step 1: M=30|M| = 30, P=20|P| = 20, MP=10|M \cap P| = 10, U=50|U| = 50 Step 2: MP=M+PMP=30+2010=40|M \cup P| = |M| + |P| - |M \cap P| = 30 + 20 - 10 = 40 Step 3: Like neither =UMP=5040=10= |U| - |M \cup P| = 50 - 40 = 10
10 students like neither\boxed{10 \text{ students like neither}}
Example 3.3 (Hard): In a survey of 100 people: 60 read Times of India, 50 read The Hindu, 40 read Indian Express, 20 read TOI and Hindu, 15 read TOI and Express, 10 read Hindu and Express, 5 read all three. How many read at least one? Step 1: Apply inclusion–exclusion for three sets: THE=T+H+ETHTEHE+THE|T \cup H \cup E| = |T| + |H| + |E| - |T \cap H| - |T \cap E| - |H \cap E| + |T \cap H \cap E| =60+50+40201510+5= 60 + 50 + 40 - 20 - 15 - 10 + 5 =15045+5=110= 150 - 45 + 5 = 110 Wait — this exceeds 100! What's wrong? Step 2: Check: The data must mean that the 55 who read all three are already counted in the pairwise intersections. But TH=20|T \cap H| = 20 includes those 5, etc. The formula is correct: =15045+5=110= 150 - 45 + 5 = 110. So there's inconsistency in the data (a common real-world issue). If the survey is accurate, some counts must be adjusted.
110 (possible data inconsistency)\boxed{110 \text{ (possible data inconsistency)}}
⚠️ Edge case: Inclusion–exclusion can exceed the total population, revealing measurement error.

📐 Key Formulas — Summary Table

ConceptFormulaWhen to Use
Cardinality (2 sets)$\A \cup B\
Cardinality (3 sets)$\A \cup B \cup C\
Number of subsets2n2^nPower set problems
De Morgan (union)(AB)c=AcBc(A \cup B)^c = A^c \cap B^cSimplifying complements
De Morgan (intersection)(AB)c=AcBc(A \cap B)^c = A^c \cup B^cSimplifying complements
Symmetric differenceAB=(AB)(BA)A \triangle B = (A \setminus B) \cup (B \setminus A)XOR-like operations
Number of elementsn(A)=n(AB)+n(AB)n(B)n(A) = n(A \cup B) + n(A \cap B) - n(B)Missing value problems
Prime factorizationUnique product of primesGCD, LCM, simplifying fractions
Density propertyBetween any two reals, another real existsRational/real number theory

⚠️ Common Pitfalls

Pitfall 1: Confusing \emptyset and {}\{\emptyset\}

Mistake: Thinking \emptyset and {}\{\emptyset\} are the same. Why: \emptyset is the empty set (no elements). {}\{\emptyset\} is a set containing one element — the empty set. Their cardinalities differ: =0|\emptyset| = 0, {}=1|\{\emptyset\}| = 1. Correct approach:
  • {}\emptyset \subseteq \{\emptyset\} (true — empty set is subset of every set)
  • {}\emptyset \in \{\emptyset\} (true — the empty set is an element of {}\{\emptyset\})
  • {}\{\emptyset\} \subseteq \emptyset (false — {}\{\emptyset\} has an element but \emptyset has none)

Pitfall 2: Double-Counting in Set Cardinality Problems

Mistake: Adding the sizes of two overlapping sets without subtracting the intersection. Example: If 20 take Math, 30 take Physics, 5 take both, total = 20 + 30 = 50 (INCORRECT). Correct: 20+305=4520 + 30 - 5 = 45. How to catch: Draw a Venn diagram. The intersection region is counted twice if you simply add.

Pitfall 3: Confusing \subset (proper subset) with \subseteq (subset)

Mistake: Writing ABA \subset B when A=BA = B is possible. Correct:
  • ABA \subseteq B means every element of AA is also in BB (possibly equal sets)
  • ABA \subset B means ABA \subseteq B and ABA \neq B (strict containment) Example: {1,2}{1,2}\{1,2\} \subseteq \{1,2\} is true; {1,2}{1,2}\{1,2\} \subset \{1,2\} is false.

Pitfall 4: Misapplying De Morgan's Laws

Mistake: (AB)c=AcBc(A \cup B)^c = A^c \cup B^c (WRONG!) Correct: (AB)c=AcBc(A \cup B)^c = A^c \cap B^c and (AB)c=AcBc(A \cap B)^c = A^c \cup B^c. Memory aid: "Break and flip — union becomes intersection, vice versa."

📝 Practice Questions

Q1: Let A={xxZ, x216}A = \{x \mid x \in \mathbb{Z},\ x^2 \leq 16\}. List AA in roster form.
Strategy Hint: Find all integers whose square is ≤ 16.
Step 1: Integers whose square ≤ 16: (4)2=16(-4)^2 = 16, (3)2=9(-3)^2 = 9, (2)2=4(-2)^2 = 4, (1)2=1(-1)^2 = 1, 02=00^2 = 0, 12=11^2 = 1, 22=42^2 = 4, 32=93^2 = 9, 42=164^2 = 16.
Step 2: These are 4,3,2,1,0,1,2,3,4-4, -3, -2, -1, 0, 1, 2, 3, 4.
A={4,3,2,1,0,1,2,3,4}\boxed{A = \{-4, -3, -2, -1, 0, 1, 2, 3, 4\}} Q2: If A=5|A| = 5, how many proper subsets does AA have?
Strategy Hint: Proper subsets exclude the set itself.
Step 1: Total subsets = 25=322^5 = 32 Step 2: Proper subsets = 321=3132 - 1 = 31
31\boxed{31} Q3: Let U={1,2,3,4,5,6}U = \{1,2,3,4,5,6\}, A={1,2,3}A = \{1,2,3\}, B={2,4,6}B = \{2,4,6\}. Find (AB)c(A \cup B)^c.
Strategy Hint: Find the union first, then complement relative to U.
Step 1: AB={1,2,3,4,6}A \cup B = \{1,2,3,4,6\} Step 2: (AB)c=U(AB)={5}(A \cup B)^c = U \setminus (A \cup B) = \{5\}
{5}\boxed{\{5\}} Q4: In a group of 60 people, 25 like tea, 30 like coffee, and 10 like both. How many like neither?
Strategy Hint: Use inclusion–exclusion.
Step 1: T=25|T| = 25, C=30|C| = 30, TC=10|T \cap C| = 10 Step 2: TC=25+3010=45|T \cup C| = 25 + 30 - 10 = 45 Step 3: (TC)c=6045=15|(T \cup C)^c| = 60 - 45 = 15
15 people\boxed{15 \text{ people}} Q5: Write the set of all perfect squares less than 50 in set-builder notation.
Strategy Hint: The transform can be applied to the generated variable.
{n2nN, n2<50}\boxed{\{n^2 \mid n \in \mathbb{N},\ n^2 < 50\}}
Or in roster form: {0,1,4,9,16,25,36,49}\{0, 1, 4, 9, 16, 25, 36, 49\}. Q6: How many subsets of {a,b,c,d}\{a, b, c, d\} contain the element aa?
Strategy Hint: aa is fixed as "in". The remaining 3 elements each have 2 choices.
Step 1: aa is forced to be in every such subset. Step 2: For each of b,c,db, c, d: in or out → 23=82^3 = 8 choices.
8\boxed{8} Q7: If ABA \subseteq B and BCB \subseteq C, prove ACA \subseteq C.
Strategy Hint: Use the definition of subset directly.
Proof: Let xAx \in A. Since ABA \subseteq B, xBx \in B. Since BCB \subseteq C, xCx \in C. Therefore every element of AA is in CC, so ACA \subseteq C. ∎ Q8: Verify De Morgan's law: (AB)c=AcBc(A \cap B)^c = A^c \cup B^c for U={1,,10}U = \{1,\ldots,10\}, A={2,4,6,8}A = \{2,4,6,8\}, B={1,2,3,4,5}B = \{1,2,3,4,5\}.
Strategy Hint: Compute both sides independently and compare.
Step 1: AB={2,4}A \cap B = \{2,4\} Step 2: (AB)c={1,3,5,6,7,8,9,10}(A \cap B)^c = \{1,3,5,6,7,8,9,10\} Step 3: Ac={1,3,5,7,9,10}A^c = \{1,3,5,7,9,10\}, Bc={6,7,8,9,10}B^c = \{6,7,8,9,10\} Step 4: AcBc={1,3,5,6,7,8,9,10}A^c \cup B^c = \{1,3,5,6,7,8,9,10\} Step 5: Both sides equal {1,3,5,6,7,8,9,10}\{1,3,5,6,7,8,9,10\}. ✓
Verified\boxed{\text{Verified}} Q9: 70 students: 40 play cricket, 35 play football, 20 play both. How many play exactly one sport?
Strategy Hint: Exactly one = (Cricket only) + (Football only).
Step 1: Cricket only = 4020=2040 - 20 = 20 Step 2: Football only = 3520=1535 - 20 = 15 Step 3: Exactly one = 20+15=3520 + 15 = 35
35 students\boxed{35 \text{ students}} Q10: Show that 3\sqrt{3} is irrational.
Strategy Hint: Follow the same contradiction proof as 2\sqrt{2}.
Proof: Assume 3=p/q\sqrt{3} = p/q in lowest terms. Then p2=3q2p^2 = 3q^2. So p2p^2 is divisible by 3 ⇒ pp is divisible by 3 (since if a prime divides p2p^2, it divides pp). Write p=3kp = 3k. Then 9k2=3q2q2=3k29k^2 = 3q^2 \Rightarrow q^2 = 3k^2, so qq is also divisible by 3. Contradiction (gcd would be at least 3). ∎ Q11: Let A={,{}}A = \{\emptyset, \{\emptyset\}\}. Find P(A)\mathcal{P}(A).
Strategy Hint: AA has two elements: \emptyset and {}\{\emptyset\}.
Step 1: A=2|A| = 2, so P(A)=4|\mathcal{P}(A)| = 4. Step 2: P(A)={, {}, {{}}, {,{}}}\mathcal{P}(A) = \{\emptyset,\ \{\emptyset\},\ \{\{\emptyset\}\},\ \{\emptyset, \{\emptyset\}\}\}
{, {}, {{}}, {,{}}}\boxed{\{\emptyset,\ \{\emptyset\},\ \{\{\emptyset\}\},\ \{\emptyset, \{\emptyset\}\}\}}
Note: Don't confuse \emptyset (empty set), {}\{\emptyset\} (set containing empty set), and {{}}\{\{\emptyset\}\} (set containing the set containing empty set)! Q12: Among 120 students: 65 enrolled in ML, 55 in AI, 45 in DS, 25 in ML & AI, 20 in ML & DS, 15 in AI & DS, 10 in all three. How many enrolled in at least one?
Strategy Hint: Three-set inclusion–exclusion.
Step 1: MLAIDS=65+55+45252015+10|ML \cup AI \cup DS| = 65 + 55 + 45 - 25 - 20 - 15 + 10 =16560+10=115= 165 - 60 + 10 = 115
115 students\boxed{115 \text{ students}}

🔗 Cross-References

Document outline

Keep your place and jump directly to a heading.

Table of Contents
System Normal // Awaiting Context

Intelligence Hub

Navigate the knowledge graph to generate context. The Hub adapts dynamically to surface backlinks, related notes, and metadata insights.