Set Operations (Mathematics)
Context: FIT1058_MOC · the combining operations on sets — union, intersection, complement, difference, symmetric difference · each mirrors a logical connective
Quick Revision
- 🎯 Objective: combine/compare sets by membership predicates ➔ , , , XOR.
- 📦 Core Components: union/intersection ➔ complement/difference (needs vs not) ➔ symmetric difference (equality test).
- ⚡ Key Constraint: (never blindly additive); .
📝 Core
1. Union & Intersection (or / and)
- Union ➔ ➔ inclusive or (keeps shared elements once).
- Intersection ➔ .
- Containment sandwich ➔ ; identities , .
- Cardinality ➔ (inclusion–exclusion); only when disjoint.
2. Complement & Difference (everything except)
- Universal set ➔ = universe of discourse; complement .
- Difference ➔ — more general, needs no ; complement is the special case .
- Finite counts ➔ ; involution .
- Notation discipline ➔ the bar suppresses — write when several universes are in play (Sets of Numbers, Sets of Strings).
3. De Morgan’s Laws
- Push complement inward ➔ (“not in either”), (“not in both”) — swap .
- Mirrors logic ➔ etc.
4. Symmetric Difference (exactly one)
- Three forms ➔ .
- Equality test ➔ ; self-difference .
- XOR algebra ➔ associative, commutative, identity , every set self-inverse; ; set analogue of Exclusive-or.
⚖️ Core Decision Matrix
| Operation | Membership | Logic dual | Needs ? | Symmetric? | Identity |
|---|---|---|---|---|---|
| at least one | no | yes | |||
| both | no | yes | |||
| not in | yes | — | — | ||
| in not | no | no | — | ||
| exactly one | XOR | no | yes |
When It Flips: every operation is a membership predicate, so set algebra inherits Boolean algebra — De Morgan binds to complement, and behaves as bitwise XOR on membership.
📊 Exam Execution Trace & Applied Exercises
1. Manual Execution Trace Layout
, , :
| Step / State | Quantity | Result |
|---|---|---|
| 0 (Init) | — | — |
| 1 | / | / |
| 2 | ✓ inclusion–exclusion | |
| 3 | / | / ✓ |
| 4 | (asymmetric) | |
| 5 | ||
| 6 | ✓ De Morgan |
⚠️ Common Mistakes
- 💡 Don’t add cardinalities blindly ➔ only when disjoint; overlap double-counted otherwise.
- 💡 Difference is not symmetric ➔ in general; the order-free version is .
- 💡 Inclusive vs exclusive or ➔ keeps “at least one”, keeps “exactly one” — they differ by .
🧠 Active Recall
State De Morgan's laws for sets and put each into words.
- Hint: Complement swaps .
Answer
- Short answer: (“not in either”); (“not in both”).
- Why: Mirrors logic ➔ , etc.
Why is generally not ?
- Hint: Overlap double-counted.
Answer
- Short answer: ; equality holds only when disjoint.
- Why: Inclusion–exclusion ➔ elements of are counted twice, subtracted once.
Define and ; which is more general and why?
- Hint: Complement suppresses .
Answer
- Short answer: ; needs no universe — complement is the case .
- Why: Names the universe ➔ the bar is relative to an unstated ; write when ambiguous.
Why does characterise set equality?
- Hint: Disagreement set.
Answer
- Short answer: collects elements in one set but not the other; empty ⟺ no disagreement.
- Why: Double inclusion ➔ emptiness gives and , so .