Download set

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
2.1 Sets
‒ Sets
‒ Common Universal Sets
‒ Subsets
2.2 Set Operations
2.3 Functions
2.4 Sequences and Summations
1
Sets
• A set is a collection or group of objects or
elements or members. (Cantor 1895)
– A set is said to contain its elements.
– There must be an underlying universal set U,
either specifically stated or understood.
2
Sets
• Notation:
– list the elements between braces:
S = {a, b, c, d}={b, c, a, d, d}
(Note: listing an object more than once does not
change the set. Ordering means nothing.)
– specification by predicates:
S = {x| P(x)}
• S contains all the elements from U which make the
predicate P true.
– brace notation with ellipses:
S = { . . . , -3, -2, -1},
the negative integers.
3
Common Universal Sets
• R = reals
• N = natural numbers = {0,1, 2, 3, . . . }, the
counting numbers.
• Z = all integers = {. . , -3, -2, -1, 0, 1, 2, 3,4, . .}.
• Z+ ={1,2,3,…},the set of positive integers.
• Q={P/q | p  Z,q  Z and q≠0},the set of
rational numbers.
• Q+={x R | x=p/q, for some positive integers
p and q}
4
Common Universal Sets
• Notation:
x is a member of S or x is an element of S:
x S
x is not an element of S:
xS
5
Subsets
• Definition: The set A is a subset of the set B,
denoted A B, iff x[xA→xB]
• Definition: The void set, the null set, the empty
set, denoted Ø, is the set with no members.
• Note: the assertion x  Ø is always false. Hence
 x[x  Ø → x  B] is always true.
Therefore, Ø is a subset of every set.
• Note: Set B is always a subset of itself.
6
Subsets
• Definition: If A  B but A  B the we say A
is a proper subset of B, denoted A  B.
• Definition: The set of all subset of set A,
denoted P(A), is called the power set of A.
7
Subsets
• Example: If A = {a, b} then
P(A) = {Ø, {a}, {b}, {a,b}}
8
Subsets
• Definition: The number of (distinct)
elements in A, denoted |A|, is called the
cardinality of A.
• If the cardinality is a natural number (in N),
then the set is called finite, else infinite.
9
Subsets
• Example:
– A = {a, b},
|{a, b}| = 2,
|P({a, b})| = 4.
– A is finite and so is P(A).
– Useful Fact: |A|=n implies |P(A)| = 2n
• N is infinite since |N| is not a natural number. It is
called a transfinite cardinal number.
Note: Sets can be both members and subsets of
other sets.
10
Subsets
• Example:
A = {Ø,{Ø}}.
A has two elements and hence four subsets:
Ø , {Ø} , {{Ø}} , {Ø,{Ø}}
Note that Ø is both a member of A and a subset
of A!
11
P. 1
Subsets
• Example:
A = {Ø}. Which one of the follow is incorrect:
(a) ØA
(b) ØA
(c) {Ø} A
(d) {Ø} A
12
P. 1
Subsets
• Russell's paradox: Let S be the set of all sets
which are not members of themselves. Is S
a member of itself?
• Another paradox: Henry is a barber who
shaves all people who do not shave
themselves. Does Henry shave himself?
13
P. 1
Subsets
• Definition: The Cartesian product of A with
B, denoted AB, is the set of ordered pairs
{<a, b> | a A
Λ b B}
n
Notation: 
Ai ={<a1,a2,...,an>|ai  Ai}
i 1
• Note: The Cartesian product of anything
with Ø is Ø. (why?)
14
P. 1
Subsets
• Example:
– A = {a,b} , B = {1, 2, 3}
– AxB = {<a, 1>, <a, 2>, <a, 3>, <b, 1>, <b, 2>, <b,3>}
– What is BxA? AxBxA?
• If |A| = m and |B| = n, what is |AxB|?
15
P. 1
Terms
• Sets
• Subset
16
P. 1
Related documents