L01 - Set Theory

L01 - Set Theory
CSci/Math 2112
06 May 2015
1 / 10
Elements and Subsets of a Set
I
a ∈ A means a is an element of the set A
I
a∈
/ A means a is not an element of the set A
I
A ⊆ B means A is a subset of B (all elements of A are also in
B)
I
A * B means A is not a subset of B (at least one element of
A is not in B)
I
A ( B means A ⊆ B and A 6= B
2 / 10
Elements and Subsets of a Set
I
a ∈ A means a is an element of the set A
I
a∈
/ A means a is not an element of the set A
I
A ⊆ B means A is a subset of B (all elements of A are also in
B)
I
A * B means A is not a subset of B (at least one element of
A is not in B)
I
A ( B means A ⊆ B and A 6= B
Example 1
A = {2, 3, 4, {5}}
Which of the following are elements of A? Which are subsets?
(a) 2
(b) {2}
(c) 5
(d) {5}
(e) {2, 3, 4} (f) {2, 3, 4, {5}} (g) {{5}} (h) {{{5}}}
2 / 10
Set Builder Notation
A = {expression : rule} = {expression | rule}
Example 2
I
A = { n1 | n ∈ N}
I
B = { n1 | n ∈ N, 1 ≤ n ≤ 5}
I
C = {x | x ∈ B, x < 1}
I
D = {2, 4, 6, 8, 10, 12}
I
E = {1, −3, 5, −7, 9, . . .}
List the elements in A, B, and C . Write D and E in set builder
notation. What are |C | and |D|?
3 / 10
Ordered Pairs and Cartesian Product
Example 3
Your society is electing a new executive.
4 / 10
Ordered Pairs and Cartesian Product
Example 3
Your society is electing a new executive.
I
The ordered pair (x, y ) indicates that x is president and y is
vice-president. Is (Alice, Bob)=(Bob, Alice)?
4 / 10
Ordered Pairs and Cartesian Product
Example 3
Your society is electing a new executive.
I
The ordered pair (x, y ) indicates that x is president and y is
vice-president. Is (Alice, Bob)=(Bob, Alice)?
I
Let A = {people running for president} and
B = {people running for vice-president}. What does A × B
mean?
4 / 10
Ordered Pairs and Cartesian Product
Example 3
Your society is electing a new executive.
I
The ordered pair (x, y ) indicates that x is president and y is
vice-president. Is (Alice, Bob)=(Bob, Alice)?
I
Let A = {people running for president} and
B = {people running for vice-president}. What does A × B
mean?
I
If A = {Alice, Chris, Dean} and
B = {Bob, Eve, Fiona, Georgie}, what is |A × B|, and what
does this number mean?
4 / 10
Ordered Pairs and Cartesian Product
Example 3
Your society is electing a new executive.
I
The ordered pair (x, y ) indicates that x is president and y is
vice-president. Is (Alice, Bob)=(Bob, Alice)?
I
Let A = {people running for president} and
B = {people running for vice-president}. What does A × B
mean?
I
If A = {Alice, Chris, Dean} and
B = {Bob, Eve, Fiona, Georgie}, what is |A × B|, and what
does this number mean?
I
If A = {candidates for president},
B = {candidates for vice-president},
C = {candidates for secretary},
D = {candidates for treasurer},
E = {candidates for DSU rep}, what is A × B × C × D × E ?
4 / 10
Union, Intersection, Difference, Complement
I
A ∪ B means the union of A and B, i.e. the set consisting of
all element in A and B
I
A ∩ B means the intersection of A and B, i.e. the set
consisting of all elements which are both in A and B
I
A \ B = A − B means the difference of A and B, i.e. the set
of elements in A which are not in B
I
Ac = A means the complement of A, i.e. U \ A where U is the
universal set
5 / 10
Union, Intersection, Difference, Complement
Example 4
Let A = {a, b, c, d, e}, B = {a, d, e}, C
U = {a, b, c, d, e, f , g , h, i, j}. Find
(1) A ∪ B (2) A ∩ B (3) A ∪ C
(5) A − B (6) B − A (7) A − C
(9) A
(10) C
(11) A ∪ B
= {a, b, c, f , g , h}, and
(4) A ∩ C
(8) C − (A ∪ B)
(12) A ∩ C
6 / 10
Union, Intersection, Difference, Complement
Example 5
A = {2n | n ∈ Z} ∩ {3m | m ∈ Z}
(1) Which of the following are elements of A?
(a) 4 (b) 9 (c) 6 (d) 90 (e) 15
(2) Which of the following are subsets of A?
(a) {6, 12, 18} (b) {6, 9, 12, 15} (c) {−6, −90, 12}
7 / 10
Union, Intersection, Difference, Complement
Example 6
A ∩ (B ∪ C )
(1) Draw the Venn Diagram.
(2) Can you find another way using only unions and intersections
to describe this set?
8 / 10
Union, Intersection, Difference, Complement
Example 6
A ∩ (B ∪ C )
(1) Draw the Venn Diagram.
(2) Can you find another way using only unions and intersections
to describe this set?
This is one half of the distributive laws. They are
A∪(B ∩C ) = (A∪B)∩(A∪C ),
A∩(B ∪C ) = (A∩B)∪(A∩C ).
8 / 10
Union, Intersection, Difference, Complement
Example 7
(A ∩ B)
(1) Draw the Venn Diagram.
(2) Can you find another way using only complements, unions and
intersections to describe this set?
9 / 10
Union, Intersection, Difference, Complement
Example 7
(A ∩ B)
(1) Draw the Venn Diagram.
(2) Can you find another way using only complements, unions and
intersections to describe this set?
This is one half of DeMorgan’s laws. They are
(A ∩ B) = A ∪ B,
(A ∪ B) = A ∩ B.
9 / 10
Indexed Sets
Example 8
U = {all living people}
Ai = {x | x was born on the ith day of the month}
Bj = {x | x was born during the jth month of the year}
Ck = {x | x was born on the kth day of the week}
Describe in words: !
3
[
(a) B1 ∩
Ck

(b) 
1≤j≤4
\
1≤j≤4
Bj  ∪
15
[
!
Ai
i=12

[
(c) C6 ∩ 
(e)

j=1
k=1

5
\
Bj 
(d)
[
Ck
1≤k≤5
Bj
10 / 10