Basic Structures Sets, Functions Sequences, and Sums
Basic Structures Sets, Functions Sequences, and Sums
Basic Structures
Sets, Functions
Sequences, and Sums
Objectives
l Sets
l Setoperations
l Functions
l Sequences
l Summations
2.1- Sets
l An unordered collection of objects
l The objects in a set are called the elements, or members.
l A set is said to contain its elements.
l Some important sets in discrete mathematics
N = { 0,1,2,3,4,… }
Z = { … , -2,-1,0,1,2,…} Z+ = {1,2,3…}
R: the set of real numbers
ì p ü G. Cantor
Q = ír = p Î Z , 0 ¹ q Î Z ý
î q þ
V = {a, u , o, i, e}
Q2. For each of the following sets, determine whether 2 is an element of that set.
a. {x ∈ R | x is an integer greater than 1} b. {{2},{{2}}}
c. {{2},{2,{2}}} d. {{{2}}}
Sets…
Definitions:
l Finite set: Set has n elements, n is a nonnegative integer
l A set is an infinite set if it is not finite
l Cardinality of a set |S|: Number of elements of S
l ∅: empty set (null set), the set with no element
l Two sets are equal ßà they have the same elements
A = B if and only if "x (xÎA « xÎ B)
l AÍ B: the set A is a subset of the set B
A Í B if and only if "x (xÎA ® xÎ B)
l A Ì B: A is a proper subset of B
Venn diagram shows that A
A Ì B if and only if (A Í B)^(A ≠ B) is a subset of B
Sets…
Q3. Determine whether each of these statements is true or false.
a. ∅ ∈ {0} b. {0} ⊂ ∅ c. {0} ∈ {0} d. {0} ⊂ {0} e. {∅} ⊆ {∅}
S= {1,2,3}
Q7. How many elements does each of these sets have where a and b are distinct elements?
a. P({a, b, {a, b}}) b. P(P(∅))
Cartesian Products
For example
A= {a, b} B= {1, 2,3} , C = {0,1}
2.2- Set Operations
The Union of sets A and B, denoted by A È B
A È B = { x x Î A Ú x Î B}
The difference of A and B, denoted by A-B
A-B= { x x Î A Ù x Ï B}
The symmetric difference of A and B, denoted by A Å B
A Å B=A È B-A Ç B= { x ( x Î A Ú x Î B) Ù ( x Ï A Ç B)}
Inter sec tion : A Ç B = { x x Î A Ù x Î B}
U is the universal set, complement of A is denoted by A
A=U-A= { x x Ï A}
Set Identities
Identity – See proofs : pages 125, 126 Name
Q10. Find the sets A and B if A − B = {1, 5, 7, 8}, B − A = {2, 10}, and A ∩ B = {3, 6, 9}.
Generalized Unions and Intersections
n
A1 Ç A2 Ç A3 Ç ... Ç An = ! Ai = { x x Î Ai , "i = 1, 2,..., n}
i =1
n
A1 È A2 È A3 È ... È An = ! Ai
i =1
= { x x Î A1 Ú x Î A2 Ú x Î A3 Ú ... Ú x Î An }
l A: domain of f
l B: codomain of f
Functions as sets of ordered pairs
Q1. What are functions?
a. f: N → N : f(x) = x2 + 2 b. f: Z → Z : f(x) = 1/(x-1)2 + 5x
c. f: R → R : f(x) = ±x d. f: Z → R : f(x) = (2x+5)2/(7-2x)
Some Important Functions
Floor function
f: R → Z : f(x) = ëxû : largest integer that less than or equal to x.
Ceiling function
f: R → Z : f(x) = éxù : smallest integer that greater than or equal to x.
a ≠ b → f(a) ≠ f(b)
Arithmetic progression
f(n) = a + nd è a, a+d, a+ 2d, … , a+nd
d: common difference, real number
Sequences…
Q1. Find these terms of the sequence {a_n}, where a_n = 2 (−3)n + 5n.
a. a_1 b. a_4
Q2. Find the first five terms of the sequence defined by each of these recurrence relations and
initial conditions.
a. a_n = 6a_{n−1}, a_0 = 2 b. a_n = a_{n−1} + 3a_{n−2}, a_0 = 1, a_1 = 2
n
am + am +1 + am + 2 + ... + an = å a j = å j = m a j = åm£ j £ n a j
n
j =m
a : Sequence
j : Index of summation
m: Lower limit
n : Upper limit
Summations….
N, Z+, Z, Q, Z x Z, … ü û א0