Exercise:
Set difference of set differences
$$ \overline{ (A-B) - (B-C) } = ? $$
Venn diagram proof:
$ (A-B) = \{1, 3 \} $
$ (B-C) = \{2, 5 \} $
$ \{1, 3 \} - \{2, 5 \} = \{1, 3 \}$
$ \overline{ (A-B) - (B-C) } = \overline{ \{1, 3 \} } = $
Laws of sets: Commutative, associative, and distributives
See reference 8.
Commutative
Definition:
order does not affect the outcome.
Commutative:
- addition 2+3 = 3+2
- multiplication 2*3 = 3*2
- union $ A \cup B = B \cup A $
- intersection $ A \cap B = B \cap A $
- symmetric difference $ A \oplus B = B \oplus A $
Not commutative:
- Subtraction $ 3-1 \neq 1-3 $
- Set difference $ A-B \neq B-A $
Associativity
Definition:
concerns the grouping of elements in an operation.
Associative:
- addition (a+b)+c = a +(b+c)
- multiplication (a*b)*c = a *(b*c)
- union $ (A \cup B) \cup C = A \cup (B \cup C) $
- intersection $ (A \cap B) \cap C = A \cap (B \cap C) $
- symmetric difference $ (A \oplus B) \oplus C = A \oplus (B \oplus C) $
Not associative
- set difference $ (A - B) - C \neq A - (B - C) $
Distributivity
Definition:
multiplying a sum is equal to multiplying each number and adding the sum
$$ a(b+c) = ac + ac $$
3*(2+5) = 3*2 + 3*5 = 21
$$ A \cup (B \cap C) = (A \cup B) \cap (A \cup C) $$
$$ A \cap (B \cup C) = (A \cap B) \cup (A \cap C) $$
Using set identities to simplify expressions
Prove
$$ \overline{(A \cap B) \cup \overline{B}} = B \cap \overline{A}$$
$ \ \ \ \ \overline{(A \cap B) \cup \overline{B}} = $
$ = \overline{ (A \cap B )} \cap \overline{\overline{B}} $ - De Morgan's law
$ = \overline{ (A \cap B )} \cap B $
$ = ( \overline{A} \cup \overline{B} ) \cap B $ - De Morgan's law
$ = B \cap (\overline{A} \cup \overline{B}) $ - commutative
$ = (B \cap \overline{A}) \cup (B \cap \overline{B}) $ - distributive
$ = (B \cap \overline{A}) \cup \ \varnothing $
$ = B \cap \overline{A} $
Exercise
$ A \cap ( B \cap \overline{A} ) = $
$ = (A \cap B) \cap ( A \cap \overline{A} ) $
$ = (A \cap B) \cap \varnothing = \varnothing $ !
OR
$ A \cap ( B \cap \overline{A} ) = $
$ = A \cap B \cap \overline{A} = $
$ = B \cap A \cap \overline{A} = $
$ = B \cap \varnothing = \varnothing $ !
Exercise
$ \overline{ \overline{A \cup B} \cup \overline{A} } $
$ \overline{A \cup B } = \{4\} $ - Vann diagram
$ \overline{ \{4\} \cup \overline{A} } = $
$ \overline{ \{4\} \cup \{3, 4\} } = \{3, 4 \} = \overline{A} $ !
Exercise
$ \overline{ (A - B) - (B-C) } $
Exercise:
$ \overline{ \overline{A \cup B} \cup \overline{B} } $
$ \overline{A \cup B} = \{ 4 \} $
$ \overline{B} = \{1, 4 \} $
$ \overline{A \cup B} \cup \overline{B} = \{ 1, 4 \} = \overline{B} $
$ \overline{ \overline{A \cup B} \cup \overline{B} } = B = \{2, 3 \} $ !
Exercise:
$ \overline{ A \cup \overline{B} \cup C } \cap \overline{B} $
$ U = \{ 1, 2, 3, 4, 5, 6, 7, 8 \} $
$ \overline{B} = \{ 1, 3, 7, 8 \} $
$ A = \{ 1, 2, 3, 4 \} $
$ C = \{ 3, 4, 6, 7 \} $
$ \overline{ \{ 1, 2, 3, 4 \} \cup \{ 1, 3, 7, 8 \} \cup \{ 3, 4, 6, 7 \}} \cap \{ 1, 3, 7, 8 \} $
$ \overline{ \{ 1, 2, 3, 4, 6, 7, 8 \} } \cap \{ 1, 3, 7, 8 \} $
$ \{ 5, 6 \} \cap \{ 1, 3, 7, 8 \} = \varnothing $
Exercise:
$ A \cup ( B \cup \overline{A}) = $
$ A \cup B \cup \overline{A} = $
$ B \cup A \cup \overline{A} = $
$ B \cup \varnothing = B$
Q.E.D.
Tip:
Q.E.D. QUOD ERAT DEMONSTRANDUM means "Which was to be demonstrated."
Partition of a set
See reference 9.
Definition:
A partition of set A,
is a set of subsets $ A_i $ of A such that:
all the subsets $ A_i $ are disjointed,
and the union of all subsets $ A_i $ is equal to A.
Exercise
1. Using IEP, split above:
2. Using IEP, split $ | A\cup B | $ above:
3. Combine the two terms:
4. Use associativity of addition for arranging the terms:
$ = \color{green}{ | A | + | B | + | C | - | A \cap B | } - | (A \cup B) \cap C | = $
5. Using distributivity of the intersection, split the last union:
6. Using IEP, split the term
$ = | ( A \cap C ) \cup ( A \cap B) | = | A \cap C | + | A \cap B | - | A \cap C) | \cap | A \cap B |$
7. Combine the terms
$ = \color{green}{ | A | + | B | + | C | - | A \cap B | - | A \cap C | + | A \cap B | } - | A \cap C | \cap | A \cap B | $
9. Combining the terms:
$ = \color{green}{| A | + | B | + | C | - | A \cap B | - | A \cap C | + | A \cap B | - | A \cap B \cap C | } $
Q.E.D.