Lecture 2.2: Set Theory
CS 250, Discrete Structures, Fall 2015
Nitesh Saxena
Adopted from previous lectures by Cinda Heeren
04/21/23 Lecture 2.2 -- Set Theory 2
Course Admin HW1
Was just due We will start to grade it We will provide a solution set soon
Word Equation editor; Open Office Travel next week
Attending and presenting at a conference in Vienna:
http://esorics2015.sba-research.org/ No class next week (Tuesday and Thursday)
Would not affect our coverage Please utilize this time to review the previous lectures
04/21/23 Lecture 2.2 -- Set Theory 3
Outline
Set Theory, Operations and Laws
04/21/23 Lecture 2.2 -- Set Theory 4
Set Theory - Operators
The symmetric difference, A B, is: A B = { x : (x A x B) v (x B x A)}
= (A - B) U (B - A)
like “exclusive
or”
AU
B
04/21/23 Lecture 2.2 -- Set Theory 5
Set Theory - Operators
A B = { x : (x A x B) v (x B x A)}
= (A - B) U (B - A)
Proof:
{ x : (x A x B) v (x B x A)}= { x : (x A - B) v (x B - A)}
= { x : x ((A - B) U (B - A))}
= (A - B) U (B - A)
04/21/23 Lecture 2.2 -- Set Theory 6
Set Theory - Famous Laws Two pages of (almost) obvious.
One page of HS algebra.
One page of new.
Don’t memorize
them, understand
them!
They’re in Rosen, p.
130
04/21/23 Lecture 2.2 -- Set Theory 7
Set Theory - Famous Laws Identity
Domination
Idempotent
A U = AA U = A
A U U = UA =
A U A = AA A = A
04/21/23 Lecture 2.2 -- Set Theory 8
Set Theory - Famous Laws Excluded Middle
Uniqueness
Double complement
A U A = U
A A =
A = A
04/21/23 Lecture 2.2 -- Set Theory 9
Set Theory – Famous Laws Commutativity
Associativity
Distributivity
A U B =
(A U B) U C =
A B =
B U A
B A
(A B) C =
A U (B U C)
A (B C)
A U (B C) =
A (B U C) =
(A U B) (A U C)
(A B) U (A C)
04/21/23 Lecture 2.2 -- Set Theory 10
Set Theory – Famous Laws DeMorgan’s I
DeMorgan’s II
p q
Venn Diagrams are good for intuition, but we aim for a
more formal proof.
(A U B) = A B
(A B) = A U B
04/21/23 Lecture 2.2 -- Set Theory 11
3 Ways to prove Laws or set equalities
Show that A B and that A B.
Use a membership table.
Use logical equivalences to prove equivalent set definitions.
New & important
Like truth tables
Not hard, a little tedious
04/21/23 Lecture 2.2 -- Set Theory 12
Example – the first wayProve that
1. () (x A U B) (x A U B) (x A and x B) (x A B)
2. () (x A B) (x A and x B) (x A U B) (x A U B)
(A U B) = A B
04/21/23 Lecture 2.2 -- Set Theory 13
Example – the second wayProve that using a
membership table.0 : x is not in the specified set1 : otherwise
(A U B) = A B
A B A B A B AUB A U B
1 1 0 0 0 1 0
1 0 0 1 0 1 0
0 1 1 0 0 1 0
0 0 1 1 1 0 1
04/21/23 Lecture 2.2 -- Set Theory 14
Example – the third wayProve that using
logically equivalent set definitions.(A U B) = A B
(A U B) = {x : (x A v x B)}
= {x : (x A) (x B)}
= A B
= {x : (x A) (x B)}
04/21/23 Lecture 2.2 -- Set Theory 15
Another example: applying the laws
X (Y - Z) = (X Y) - (X Z). True or False?
Prove your response.
= (X Y) (X’ U Z’)
= (X Y X’) U (X Y Z’)
= U (X Y Z’)
= (X Y Z’)
= X (Y - Z)
(X Y) - (X Z) = (X Y) (X Z)’
04/21/23 Lecture 2.2 -- Set Theory 16
Suppose to the contrary, that A B , and that x A B.
A Proof (direct and indirect)Pv that if (A - B) U (B - A) = (A U B) then
Then x cannot be in A-B and x cannot be in B-A.
But x is in A U B since (A B) (A U B).
A B =
Thus, A B = .
Then x is not in (A - B) U (B - A).
04/21/23 Lecture 2.2 -- Set Theory 17
Today’s Reading Rosen 2.1 and 2.2