Set Theory
2
Introduction to Set Theory
A set is a structure, representing an unordered
collection (group, plurality) of zero or more
distinct (different) objects.
Set theory deals with operations between,
relations among, and statements about sets.
3
Basic properties of sets
Sets are inherently unordered:
No matter what objects a, b, and c denote,
{a, b, c} = {a, c, b} = {b, a, c} =
{b, c, a} = {c, a, b} = {c, b, a}.
All elements are distinct (unequal);
multiple listings make no difference!
{a, b, c} = {a, a, b, a, b, c, c, c, c}.
This set contains at most 3 elements!
Propositional connectives
Propositional logic has four connectives
Name Read as Symbol
negation not
conjunction and .
disjunction or v
implication ifthen
5
Infinite Sets
Conceptually, sets may be infinite (i.e., not
finite, without end, unending).
Symbols for some special infinite sets:
N = {0, 1, 2, } The natural numbers.
Z = {, -2, -1, 0, 1, 2, } The integers.
R = The real numbers, such as
374.1828471929498181917281943125
Infinite sets come in different sizes!
6
Venn Diagrams
7
The Empty Set
C (null, the empty set) is the unique set
that contains no elements whatsoever.
C = {} = {x|False}
No matter the domain of discourse,
we have the axiom
-x: xeC.
8
Cartesian Products of Sets
For sets A, B, their Cartesian product
AB : {(a, b) | aeA . beB }.
E.g. {a,b}{1,2} = {(a,1),(a,2),(b,1),(b,2)}
Note that for finite A, B, |AB|=|A||B|.
Note that the Cartesian product is not
commutative: AB: AB =BA.
Extends to A
1
A
2
A
n
...
9
{a,b,c}{2,3} = {a,b,c,2,3}
{2,3,5}{3,5,7} = {2,3,5,3,5,7} ={2,3,5,7}
Union Examples
10
{a,b,c}{2,3} = ___
{2,4,6}{3,4,5} = ______
Intersection Examples
C
{4}
11
Set Identities
Identity: AC=A AU=A
Domination: AU=U AC=C
Idempotent: AA = A = AA
Double complement:
Commutative: AB=BA AB=BA
Associative: A(BC)=(AB)C
A(BC)=(AB)C
A A = ) (
12
DeMorgans Law for Sets
Exactly analogous to (and derivable from)
DeMorgans Law for propositions.
B A B A
B A B A
=
=
13
Method 3: Membership Tables
Just like truth tables for propositional logic.
Columns for different set expressions.
Rows for all combinations of memberships in
constituent sets.
Use 1 to indicate membership in the derived
set, 0 for non-membership.
Prove equivalence with identical columns.
14
Membership Table Example
Prove (AB)B = AB.
A
A
B
B
A
A
B
B
(
(
A
A
B
B
)
)
B
B
A
A
B
B
0 0 0 0 0
0 1 1 0 0
1 0 1 1 1
1 1 1 0 0