Download presentation
Presentation is loading. Please wait.
Published byEmily Palmer Modified over 9 years ago
1
Lecture 5: Set Theory 1 Dr Andrew Purkiss-Trew Cancer Research UK a.purkiss@mail.cryst.bbk.ac.uk Mathematics for Computing
2
Material to be covered today Set Theory 1 What are sets? How are they represented? Special and subsets Set Operations Power Sets Cartesian Products
3
What are Sets? A set is a well defined group of items. Sets are made up of elements e.g. The set of students studying at Birkbeck College
4
Set representation 1 Enumerated form: {2,4,6,8}Positive even numbers <10 {2,4,6,8,…,50} Positive even nos. <=50 {2,4,6,8,…}Positive even numbers {2,3,5,7,11,13,17,19} Prime numbers <20
5
Set Representation 2 Predicate form {x:x is even and 0 < x <= 50} {x:P(x)} Letters can represent sets A = {1,2,3,4,5} B = {x:x is a multiple of 2}
6
Set Representation 3 A = {1,2,3,4,5}, B = {x:x is a multiple of 2} Representation of elements 3 A, 2 B 6 A, 3 B Special Sets: N = {1,2,3,4,…} J = {…,-3,-2,-1,0,1,2,3,…} Q = {x: x = m/n for the integers m and n} R is the set of real numbers
7
Special Sets The null set: enumerated form {} or predicate form {x: x x} The universal set: examples: = R, = J
8
Subsets Two sets A and B B is defined as a subset of A (represented B A), when all elements of B are also elements in A. Example: A = {1,2,3,4,5,6}, B = {2,3,5}, C = {2,4,6,8}. B A but as 8 C, but 8 A, C is not a subset of A.
9
Set Representation 4 A={1,2,3,4,5,6},B={2,3,5},C={2,4,6,8} 3 5 2 4 6 8 1 A B C 7 Venn Diagrams
10
More on subsets Another example: N J Q R Other points For any set A, A A and A
11
Set equality Two sets A and B Definition A = B if A B and B Implications 1) {1,2,3} = {3,1,2} = {3,2,1} = {2,1,3} 2) {a,a,b} = {a,b}
12
Proper Subset B is a proper subset of A if: B A and B A.
13
Set operations Union A B IntersectionA B ComplementĀ DifferenceA – B
14
Union A B = {x:x A or x B} A B
15
Intersection A B = {x:x A and x B} A B
16
Complement Ā = {x:x and x } A
17
Difference A - B = {x:x A and x B} AB
18
Difference 2 A B A - B = A ¯ B
19
Cardinality Cardinality. The number of elements in the set A = {1,2,3,4,5}, |A| = 5 B = {2,4,6,…,20}, |B| = 10
20
Power sets If A is a set, the power set of A, (A) is the set of all subsets of A A = {1,2,3}, (A) = { , {1}, {2}, {3}, {1,2}, {1,3}, {2,3}, {1,2,3}}
21
Cartesian Products A x B = {(x,y): x A and y B} Example: A = {1,3,5}, B = {2,4} A x B = {(1,2),(1,4),(3,2),(3,4),(5,2),(5,4)}
22
Home time End of Set Theory 1
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.