chapter1 presentation (1)
TRANSCRIPT
-
8/10/2019 Chapter1 Presentation (1)
1/83
University of Reading 2010 www.reading.ac.uk
School of Systems Engineering
Discrete Mathematics
Chapter 1 SetsIntroduction
-
8/10/2019 Chapter1 Presentation (1)
2/83
Sets
e!re going to start our "oo# at discretemathematics $ith the %asics of Set Theory&
Many courses "i#e this $i"" start at the
fundamenta" princip"es of "ogic' and %ui"d upto$ards set theory& e!re going to go the other$ay around&
-
8/10/2019 Chapter1 Presentation (1)
3/83
Sets
e "oo# at sets (rst %ecause they!re a muchmore straightfor$ard p"ace to start in terms of$rapping your %rain around something&
Many $ou"d say that much of the "anguage ofset theory is )ust a particu"ar specia"isation ofthe "anguage of "ogic& *his is pro%a%"y accurate'%ut it is a"so the case that the "anguage of "ogic
is a genera"isation of the "anguage of set theory&So "et!s start $ith the easier one and go fromthere&
-
8/10/2019 Chapter1 Presentation (1)
4/83
Sets
e!"" start %y setting out the %asic de(nitions ofsets and $ays to de(ne and descri%e them&
e "oo# at $hen t$o sets are e+ua" and $hat is
meant %y a ,su%set- of a set& e then "oo# at ho$ to ma#e ne$ sets from
ones $e #no$ a"ready&
e then (nd out a%out the four ma)or set
operations and c"ose %y "earning a%out using.enn Diagrams and mem%ership ta%"es&
-
8/10/2019 Chapter1 Presentation (1)
5/83
Sets
*he #ey thing a%out set theory is that it givesus a "anguage and set of too"s $ith $hich $ecan treat co""ections of things as individua"
things& Indeed' set theory' is )ust the set of theoretica"
constructs and mathematica" de(nitions andprocesses re"ating to sets&
-
8/10/2019 Chapter1 Presentation (1)
6/83
University of Reading 2010 www.reading.ac.uk
School of Systems Engineering
Discrete Mathematics
Chapter 1 Sets/art asic de(nitions
-
8/10/2019 Chapter1 Presentation (1)
7/83
Sets
De(nition
set is an unordered co""ection of o%)ects&
*he o%)ects in a set are ca""ed the e"ements or
mem%ers of the set& set is said to contain its mem%ers&
-
8/10/2019 Chapter1 Presentation (1)
8/83
Sets
otation
e $i"" usua""y use uppercase "etters torepresent sets&
*he sym%o" 3 means ,is an e"ement of-& *he sym%o" 4 means ,is 5* an e"ement of-&
e often "ist the e"ements of sets inparentheses&
e ca"" this the list method. hen a pattern is o%vious $e might use
ellipses6three dots together ,&&&-7 to indicatethat the pattern continues&
-
8/10/2019 Chapter1 Presentation (1)
9/83
Sets
Example
e can de(ne the setsA' B, Cas8
A9 :1' 2' ;' ' ?@ B9 :1' ;' =' ?@
C9 :2'
-
8/10/2019 Chapter1 Presentation (1)
10/83
Sets
e a"so use a more mathematica" set buildernotation to represent sets&
*hese usua""y use a varia%"e' oftenx' and put
into notation a sentence "i#e8 *his is the set of a""xfor $hichxis a positive integer$hich is "ess than 100&
Examples
:xBxis a positive integer andx 100@ or :x3 +Bx 100@
-
8/10/2019 Chapter1 Presentation (1)
11/83
Eamous sets of num%ers
is the set of integers6$ho"e num%ers7 9 :&&&'F2'F1'0'1'2'&&&@
+is the set ofpositive integers +9 :1'2';'
-
8/10/2019 Chapter1 Presentation (1)
12/83
Sets
Examples
e can re$rite the setsA' B, Cin set %ui"dernotation8
A9 :1' 2' ;' ' ?@9 :x3 B 1 x ?@
B9 :1' ;' =' ?@
9 :x3 Bxis odd and 1 x J@
C9 :2'
-
8/10/2019 Chapter1 Presentation (1)
13/83
Revie$
hat is a setL
hat do $e ca"" the things in a setL
Can you give eamp"es of a set descri%ed %y
the "ist method and %y the set %ui"der methodL
-
8/10/2019 Chapter1 Presentation (1)
14/83
-
8/10/2019 Chapter1 Presentation (1)
15/83
Nercises
riteAand Bin set %ui"der and Cand Din "istmethod notations &
A 9:1';'='?'J@
9:x3 Bxis odd and 1 x J@
B 9:1''&&&@
9 :x3 Bx = k2for some k3 @
Is F>< 3 BL 5
-
8/10/2019 Chapter1 Presentation (1)
16/83
Nercises
riteAand Cin set %ui"der and Band Din "istmethod notations &
C 9:x3 Bxis even@
9 :K' F' J' 12' 1=' 1A@
Is J 3 DL ONS Is 2? 3 CL 5
-
8/10/2019 Chapter1 Presentation (1)
17/83 University of Reading 2010 www.reading.ac.uk
School of Systems Engineering
Discrete Mathematics
Chapter 1 Sets/art Su%sets and the emptyset
-
8/10/2019 Chapter1 Presentation (1)
18/83
-
8/10/2019 Chapter1 Presentation (1)
19/83
-
8/10/2019 Chapter1 Presentation (1)
20/83
Repeated e"ements
ctua""y' $e $ou"d never specify a set %y$riting :1';'1'1' times in succession&
So $e ,got- :1';'1'1'
-
8/10/2019 Chapter1 Presentation (1)
21/83
Sets in $hich thee"ements are sets
ote that there is nothing $rong $ith having setsthat have sets as their mem%ers&
Example
:S B S is one of the famous sets of num%ers from/art @
*his is the set :' +
' G' H@&
-
8/10/2019 Chapter1 Presentation (1)
22/83
*he empty set
De(nition
*he empty set6or null set7is the set thatcontains no e"ements&
otation
e use the sym%o" to represent the emptyset&
Oou may see some %oo#s use :@ as $e""&
ote that and :@ are 5* the same
-
8/10/2019 Chapter1 Presentation (1)
23/83
Su%sets
De(nition
*he setAis said to %e a subsetof a set B$henevery e"ement ofAis a"so an e"ement of B&
otation
e $riteAT B$henAis a su%set of B&
ExampleIf X9 :1' 2' ;' ' ?@ and Y9 :1' ;' =' ?@
then YTX.
-
8/10/2019 Chapter1 Presentation (1)
24/83
/roper su%sets
De(nition
e sayAis aproper subset of B$henA T Band A B&
otation
e $riteA V B to denote thatAis a propersu%set of B.
-
8/10/2019 Chapter1 Presentation (1)
25/83
Einite or in(niteL
De(nitions and otations
If a set has distinct e"ements $here is anonFnegative integer' $e say that the set is
fnite. *he num%er of e"ements in a (nite set' S' is
ca""ed the cardinalityof Sand is denoted %y BSB.
If a set is not (nite $e say it isinfnite.
-
8/10/2019 Chapter1 Presentation (1)
26/83
Revie$
hen are t$o sets e+ua"L
hat is a su%setL
hat is a proper su%setL
hat is the empty setL hat is the cardina"ity of a setL
-
8/10/2019 Chapter1 Presentation (1)
27/83
Nercise
fter $atching the rest of this video thin# a%outthese +uestions&
Eor any setAisATA L
Eor any setA !s TA L
-
8/10/2019 Chapter1 Presentation (1)
28/83
Nercise
fter $atching the rest of this video thin# a%outthese +uestions&
Eor any setAisATA L ONS& Nvery e"ement ofAis a"so inA67 and soAis a
su%set of itse"f&
Eor any setA !s TA L ONS *his one is $eird& ut it is true that ,every
e"ement of is a"so inA- even though there are ,no-
e"ements in &
-
8/10/2019 Chapter1 Presentation (1)
29/83
Nercise
fter $atching the rest of this video thin# a%outthese +uestions&
Eor any setAisAVA L
Eor any setA !s VA L
-
8/10/2019 Chapter1 Presentation (1)
30/83
Nercise
fter $atching the rest of this video thin# a%outthese +uestions&
Eor any setAisAVA L o& *his is the $ho"e point of a proper su%set&A is
5*a proper su%set of itse"f&
Eor any setA !s VA L ONS& s "ong as WW is not empty itse"f& *hen ,every
e"ement of is a"so inA- even though there are ,no-
e"ements in & nd is certain"y not e+ua" toA&
-
8/10/2019 Chapter1 Presentation (1)
31/83
Nercises
fter $atching the rest of this video' thin# a%outtheseK
hat is BBL
IfX9 :x3 +
Bx is even andx 200@ $hat is BXBL
Come up $ith three eamp"es of an in(nite set&
-
8/10/2019 Chapter1 Presentation (1)
32/83
Nercises
hat is BBL *he empty set has no mem%ers& So BB 9 0&
-
8/10/2019 Chapter1 Presentation (1)
33/83
Nercises
IfX9 :x3 +Bx is even andx 200@ $hat is BXBL
*his is a"" the even num%ers "ess than 200& So it has to %e a%out 100K $e )ust have to %e carefu"
at the end of the set& X9 :2'
-
8/10/2019 Chapter1 Presentation (1)
34/83
Nercises
Come up $ith three eamp"es of an in(nite set& Nasy ans$ers are ' G and H& ut you cou"d %ui"d )ust a%out anything and it $ou"d
count8
:1'
-
8/10/2019 Chapter1 Presentation (1)
35/83
University of Reading 2010 www.reading.ac.uk
School of Systems Engineering
Discrete Mathematics
Chapter 1 Sets/art C Sets from sets
-
8/10/2019 Chapter1 Presentation (1)
36/83
Sets from sets
e!re no$ going to "oo# at t$o $ays to create ane$ set from one' or more' origina" sets&
ExampleI ma#e my hote" %rea#fast %y choosing8 5ne )uice from :orange' grapefruit' tomato@ 5ne cerea" from :cornYa#es' %ranYa#es' cocopops@ *hree hot items from
:eggs' sausage' %eans' hash %ro$ns' mushrooms'%acon@
*oast from :$hite' %ro$n@ Drin# from :tea' coZee@
-
8/10/2019 Chapter1 Presentation (1)
37/83
-
8/10/2019 Chapter1 Presentation (1)
38/83
Namp"e
Eind the po$er set of S9 :1'2';@&
-
8/10/2019 Chapter1 Presentation (1)
39/83
Namp"e
Eind the po$er set of S9 :1'2';@&
:' :1@' :2@' :;@' :1'2@' :1';@' :2';@':1'2';@ @
-
8/10/2019 Chapter1 Presentation (1)
40/83
-
8/10/2019 Chapter1 Presentation (1)
41/83
Cartesian product
De(nition
*he Cartesian product of a pair of setsAand Bis the set of a"" ordered pairs 6a' $7 $here a 3A
and$
3B
&
otation
e use the notationA [ B to denote the
Cartesian product ofAand B&
A [ B = : 6a, $7 B a 3A and $3 B@
-
8/10/2019 Chapter1 Presentation (1)
42/83
nFtup"es
De(nition
n ordered n-tupleis a "ist of e"ements inorder that $e may $rite as 6a1, a2, a;, ..., an#.
n ordered pair cou"d %e ca""ed an ordered 2Ftup"e&
-
8/10/2019 Chapter1 Presentation (1)
43/83
Cartesian product
De(nition
*he Cartesian product of a co""ection of setsA1'A2'&&&'A is the set of a"" ordered Ftup"es
6a1, a2, a;, ..., an#$here a%3A1' a23A2' &&& ' a3An&
A1[ A2 [ &&& [A9: 6a1, a2, a;, ..., an#B a!3Ai'
for !9 1'2,...,@
-
8/10/2019 Chapter1 Presentation (1)
44/83
-
8/10/2019 Chapter1 Presentation (1)
45/83
Sets from sets
ExampleI ma#e my hote" %rea#fast %y choosing8
5ne )uice fromA9 :orange' grapefruit' tomato@ 5ne cerea" from B9 :cornYa#es' %ranYa#es'
cocopops@ *hree hot items from
C9 :eggs' sausage' %eans' hash %ro$ns' mushrooms'%acon@
*oast from D9 :$hite' %ro$n@
Drin# from E9 :tea' coZee@
*he set of possi%"e %rea#fasts is8
A [ B [ C [ C[ C[ D[ E 9 A [ B [ C;[ D
[ E
-
8/10/2019 Chapter1 Presentation (1)
46/83
Revie$
hat is the po$er set of a setL
hat is the Cartesian product of a pair of setsL
hat is the Cartesian product of a co""ection ofsetsL
You should now be ready to try thesuggested Exercises at the end of Section2. in the book.
-
8/10/2019 Chapter1 Presentation (1)
47/83
Namp"e and Nercises
e!"" "oo# at this +uestion no$K
Eind the po$er set of S9 :1'2';@&
*ry these after $atching the video& hat is the po$er set of the empty setL
hat is the po$er set of :a'%'c@L Po$ is this re"ated to your ans$er to the (rst
+uestionL hat can you say from this a%out the nature and
cardina"ity of the po$er set of any set $ith ;e"ementsL
Can you etrapo"ate this and $or# out the cardina"ityof the po$er set of any set $ith e"ementsL
-
8/10/2019 Chapter1 Presentation (1)
48/83
-
8/10/2019 Chapter1 Presentation (1)
49/83
Nercises
Eind the po$er set of S9 :1'2';@&
:' :1@' :2@' :;@' :1'2@' :1';@' :2';@':1'2';@ @
hat is the po$er set of :a'%'c@L
:' :a@' :%@' :c@' :a'%@' :a'c@' :%'c@':a'%'c@ @
*hese sets are %asica""y the same as one another' )ust$ith 1 ,mapped to- a' 2 mapped to %' ; mapped to c& In fact' the po$er set of any set $ith ; e"ements $i""
"oo# eact"y "i#e this' and have A very simi"are"ements&
*he cardina"ity of the po$er set of any set $ith e"ements is )ust 2L
-
8/10/2019 Chapter1 Presentation (1)
50/83
Nercises
*ry these after $atching the video&
\etA9 :1'2';@ and B9 :='>@ and C9 :p'&@&
Eind the fo""o$ing sets& A [A A [ B [ C
IfX9 :1'2@ and Y9 ' $hat isX [ Y L
If P [ Q = $hat must %e trueL
-
8/10/2019 Chapter1 Presentation (1)
51/83
-
8/10/2019 Chapter1 Presentation (1)
52/83
-
8/10/2019 Chapter1 Presentation (1)
53/83
S h l f S t E i i
-
8/10/2019 Chapter1 Presentation (1)
54/83
University of Reading 2010 www.reading.ac.uk
School of Systems Engineering
Discrete Mathematics
Chapter 1 Sets/art D Set operations
-
8/10/2019 Chapter1 Presentation (1)
55/83
Set operations
e have to "earn four ma)or set operations&
e $i"" do this %y "oo#ing at .enn Diagrams andmem%ership ta%"es&
-
8/10/2019 Chapter1 Presentation (1)
56/83
-
8/10/2019 Chapter1 Presentation (1)
57/83
.enn diagrams
-
8/10/2019 Chapter1 Presentation (1)
58/83
-
8/10/2019 Chapter1 Presentation (1)
59/83
-
8/10/2019 Chapter1 Presentation (1)
60/83
-
8/10/2019 Chapter1 Presentation (1)
61/83
-
8/10/2019 Chapter1 Presentation (1)
62/83
-
8/10/2019 Chapter1 Presentation (1)
63/83
Union
otation *he unionof t$o sets'Aand B' is denoted %yA
_ B&
-
8/10/2019 Chapter1 Presentation (1)
64/83
-
8/10/2019 Chapter1 Presentation (1)
65/83
Comp"ement
otation *he complementof a setAis denoted %y' 6or
sometimes %yA( 7&
ote that you don!t need to have t$o sets tode(ne the comp"ement&
-
8/10/2019 Chapter1 Presentation (1)
66/83
DiZerence
otation *he dierenceof t$o sets'Aand B' is denoted
%yA B&
-
8/10/2019 Chapter1 Presentation (1)
67/83
-
8/10/2019 Chapter1 Presentation (1)
68/83
-
8/10/2019 Chapter1 Presentation (1)
69/83
Nercises
De(ne each of the four operations using set%ui"der notation&
hat $ou"d a .enn diagram "oo# "i#e sho$ingt$o sets for $hichA V B ) that !s, A !s a propers*$set of B L
rite do$n epressions in terms of operationson sets for the co"oured areas %e"o$&
School of Systems Engineering
-
8/10/2019 Chapter1 Presentation (1)
70/83
University of Reading 2010 www.reading.ac.uk
Discrete Mathematics
Chapter 1 Sets/art N Mem%ership ta%"es
-
8/10/2019 Chapter1 Presentation (1)
71/83
-
8/10/2019 Chapter1 Presentation (1)
72/83
Mem%ership ta%"es
Example
+e o ot ormally la$el the left ha s!e -!thp, & , r, s.
Th!s !s *st to sho- yo* ho- !t -orks.
A B
p 1 1
+ 1 0
r 0 1
s 0 0
-
8/10/2019 Chapter1 Presentation (1)
73/83
Namp"e
Comp"ete the mem%ership ta%"e sho$n here&
A B A ! B
1 1
1 0
0 1
0 0
-
8/10/2019 Chapter1 Presentation (1)
74/83
-
8/10/2019 Chapter1 Presentation (1)
75/83
-
8/10/2019 Chapter1 Presentation (1)
76/83
-
8/10/2019 Chapter1 Presentation (1)
77/83
Nercise
Comp"ete the mem%ership ta%"e %e"o$&
hat do you noticeL
hat does this meanL
A B A " B A # (A "B)
1 1
1 0
0 1
0 0
-
8/10/2019 Chapter1 Presentation (1)
78/83
Nercise
Comp"ete the mem%ership ta%"e %e"o$&
*he right co"umn is a"" `eros&
*he set is empty&
A B A " B A # (A "B)
1 1 1 0
1 0 1 0
0 1 1 0
0 0 0 0
-
8/10/2019 Chapter1 Presentation (1)
79/83
Nercise
Comp"ete the fo""o$ing mem%ership ta%"e&
A B A " B $A " B%"
B " A " $B "%
1 1 1
1 1 0
1 0 1
1 0 0
0 1 1
0 1 0
0 0 1
0 0 0
-
8/10/2019 Chapter1 Presentation (1)
80/83
Nercise
Comp"ete the fo""o$ing mem%ership ta%"e&
A B A " B $A " B%"
B " A " $B "%
1 1 1 1 1 1 1
1 1 0 1 1 1 1
1 0 1 1 1 1 1
1 0 0 1 1 0 1
0 1 1 1 1 1 10 1 0 1 1 1 1
0 0 1 0 1 1 1
0 0 0 0 0 0 0
-
8/10/2019 Chapter1 Presentation (1)
81/83
-
8/10/2019 Chapter1 Presentation (1)
82/83
Nercise
Use mem%ership ta%"es to verify the fo""o$ing&
A B A " B A ! (A "
B)1 1 1 1
1 0 1 1
0 1 1 0
0 0 0 0
-
8/10/2019 Chapter1 Presentation (1)
83/83
Nercise
Use mem%ership ta%"es to verify the fo""o$ing&
A B B " A ! $B"
%
A ! B A !
(A ! B% " $A !
%
1 1 1 1 1 1 1 1
1 1 0 1 1 1 0 1
1 0 1 1 1 0 1 1
1 0 0 0 0 0 0 00 1 1 1 0 0 0 0
0 1 0 1 0 0 0 0
0 0 1 1 0 0 0 0