FUNCTIONS
Lecture # 02
Dr. Imran Khalil
imrankhalil@uetpeshawar.edu.pk
Overview
• Definition
Types of functions
• One – one function
•
• Onto function
• Bijection or one – one correspondence
• Inverse function
• Floor and Ceiling function
Functions
• Link between two or more sets.
The link between the sets is nothing but the link
between the corresponding elements of the sets.
•
These types of links are called mapping or
functions.
•
Definition
• Let ‘’ and ‘’ be two non-empty sets.
A function from a set ‘’ into a set ‘’ is a mapping
from ‘’ into ‘’ if for all , there exist a unique such
•
that and we write this as;
Domain vs. Range
• Domain of function
• Let are two sets and , then the set is called the domain of
function
• Range of function
• Let are two sets and let , then the element ‘’ is called
image of ‘’ under function ‘’ and ‘’ is called pre-image of ‘’
under function ‘’.
• The set of images is called the range.
Types of Functions
One – One Function (1 – 1) – Injective
Function
A function is called one – one if for each there is at
most one such that
•
The function is said to be injective from a set to a
set if all the members of are related to different
•
members of .
Example
Determine whether the function from with the following
relationships is one – one.
•
The function is one – one since takes on different values at
the four elements of its domain.
•
Example 01 (1 – 1)
Show that is one – one function .
Example 02 (1 – 1)
Show that is not one – one function .
Example 03 (1 – 1)
Show that is one – one function .
Example 04 (1 – 1)
Show that is not one – one function .
Onto Function – Surjective
Function
A function is called onto or surjective if for each
element in there exists at least an element in such
Example
Determine whether the function from with the following
relationship is onto function.
Since all three elements of the codomain are images of
elements in the domain we see that is onto.
Example 01 (Onto)
Example 02 (Onto)
Show that the is onto function
Example 03 (Onto)
Show that the is onto function.
Bijection or one – one
correspondence
The function is bijection, if it is both one – one and
onto.
•
• Each maps exactly one
Example
Let be the function from with the following relationship is bijection
function?
.
The function is one to one and onto. It is one to one since the function
takes on distinct values. It is onto since all four elements of the
codomain are images of elements in the domain. Hence is a bijection.
Example 01 (bijection)
Show that the is bijection function.
Example 02 (bijection)
Show that the is not a bijective function.
Inverse Function
Let be a one – one correspondence from the set to
the Set . The inverse function of is the function
•
that assigns to an element belonging to the
unique element in such that .
• The inverse function of is denoted by
• Hence
Example 01 (Inverse)
• Let be the function from
Is invertible and if it is, what is its inverse?
The function is invertible since it is a one – one
correspondence. The inverse function reverse the
•
correspondence given by , so that
Example 02 (Inverse)
Find the inverse.
Example 03 (Inverse)
Find the inverse.
Example 04 (Inverse)
Find the inverse.
Example 05 (Inverse)
Find the inverse through graphical method.
Example 06 (Inverse)
Find the inverse.
Example 07 (Inverse)
Find the inverse.
Floor and Ceiling Function
Let be a real number then lies between two integers called
floor and ceiling of .
•
The floor function rounds down to the closest integer less than
or equal to .
•
The ceiling function rounds up to the closest integer greater
than or equal to .
•
Example 01 (Floor and
Ceiling)
1. Give the value of ,
2. Give the value of
Example 02 (Floor and
Ceiling)
Data stored on a computer disk or transmitted over a data network
are usually represented as a string of bytes. Each byte is made up
of 8 bits. How many bytes are required to encode 100 bits of data?
Acknowledgment
• [Rosen] Discrete Mathematics and Its Applications 7th Edition
• [Yale] Discrete Mathematics
• [Schaum’s Series] Discrete Mathematics
• Google