Discrete Structures

# Lecture Notes, 29 Oct 2010

 Last Update: 29 October 2010 Note: or material is highlighted

## §2.2: Set Operations (cont'd)

1. I didn't cover this in lecture, but it's useful information:

|A ∪ B||A| + |B|

1. Why? Because possibly A ∩ B ≠ ∅!
2. |A ∪ B| = |A| + |B||A ∩ B|

2. Set Identities:

1. Compare Table 1 (p. 124) to Table 6 (p. 24)
2. Set identities are just like logical equivalences

3. Reminder:

Let U = universe.
Then ‾A =def U – A = {x | x ∈ U ∧ x ∉ A}
= {x ∈ U | x ∉ A}
= {x | x ∉ A}.

"‾" is an operator on sets that corresponds to (or is defined in terms of) "¬", which is an operator on propositions

4. Thm: (DeMorgan for sets)

‾(A ∪ B) = (‾A) ∩ (‾B)

proof:

 ‾(A ∪ B) = {x | x ∈ ‾(A ∪ B)} : definition of set = {x | x ∉ (A ∪ B)} : definition of ‾ = {x | ¬[x ∈ (A ∪ B)]} : definition of ∉ = {x | ¬[(x ∈ A) ∨ (x ∈ B)]} : definition of ∪ = {x | (x ∉ A) ∧ (x ∉ B)} : DeM for ∨ & def of ∉ = {x | (x ∈ ‾A) ∧ (x ∈ ‾B)} : definition of ‾ = {x | x ∈ (‾A ∩ ‾B)} : definition of ∩ = (‾A) ∩ (‾B) : definition of set
QED

1. (*) Lemma (based on def of ‾):

Let S,T be sets.
Then S – T = S ∩ ‾T

proof:

S – T = {x | (x ∈ S) ∧ (x ∉ T)}
= {x | x ∈ S} ∩ {x | x ∉ T}
= S ∩ ‾T
QED

2. Show (S – T) ∩ (T – S) = ∅:

1. Proof #1:

 (S – T) ∩ (T – S) = (S ∩ ‾T) ∩ (T ∩ ‾S) : Lemma, based on def of ‾(*) = (S ∩ ‾S) ∩ (T ∩ ‾T) : commutativity of ∩ = ∅ ∩ ∅ : complement law (p. 124) = ∅ : def of ∅ & ∩
QED

2. Proof #2:

 (S – T) ∩ (T – S) = {x | x ∈ [(S – T) ∩ (T – S)]} : def of set = {x | [x ∈ (S – T)] ∧ [x ∈ (T – S)]} : def of ∩ = {x | (x ∈ S ∧ x ∉ T) ∧ (x ∈ T ∧ x ∉ S)} : def of – = {x | x ∈ S ∧ x ∉ S} ∩ {x | x ∈ T ∧ x ∉ T} : commutativity of ∧ & def of ∩ = ∅ ∩ ∅ : def of ∅ = ∅ : def of ∅ & ∩
QED

3. Show ‾[A ∪ (B ∩ C)] = ‾A ∩ (‾B ∪ ‾C):

1. Proof #1:

 ‾[A ∪ (B ∩ C)] = ‾A ∩ ‾(B ∩ C) : DeM = ‾A ∩ (‾B ∪ ‾C) : DeM
QED

2. Proof #2:

 ‾[A ∪ (B ∩ C)] = {x | x ∉ [A ∪ (B ∩ C)]} : (justifications are left to you!) = {x | ¬[x ∈ [A ∪ (B ∩ C)]]} = {x | ¬[(x ∈ A) ∨ (x ∈ (B ∩ C))]} = {x | ¬(x ∈ A) ∧ ¬(x ∈ (B ∩ C))} = {x | (x ∈ ‾A) ∧ (x ∈ ‾(B ∩ C))} = {x | (x ∈ ‾A) ∧ (x ∈ (‾B ∪ ‾C))} = {x | x ∈ [‾A ∩ (‾B ∪ ‾C)]} = ‾A ∩ (‾B ∪ ‾C)
QED

4. Can have ∪, ∩ over more than 2 sets:

1. {0,1,2} ∪ {3,4} ∪ {xN | x ≥ 5} = N

2. ({0,1,2} ∩ {0,2}) ∪ {3} = {0,2} ∪ {3} = {0,2,3}

3. {0,1,2} ∩ ({0,2} ∪ {3}) = {0,1,2} ∩ {0,2,3} = {0,2}

4. Note: I now have to introduce some notation that cannot easily be shown in HTML; I'll do my best.

Notation:

i = n
∪Ai =def A1 ∪ A2 ∪ … ∪ An
i = 1