0% found this document useful (0 votes)
14 views17 pages

Discrete Structures (w8)

Uploaded by

Sheikh Ahmed
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)
14 views17 pages

Discrete Structures (w8)

Uploaded by

Sheikh Ahmed
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/ 17

Discrete Structures

Week 08
BSCS 3rd Semester (7A + 7B + 7C)
 Text Book:
Discrete Mathematics and its Applications by KENNET
H.ROSEN , 7th Edition.

 Reference Material
Applied Discrete Structures by Alan Doerr and Kenneth
Levasseur , 2.0 Edition, Published by University of
Massachusetts Lowell (Year: 2013)
Week 08 Contents
 Functions, function terminology, four ways to represent a
function. Injection, bisection, surjection, inverse functions,
composition functions.
 Relations, different representations of relations, directed
graph, arrow diagram, list / table and matrix
representation
 The inverse of a relation, complement of a relation,
properties of relations. Reflexive, symmetric, anti-
symmetric, asymmetric and transitive.
Introduction to Functions
 In many instances we assign to each element of a set a
particular element of a second set (which may be the
same as the first). For example, suppose that each
student in a discrete mathematics class is assigned a
letter grade from the set {A, B, C, D, F}.
Functions Definition
 Let A and B be nonempty sets. A function f from A to
B is an assignment of exactly one element of B to each
element of A. We write f (a) = b if b is the unique
element of B assigned by the function f to the element
a of A. If f is a function from A to B, we write f : A → B.

Remark:
 Functions are sometimes also called mappings or
transformations
Domain, Co Domain, Range
 If f is a function from A to B, we say that
 A is the domain of f.

 B is the codomain of f.

 If f (a) = b, we say that b is the image of a and a is a


preimage of b.

 The range of f is the set of all images of elements of A.


Domain, Co Domain, Range
Function Types
1. Injective (One-to-One) Functions.

2. Surjective (Onto) Functions.

3. Bijective (One-to-One Onto) Functions.


Injective (One-to-One)
Functions
 A function f is said to be one-to-one, or an

injunction, if and only if f (a) = f (b) implies that a = b


for all a and b in the domain of f. A function is said to
be injective if it is one-to-one.
Surjective (Onto) Functions:
 A function f from A to B is called onto, or a
surjection, if and only if for every element b ∈ B there
is an element a ∈ A with f (a) = b. A function f is
called surjective if it is onto.
Examples
Bijective (One-to-One Onto)
Functions.
 The function f is a one-to-one correspondence, or

a bijection, if it is both one-to-one and onto. We


also say that such a function is bijective
Inverse Functions.
 Let f be a one-to-one correspondence from the set A to
the set 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. The inverse function of f is
denoted by f−1. Hence, f−1(b) = a when f (a) = b.

 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.
Inverse Functions.
Composition Functions.
 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 the functions f and g, denoted for all a
∈ A by f ◦ g, is defined by (f ◦ g)(a) = f (g(a)).
Composition Functions
(Example)
 Let g be the function from the set {a, b, c} to itself

such that g(a) = b, g(b) = c, and g(c) = a.

 Let f be the function from the set {a, b, c} to the set


{1, 2, 3} such that f (a) = 3, f (b) = 2, and f (c) = 1.

 What is the composition of f and g, and what is the


composition of?

 The composition f ◦ g is defined by (f ◦ g)(a) = f


(g(a)) = f (b) = 2, (f ◦ g) (b) = f (g(b)) = f (c) = 1,
and (f ◦ g)(c) = f (g(c)) = f (a) = 3
Composition Functions
(Example)
 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.

 What is the composition of f and g? What is the


composition of g and f.

 Both the compositions f ◦ g and g ◦ f are defined.


(f ◦ g)(x) = f (g(x)) = f (3x + 2) =
2(3x + 2) + 3 = 6x + 7

And

 (g ◦ f )(x) = g(f (x)) = g(2x + 3) = 3(2x + 3) + 2 = 6x


+ 11.

You might also like