Professional Documents
Culture Documents
Study groups
Rutgers Learning Centers
Rushit Sanghrajka
James Kersh
John Yang
Registration (open until Sunday)
https://secure.rutgers.edu/rlcstudygroup/login.aspx
Def: Set
Set: unordered collection of objects called
elements or members of the set.
Notation: a A
Set A contains object a
Roster Method
Set Notation
Description
Logic
EF
E is subset of F
(F superset of E)
eE eF
EF
E union F
EF
E intersect F
EC
E complement
{} or
Empty set
e EF
eE or eF
e EF
eE and
eF
eE
eEC EC =S\E
How to show
A is subset of B: if x belongs to A then
x also belongs to B
Alternative Notation
One way ...
Subset or Equal
AB
AB
Proper Subset
(not equal)
AB
AB
Cardinality of a set
If there are n distinct elements in a set A,
then A is finite and |A| = n
Examples:
|{east, west, north, south}| = 4
| {x ! | x divisible by 2 and x 100} |= 50
A is called infinite if is is not finite. E.g.
+
S = {x !+ | x is a square}
Power set
For a set S, P(S) denotes the power set of S,
the set of all subsets of S
Ex: S = {2,5,7}
P(S) = {, {2}, {5}, {7}, {2,5}, {2,7}, {5,7}, {2,5,7}}
computer?
Cartesian products
A B = {(a,b) | a A, b B}
As Python code:
for a in A:
for b in B:
print (a,b)