Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {…...
-
Upload
andrea-susanna-hines -
Category
Documents
-
view
216 -
download
0
Transcript of Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {…...
![Page 1: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/1.jpg)
Sets
![Page 2: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/2.jpg)
![Page 3: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/3.jpg)
![Page 4: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/4.jpg)
![Page 5: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/5.jpg)
![Page 6: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/6.jpg)
Set builder notation
• N = {0,1,2,3,…} the “natural numbers”
• R = reals• Z = {… -3,-2,-1,0,1,2,3,…}• Z+ = {1,2,3,4,5,…}• Q = the set of rational numbers
}0 |{ xxN
}2,1,3{}3,2,1{}3,2,1,3,2,1{
0| qZqZpq
pQ
![Page 7: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/7.jpg)
Set builder notation
)}( |{ xPxS
},3,2,1,0,1,2,3,{ Z
S contains all elements from U (universal set)That make predicate P true
Brace notation with ellipses (wee dots)
![Page 8: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/8.jpg)
Set Membership
Sx
Sy
x is in the set S (x is a member of S)
y is not in the set S (not a member)
![Page 9: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/9.jpg)
Am I making this up?
![Page 10: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/10.jpg)
![Page 11: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/11.jpg)
![Page 12: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/12.jpg)
![Page 13: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/13.jpg)
Set operators
CB
CB
CBA
CBA
}4,3,2,1{
}7,5,3,1{
C
B
![Page 14: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/14.jpg)
Set empty
{}
The empty set
![Page 15: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/15.jpg)
The universal set
U
![Page 16: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/16.jpg)
Venn Diagram
U
B
A
U is the universal setA is a subset of B
BA
![Page 17: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/17.jpg)
Venn Diagram
U
B
A
U is the universal setA united with B
BA
![Page 18: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/18.jpg)
Venn Diagram
U
B
A
U is the universal setA intersection B
BA
![Page 19: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/19.jpg)
Cardinality of a set
The number of elements in a set (the size of the set)
5
}9,7,3,2,1{
S
S
![Page 20: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/20.jpg)
Power Set
The set of all possible sets
}}3,2,1{},3,2{},3,1{},2,1{},3{},2{},1{{{},)(
}3,2,1{
SP
S
![Page 21: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/21.jpg)
Power Set
The set of all possible sets
?)(
nP
nS
![Page 22: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/22.jpg)
Power SetThe set of all possible sets
We could represent a set with a bit string
10101011}7,5,3,1,0{
0th element
},,{111
},{011
},{101
}{001
},{110
}{010
}{100
{}000
cba
ba
ca
a
cb
b
c
cba
![Page 23: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/23.jpg)
Is this true for a set S?
S
SS
![Page 24: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/24.jpg)
Cartesian Product
)},4(),,4(),,4(),,3(),,3(),,3(),,2(),,2(),,2(),,1(),,1(),,1{(
},,{
}4,3,2,1{
cbacbacbacbaBA
cbaB
A
A set of ordered tuples
}|),{( BbAabaBA
ABBA
![Page 25: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/25.jpg)
(improper) Subset
BABxAxx )(
• is empty {} a subset of anything?• Is anything a subset of {}?• We have an implication, what is its truth table?• Note: improper subset!!
![Page 26: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/26.jpg)
(proper) Subset
BAAyByyBxAxx )()(
Consequently A is strictly smaller than B|A| < |B|
![Page 27: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/27.jpg)
Equal sets? BABxAxx )(
Two show that 2 sets A and B are equal we need to show that
BABxAxx )(
And we know that )()( pqqpqp
ABBA
AxBxBxAxxBA
)]()[(
![Page 28: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/28.jpg)
Try This
Using set builder notation describe the following sets
• odd integers in the range 1 to 9• the integers 1,4,9,16,25• even numbers in the range -8 to 8
![Page 29: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/29.jpg)
Answers
Using set builder notation describe the following sets
• odd integers in the range 1 to 9• the integers 1,4,9,16,25• even numbers in the range -8 to 8
}51|12{ xx
}51|{ 2 xx
}44|2{ xx
![Page 30: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/30.jpg)
How might a computer represent a set?
Remember those bit operations?
![Page 31: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/31.jpg)
Computer Representation (possible}
10101011}7,5,3,1,0{ A
10010101}7,4,2,0{ B
How do we compute the following?• membership of an element in a set• union of 2 sets• intersection of 2 sets• compliment of a set• set difference (tricky?)
![Page 32: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/32.jpg)
Power set
Try this
Compute the power set of
• {1,2}• {1,2,3}• {{1},{2}}• {}
![Page 33: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/33.jpg)
Power setCompute the power set of
• {1,2}• {1,2,3}• {{1},{2}}• {}
Think again … how might we represent sets?
![Page 34: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/34.jpg)
Cartesian Product
}|),{( BbAabaBA
A set of ordered tuples
• note AxB is not equal to BxA
Just reminding you (and me)
![Page 35: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/35.jpg)
Try This
Let A={1,2,3} and B={x,y}, find
• AxB• BxA• if |A|=n and |B|=m what is |AxB|
![Page 36: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/36.jpg)
My answer
Let A={1,2,3} and B={x,y}, find
• AxB• BxA• if |A|=n and |B|=m what is |AxB|
![Page 37: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/37.jpg)
![Page 38: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/38.jpg)
![Page 39: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/39.jpg)
![Page 40: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/40.jpg)
BABxAxx )(
![Page 41: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/41.jpg)
ABBA
AxBxBxAxxBA
)]()[(
![Page 42: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/42.jpg)
}|),{( BbAabaBA
![Page 43: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/43.jpg)
Power Set PS(A)
1 0
11 01
111 011 101 001
10
110 010 100 000
00
Go left: takeGo right: don’t take
The thinking behind the code
![Page 44: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/44.jpg)
Power Set PS(A)The thinking behind the code
▪▪▪▫▫▫
▪▪▫▫▫▪ ▪▪▫▫▫▫
select don’t select
▪▫▫▫▪▪ ▪▫▫▫▫▪ ▪▫▫▫▪▫ ▪▫▫▫▫▫
▫▫▫▪▫▪ ▫▫▫▫▫▪
![Page 45: Sets. Set builder notation N = {0,1,2,3,…} the “natural numbers” R = reals Z = {… -3,-2,-1,0,1,2,3,…} Z+ = {1,2,3,4,5,…} Q = the set of rational.](https://reader035.fdocuments.us/reader035/viewer/2022062805/5697bfcf1a28abf838ca9dc6/html5/thumbnails/45.jpg)