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)

  • Unioninclusive 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

OperationMembershipLogic dualNeeds ?Symmetric?Identity
at least onenoyes
bothnoyes
not in yes
in not nono
exactly oneXORnoyes

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 / StateQuantityResult
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