SET 07 · Set Operations & Venn Diagrams

OperationNotationDefinitionLogic
Unionin A or B (or both)
Intersectionin both A and B
Differencein A but not in B
Complement (, )not in A (within U)
Symmetric differencein exactly one → SET 09 Symmetric Difference

Memory — operations are connectives

∪ = ∨ (cup = or), ∩ = ∧ (cap = and), ’ = ¬, − = “and not”. Any set question can be turned into a logic question.

Venn diagrams

  • Rectangle = universal set U. Circles = sets.
  • — the lens where circles overlap.
  • — both circles fully shaded. It’s the three pieces “only A”, “only B”, “both”.
  • — A’s circle minus the overlap (“only A”).
  • — everything in the rectangle outside A.

A = {1, 3, 5}, B = {1, 7, 8}

, , ,

A = {1, 3, 5}, B = {1, 2, 3}

. The difference A − B is also called the complement of B relative to A.

Complement

U = positive integers, A = integers > 10 ⇒ . The complement depends on U.

The most useful identity in GATE

Convert every ”−” to ”∩ ’” and you can simplify any expression with the logic laws in SET 08 Set Identities.

Difference is not commutative or associative

(generally). (generally).


⚡ Region method (fast way to compare 3-set expressions)

Three circles split U into 8 regions. Label each by membership (in A? in B? in C?):

RegionABCDescription
1✓✗✗only A
2✗✓✗only B
3✗✗✓only C
4✓✓✗A∩B, not C
5✓✗✓A∩C, not B
6✗✓✓B∩C, not A
7✓✓✓all three
8✗✗✗outside all

To compare two expressions, find which regions each one covers. Same region list ⇒ equal. This is a truth table in disguise: each region is a row.

In A, not B, not C → region 1 only.


Solved problems (slides) — try first

Q1. A = students living within one mile of school = {Mark, Allen, Roy}; B = students who walk to class = {Allen, John, Mark, Henry}. Describe and list:

a)

b)

c)

d)

Q2. Prove: (a) (b)

Q3. Which regions (table above) does each expression shade?

a)

b)

c)

GATE 2005 (X = (A−B)−C vs Y = (A−C)−(B−C)) → SET 11 GATE PYQs


Prev ← SET 06 Cartesian Product · Next → SET 08 Set Identities