Beruflich Dokumente
Kultur Dokumente
Sets
CompSci 102
Michael Frank
4.1
CompSci 102
Michael Frank
This means, there exist nave set theory propositions p such that
you can prove that both p and p follow logically from the
axioms of the theory!
The conjunction of the axioms is a contradiction!
This theory is fundamentally uninteresting, because any possible
statement in it can be (very trivially) proved
proved by contradiction!
Michael Frank
4.2
4.3
CompSci 102
Michael Frank
4.4
Michael Frank
4.5
Infinite Sets
CompSci 102
Michael Frank
Venn Diagrams
4.6
4.7
John Venn
1834-1923
CompSci 102
Michael Frank
4.8
e.g. 3
3N, a{x | x is a letter of the alphabet}
Can define set equality in terms of relation:
S,T: S=T (
(x: xS xT)
Two sets are equal iff they have all the same
members.
members.
xS : (xS)
CompSci 102
x is not in S
Michael Frank
4.9
CompSci 102
Michael Frank
4.10
CompSci 102
Michael Frank
4.11
Example:
{1,2}
{1,2,3}
CompSci 102
Michael Frank
4.12
CompSci 102
Michael Frank
4.13
CompSci 102
Michael Frank
CompSci 102
Michael Frank
4.15
4.14
CompSci 102
Michael Frank
4.16
Ordered n-tuples
These sets
sets mathematically cannot exist.
E.g. let S = {x
{x | xx }. Is SS?
Therefore, consistent set theories must restrict the
language that can be used to describe sets.
For purposes of this class, don
dont worry about it!
CompSci 102
Michael Frank
Bertrand Russell
1872-1970
4.17
CompSci 102
Michael Frank
4.18
Review of 1.6
CompSci 102
Michael Frank
Ren Descartes
(1596-1650)
4.19
CompSci 102
Michael Frank
4.20
Union Examples
{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}
CompSci 102
Michael Frank
4.21
Michael Frank
4.22
Intersection Examples
{a,b,c}{2,3} = ___
{2,4,6}{3,4,5} = ______
{4}
CompSci 102
Michael Frank
4.23
Think The
intersection of
University Ave. and
W 13th St. is just
that part of the road
surface that lies on
both streets.
CompSci 102
Michael Frank
4.24
Disjointedness
Inclusion-Exclusion Principle
CompSci 102
Help, Ive
been
disjointed!
Michael Frank
4.25
Michael Frank
4.26
Set Difference
{1,2,3,4,5,6} {2,3,5,7,9,11} =
___________
{1,4,6}
Z N = { , 1, 0, 1, 2, } {0, 1, }
= {x | x is an integer but not a nat. #}
= {x | x is a negative integer}
= { , 3, 2, 1}
CompSci 102
Michael Frank
4.27
CompSci 102
Michael Frank
4.28
Set Complements
Chomp!
Set
AB
Set A
CompSci 102
Set B
Michael Frank
4.29
CompSci 102
Set Identities
A = {x | x A}
A
A
U
CompSci 102
Michael Frank
4.31
Michael Frank
4.30
Identity:
A = A = AU
Domination: AU = U , A =
Idempotent:
AA = A = AA
Double complement: ( A ) = A
Commutative: AB = BA , AB = BA
Associative: A(BC)=(AB)C ,
A(BC)=(AB)C
CompSci 102
Michael Frank
4.32
A B = A B
A B = A B
CompSci 102
Michael Frank
4.33
CompSci 102
Michael Frank
4.34
Therefore, x(AB)(AC).
Therefore, A(BC)(AB)(AC).
Part 2: Show (A
(AB)(AC) A(BC).
CompSci 102
Michael Frank
4.35
CompSci 102
Michael Frank
4.36
A
0
0
1
1
CompSci 102
A
0
0
0
0
1
1
1
1
4.37
CompSci 102
B
0
0
1
1
0
0
1
1
C AB ( AB) C A C
0
1
0
1
0
1
0
1
B C
(AC)(BC)
Michael Frank
Review of 1.6-1.7
CompSci 102
Michael Frank
4.39
CompSci 102
Michael Frank
4.38
4.40
Generalized Union
Generalized Intersection
i =1
UA
IA
A X
CompSci 102
Michael Frank
A X
4.41
CompSci 102
Michael Frank
4.42
Representations
Sets: 0:,
, 1:{0}, 2:{0,1}, 3:{0,1,2},
Bit strings:
0:0, 1:1, 2:10,
11, 4:100,
100,
10, 3:11,
CompSci 102
Michael Frank
4.43
CompSci 102
Michael Frank
4.44