0% found this document useful (0 votes)
120 views

Basic Structures Sets, Functions Sequences, and Sums

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
120 views

Basic Structures Sets, Functions Sequences, and Sums

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

Chapter 2

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}

aÎA : a is an element of the set A // a belongs to A


aÏA: a is not an element of A
Sets…
Q1. List the members of these sets.
a. {x | x is a positive integer less than 12} b. {x | x is the square of an integer and x<100}

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. {∅} ⊆ {∅}

Q4. Determine whether each of these statements is true or false.


a. x ∈ {x} b. {x} ∈ {{x}} c. ∅ ⊆ {x} d. ∅ ∈ {x}

Q5. What is the cardinality of each of these sets?


a. {{a}} b. {a, {a}}
Power Sets

Given a set S, power set P(S) of S is a set of all


subsets of the set S.

S= {1,2,3}

P(S)= { Ø, {1}, {2},{3}, {1,2}, {1,3},{2,3}, {1,2,3} }


Power Sets
Q6. Find the power set of the set: {∅, {∅}}

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

Let A and B be sets. The Cartesian product of A and B,


denoted by A x B,
A ´ B = {( a, b ) a Î A, b Î B}
For example
A= {a, b} B= {1, 2, 3}
A ´ B = {( a,1) , ( a, 2 ) , ( a,3) , ( b,1) , ( b, 2 ) , ( b, 3)}
Cartesian Products…
A1 ´ A2 ´ ... ´ An = {( a , a ,..., a ) a Î A , "i = 1, n}
1 2 n i i

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

AÈ∅=A AÇU=A Identity laws


AÈU=U AÇ∅=∅ Domination laws
AÈA=A AÇA=A Idempotent laws
A= A Complementation law
AÈB=BÈA AÇB=BÇA Commutative laws
AÈ (BÈ C) = (A ÈB) È C Associative laws
AÇ (B Ç C)= (A ÇB) Ç C
A Ç (B È C) = (A Ç B) È (A Ç C) Distributive laws
A È (B Ç C) = (A È B) Ç (A È C)
AÈ B =AÇ B A ÇB =AÈB De Morgan laws
A È (A Ç B) = A A Ç (A È B) = A Absorption
AÈ A =U A Ç`A = ∅ Complement laws
Q8. Let A = {1, 2, 3, 4, 5} and B = {0, 3, 6}. Find
a. A ∩ B b. A − B

Q9. Let A = {a, b, c, d, e} and B = {a, b, c, d, e, f, g, h}. Find


a. A ∪ B b. B − A.

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 }

Computer Representation of Sets


• Use bit string U={1,2,3,4,5,6,7,8,9,10}
• A= {1,3,5,7,9 } è A = “1010101010”
• B= { 1,8,9} è B = “1000000110”
Computer Representation of
Sets
l A = “1010101010”
l B = “1000000110”
2.3. Functions / Mappings /
Transformations…
l f: A → B : function f from A to B (or function f maps A to B)

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.

Q2. Find these values


One-to-One/ Injective functions
Function f is one-to-one (or injective) if and only if

a ≠ b → f(a) ≠ f(b)

for all a and b in the domain of f.

Q3. Determine whether each of these functions from Z to Z is one-to-one:


a. f(n) = n3 + 1 b. f(n) = n2
Onto Functions
A function f from A to B is called onto, or surjective, if for every element b in B
there is an element a in A with f(a)=b.

Q4. Determine whether each of these functions from Z to Z is onto:


a. f(a) = a + 1 b. f(a) = a3
One-to-one Correspondence / Bijective Functions
Function f is a one-to-one corespondence or a bijection if it is
both one-to-one and onto.
Inverse Functions
Let f is a bijection from A to B. The inverse function, denoted by f-1,
of f is the function that assigns to an element b belonging to B
the unique element a in A such that f(a)=b.
Hence f-1(b)=a when f(a)=b.
Inverse Functions
Q4. f: Z → Z such that f(x) = x+1
Is f invertible? And if it is, what is its inverse?
Composition of Functions
Let f : A → B, g: B → C
The composition of f and g, denoted by fog, is defined by:
(fog)(x) = f(g(x))

Q5. Find: (fog)(x) and (gof)(x)


f: Z → Z, f(x) = x + 1
g: Z → Z, g(x)= x2
2.4- Sequences
l Sequence: a1, a2, a3,…, an,…
Ex: 1, 1, 2, 3, 5, 8, 13,…: Infinite sequence
Ex: 1, 3, 5, 7: Finite sequence

l A sequence is a function from a subset of integers to a set S.


l an : image of the integer n
l ai : a term of the sequence
l {an= 1/n}: Z+→ Q è 1, 1/2, 1/3, 1/4, …
Sequences…
Geometric progression
f(n) = arn è a, ar, ar2, ar3, …, arn
a: initial term, a real number
r: common ratio

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

Q3. Find the solution to each of these recurrence relations.


a. a_n = −a_{n−1}, a_0 = 5 b. a_n = a_{n−1} + 3, a_0 = 1
Some Useful Sequences
Summations

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….

Theorem 1- (Summation of geometric series)


Some Useful Summation Formulae
Cardinality

l Cardinality = number of elements in a set.


l The sets A and B have the same cardinality if and only if
there is a one-to-one correspondence from A to B
l A set that is either finite or has the same cardinality as
the set of positive integers is called countable.
l A set that is not countable is called uncountable.
l When a infinite set S is countable, we denote the
cardinality of S is |S|= ‫א‬0 (aleph null)

l For example, |Z|= ‫א‬0 because Z is countable and infinite,


but R is uncountable and infinite, and we say |R|=2 ‫א‬0
sets countable uncountable cardinality
{a, b, …, z}, ü û <n
{x| x5 -3x2 – 11 = 0}, …
{0, 2, 4, …} ü û ‫א‬0

N, Z+, Z, Q, Z x Z, … ü û ‫א‬0

{x| 0 < x < 1}, R,… û ü 2‫א‬0

You might also like