Lecture 2.2: Set Theory*
CS 250, Discrete Structures, Fall 2011
Nitesh Saxena
*Adopted from previous lectures by Cinda Heeren
Course Admin
Slides from previous lectures all posted
HW1 Posted
Due at 11am 09/09/11
Please follow all instructions
Recall: late submissions will not be accepted
Word Equation editor; Open Office; Alt-Codes
Please pick up your competency exams, if
you haven’t done so
9/1/2011
Lecture 2.2 -- Set Theory
2
Outline
Set Theory, Operations and Laws
9/1/2011
Lecture 2.2 -- Set Theory
3
Set Theory - Operators
like
“exclusive
or”
The symmetric difference, A B, is:
A B = { x : (x A x B) v (x B x A)}
= (A - B) U (B - A)
U
B
9/1/2011
A
Lecture 2.2 -- Set Theory
4
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)
9/1/2011
Lecture 2.2 -- Set Theory
5
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
9/1/2011
Lecture 2.2 -- Set Theory
6
Set Theory - Famous Laws
Identity
Domination A U U = U
AU=A
AU=A
A=
AUA=A
Idempotent A A = A
9/1/2011
Lecture 2.2 -- Set Theory
7
Set Theory - Famous Laws
Excluded Middle
Uniqueness
Double complement
9/1/2011
AUA=U
AA=
A=A
Lecture 2.2 -- Set Theory
8
Set Theory – Famous Laws
Commutativity A U B = B U A
AB= BA
Associativity
(A U B) U C = A U (B U C)
(A B) C = A (B C)
A U (B C) = (A U B) (A U C)
Distributivity A (B U C) = (A B) U (A C)
9/1/2011
Lecture 2.2 -- Set Theory
9
Set Theory – Famous Laws
DeMorgan’s I
DeMorgan’s II (A B) = A U B
(A U B) = A B
p
9/1/2011
q
Venn Diagrams
are good for
intuition, but
we aim for a
more formal
proof.
Lecture 2.2 -- Set Theory
10
3 Ways to prove Laws or set equalities
Show that A B and that A B.
Use a membership table.
New & important
Like truth tables
Use logical equivalences to prove
equivalent set definitions.
Not hard, a little tedious
9/1/2011
Lecture 2.2 -- Set Theory
11
Example – the first way
Prove that (A U B) = A B
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)
9/1/2011
Lecture 2.2 -- Set Theory
12
Example – the second way
Prove that (A U B) = A B using a
membership table.
0 : x is not in the specified set
1 : otherwise
A B A
B
AB
AUB
AUB
1
1
0
0
0
1
0
1
0
0
0
1
1
1
1
0
0
0
0
1
1
0
1
0
9/1/2011
0
0
1
1
Lecture 2.2 -- Set Theory
13
Example – the third way
Prove that (A U B) = A B using
logically equivalent set definitions.
(A U B) = {x : (x A v x B)}
= {x : (x A) (x B)}
= {x : (x A) (x B)}
=AB
9/1/2011
Lecture 2.2 -- Set Theory
14
Another example: applying the laws
X (Y - Z) = (X Y) - (X Z). True or
False?
Prove your response.
(X Y) - (X Z) = (X Y) (X Z)’
= (X Y) (X’ U Z’)
= (X Y X’) U (X Y Z’)
=
U (X Y Z’)
= (X Y Z’)
9/1/2011
Lecture 2.2 -- Set Theory
15
A Proof (direct and indirect)
AB=
Pv that if (A - B) U (B - A) = (A U B) then
Suppose to the contrary, that A B , and that x A B.
Then x cannot be in A-B and x cannot be in B-A.
Then x is not in (A - B) U (B - A).
a)
b)
c)
d)
AUB=
A=B
AB=
A-B = B-A =
But x is in A U B since (A B) (A U B).
Thus, A B = .
9/1/2011
Lecture 2.2 -- Set Theory
16
Today’s Reading
Rosen 2.1 and 2.2
9/1/2011
Lecture 2.2 -- Set Theory
17
© Copyright 2026 Paperzz