0% found this document useful (0 votes)
20 views20 pages

DM 6 FunctionsCont

Uploaded by

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

DM 6 FunctionsCont

Uploaded by

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

1

Functions (Cont.)
Course Code: CSC 1204 Course Title: Discrete Mathematics

Dept. of Computer Science


Faculty of Science and Technology

Lecturer No: 6 Week No: 3 Semester: Fall 23-24


Lecturer: Sirajum Munria(munirasirajum@aiub.edu)
2

Lecture Outline

2.3 Functions (Cont.)


• Inverse Functions
• Compositions of Functions
• Floor function
• Ceiling Function
3

Objectives and Outcomes

• Objectives: To understand Inverse Function,


Compositions of Functions, Floor function, and Ceiling
Function.
• Outcomes: Students are expected to be able to
determine whether a function is invertible, be able find
out the inverse of a function if the function is invertible,
be able to find the composite functions of two given
functions, be able to apply floor and ceiling functions.
4

Inverse Functions

• Definition 9: Let f be a one-to-one correspondence


from A to B. The inverse function 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
5

- 1
FIGURE: The Function f is the Inverse
of Function f
6

Inverse Functions

• A one-to-one correspondence is called invertible


because we can define an inverse of this function.

• A function is not invertible if it is not a one-to-one


correspondence, because the inverse of such a
function does not exist.
7

Example 16
• Let f be the function from {a, b, c} to {1, 2, 3} such that
f(a) = 2, f(b) = 3, and f(c) = 1.
Is f invertible, and if it is, what is its inverse?

• Solution: The function f is invertible because it is a


one-to-one correspondence.
• The inverse function f -1 reverses the correspondence
given by f. So f -1(1) = c, f -1(2) = a, and f -1(3) = b
8

Example 17

• Let f: ZZ be such that f(x) = x +1.


Is f invertible? and if it is, what is its inverse?
• Solution: The function f is one-to-one because every element of
domain has a distinct image, just 1 bigger than that element. Again,
the function f is onto because every element of codomain has a
preimage, just 1 smaller than that element. Therefore, the function f
is a one-to-one correspondence. So, the function f is invertible.
• To reverse the correspondence, suppose that y is the image of x, so
that y = x+1. Then x = y – 1. This means that y – 1 is the unique
element of Z that is sent to y by f. Consequently, f -1 (y) = y – 1
9

Example 18

• Let f be the function from R to R with f(x) = x2.


Is f invertible?

• Solution: Because f(-2) = f(2) = 4, f is not one-to-one.


Since f is not one-to-one, it is not one-to-one
correspondence. Hence, f is not invertible.
10

Compositions of Functions
• Definition: Let g be a function from the set A to the set
B and let f be a function from the set B to the set C.
The composition of functions f and g, denoted by f o g,
is defined by (f o g) (a) = f(g(a))

• Note: f o g and g o f are not equal


• Note: The composition f o g can NOT be defined unless
the range of g is a subset of the domain of f
11

FIGURE : The Composition of the


Functions f and g
12

Modified Example 21
@ p. 141(6th ed.) @ p.149 (7th ed.)

• Let f and g be the functions from the set of integers to the set of
integers defined by f (x) = 2x + 3 and g (x) = 3x + 2.
Find the composite functions of f and g.
Solution:
• The composition of the functions f and g is
(f o g) (x) = f(g(x)) = f (3x+2) = 2(3x+2) + 3 = 6x + 7
• The composition of the functions g and f is
(g o f) (x) = g(f(x)) = g(2x+3) = 3(2x+3) + 2 = 6x + 11
 Practice @ Home: Example 20 (p.149)
13

Some Important Functions

• Two important functions in discrete mathematics. These


functions are often used when objects are counted. They
play an important role in the analysis of the number of
steps used by procedures to solve problems of a
particular size.
 Floor function
 Ceiling Function
• The floor and ceiling functions map the real numbers
onto the integers (RZ).
14

Floor Function

• The floor function assigns to the real number x the


largest integer that is less than or equal to x.
 Let x be a real number. The floor function rounds x down to
the closest integer less than or equal to x.

• The value of the floor function at x is denoted by  x 

• Examples: 2.3 = 2, 2 = 2, 0.5 = 0, 3.5 =  4


15

Ceiling Function

• The ceiling function assigns to the real number x the


smallest integer that is greater than or equal to x.

• The value of the ceiling function at x is denoted by x

• Examples: 2.3 = 3, 2 = 2, 0.5 = 1, 3.5 = 3


16

Examples of Ceiling Function

• How many bytes are required to encode 600 kilobits of


data? [Note: Each byte is made up of 8 bits]
• Answer: (600X1000)/8 = 75000 bytes

• How many bytes are required to encode 1001 bits of


data?
• Answer: 1001/8  = 126 bytes
17

Example of Floor Function

• In asynchronous transfer mode (ATM), data are organized into


cells of 53 bytes. How many ATM cells can be transmitted in 1
minute over a connection that transmits data at the rate of 500
kilobits per second?
• Solution: In 1 minute this connection can transmit 500.1000.60
bits = 30,000,000 bits
Each ATM cell is 53 bytes long, which means that it is
53.8 = 424 bits long
Number of ATM cells that can be transmitted is
=  30,000,000/424  = 70,754
18

Practice @ Home

• Relevant odd-numbered exercises from text book


Books

1. Discrete Mathematics and its applications with


combinatorics and graph theory (7th edition) by Kenneth H.
Rosen [Indian Adaptation by KAMALA KRITHIVASAN],
published by McGraw-Hill
References

1. Discrete Mathematics, Richard Johnsonbaugh, Pearson education, Inc.


2. Discrete Mathematical Structures, Bernard Kolman, Robert C. Busby,
Sharon Ross, Prentice-Hall, Inc.
3. SCHAUM’S outlines Discrete Mathematics(2nd edition), by Seymour
Lipschutz, Marc Lipson

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy