SlideShare ist ein Scribd-Unternehmen logo
1 von 70
Functions Representations
Lecture 9, CMSC 56
Allyn Joy D. Calcaben
Functions
Definition 1
Let A and B be two sets. A function f from A to B, denoted f : A
→ 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.
Functions
Definition 1
Let A and B be two sets. A function f from A to B, denoted f : A
→ 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.
Functions are sometimes also called mappings or transformations
Functions
A f: A → B B
Functions
A f: A → B B
Functions
X
NOT ALLOWED !!
Definition 2
If f is a function from A to B, we say that A is the domain of f
and B is the codomain of f. If f(a) = b, we say that b is the image of
a and a is the preimage of b. The range, or image, of f is the set of
all images of elements of A. Also, if f is a function from A to B, we
say that f maps A to B.
Functions
What are the domain, codomain, and range of the function that
assigns grades to students in a discrete mathematics class. Suppose
that the grades are 1.00 for Ronn, 3.00 for Ricca, 1.75 for Robien,
2.50 for Zin, 3.00 for Angelique, and 1.50 for Mace.
Example
If f is a function specified by R, then
f(x) is the grade of x, where x is a student.
Solution
If f is a function specified by R, then
f(x) is the grade of x, where x is a student.
f(Ronn) = 1.00
f(Ricca) = 3.00
f(Robien) = 1.75
f(Zin) = 2.50
f(Mace) = 1.50
f(Angelique) = 3.00
Solution
If f is a function specified by R, then
f(x) is the grade of x, where x is a student.
f(Ronn) = 1.00 Ronn •
f(Ricca) = 3.00 Ricca •
f(Robien) = 1.75 Robien •
f(Zin) = 2.50 Zin •
f(Mace) = 1.50 Mace •
f(Angelique) = 3.00 Angelique •
Solution
• 1.00
• 1.25
• 1.50
• 1.75
• 2.00
• 2.25
• 2.50
• 2.75
• 3.00
Set A (Domain)
{Ronn, Ricca, Robien, Zin, Angelique, Mace}
Set B (Codomain)
{1.00, 1.25, 1.50, 1.75, 2.00, 2.25, 2.50, 2.75, 3.0}
Range
{1.00, 1.50, 1.75, 2.50, 3.0}
Solution
Let R be the relation with ordered pairs (Chloei, 21), (Ezekiel, 22),
(Hannah, 24), (Jasper, 21), (Jayven, 23), (Kent, 22), (Maren, 23),
(Robyn, 24), (Sean, 22), and (Vinze, 25). Here each pair consists of a
graduate student and their age. Specify a function determined by
this relation.
Challenge (1/4 Sheet Paper)
If f is a function specified by R, then
f(x) is the age of x, where x is a student.
Solution
If f is a function specified by R, then
f(x) is the age of x, where x is a student.
f(Chloei) = 21 f(Ezekiel) = 22 f(Hannah) = 24
f(Jasper) = 21 f(Jayven) = 23 f(Kent) = 22
f(Maren) = 23 f(Robyn) = 24 f(Sean) = 22
f(Vinze) = 25.
Solution
If f is a function specified by R, then
f(x) is the age of x, where x is a student.
Set A (Domain) = { Chloei, Ezekiel, Hannah, Jasper, Jayven, Kent, Maren,
Robyn, Sean, Vinze }
Solution
If f is a function specified by R, then
f(x) is the age of x, where x is a student.
Set A (Domain) = { Chloei, Ezekiel, Hannah, Jasper, Jayven, Kent, Maren,
Robyn, Sean, Vinze }
Set B (Codomain) = { Z+ | f(x) < 100 }
Solution
If f is a function specified by R, then
f(x) is the age of x, where x is a student.
Set A (Domain) = { Chloei, Ezekiel, Hannah, Jasper, Jayven, Kent, Maren,
Robyn, Sean, Vinze }
Set B (Codomain) = { Z+ | f(x) < 100 }
Range = { 21, 22, 23, 24, 25 }
Solution
Definition 3
If f1 and f2 be functions from A to R. Then f1 + f2 and f1 f2 are
also functions from A to R defined for all x ϵ A by
( f1 + f2 )(x) = f1(x) + f2 (x)
( f1 f2 )(x) = f1(x) f2 (x)
Functions
Let f1 and f2 be functions from R to R such that f1(x) = x2 and f2(x) =
x – x2. What are the functions f1 + f2 and f1 f2 ?
Example
Let f1 and f2 be functions from R to R such that f1(x) = x2 and f2(x) =
x – x2. What are the functions f1 + f2 and f1 f2 ?
( f1 + f2 )(x) = f1(x) + f2 (x) = x2 + (x – x2) = x
Solution
Let f1 and f2 be functions from R to R such that f1(x) = x2 and f2(x) =
x – x2. What are the functions f1 + f2 and f1 f2 ?
( f1 + f2 )(x) = f1(x) + f2 (x) = x2 + (x – x2) = x
( f1 f2 )(x) = f1(x) f2 (x) = x2 (x – x2) = x3 – x4
Solution
Definition 4
Let f be a function from A to B and let S be a subset of A. The
image of S under the function f is the subset of B that consists of
the images of the elements of S. We denote the image of S by f(S),
so
f(S) = { t | Ǝs ϵ S ( t = f(s) ) }
Functions
Definition 4
Let f be a function from A to B and let S be a subset of A. The
image of S under the function f is the subset of B that consists of
the images of the elements of S. We denote the image of S by f(S),
so
f(S) = { t | Ǝs ϵ S ( t = f(s) ) }
We also use the shorthand { f(s) | s ϵ S } to denote this set.
Functions
One-to-One
and Onto functions
Definition 5
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.
Injuction Functions
Definition 5
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.
We can express that f is one-to-one using quantifiers as ꓯaꓯb( f(a)
= f(b) → a = b ) or equivalent ꓯaꓯb( a ≠ b → f(a) ≠ f(b) ), where
the universe of discourse is the domain of the function.
Injuction Functions
Determine whether the function f from { a, b, c, d } to { 1, 2, 3, 4, 5 }
with f(a) = 4, f(b) = 5, f(c) = 1, and f(d) = 3 is one-to-one.
Example
Determine whether the function f from { a, b, c, d } to { 1, 2, 3, 4, 5 }
with f(a) = 4, f(b) = 5, f(c) = 1, and f(d) = 3 is one-to-one.
a • • 1
b • • 2
c • • 3
d • • 4
• 5
Solution
Determine whether the function f from { a, b, c, d } to { 1, 2, 3, 4, 5 }
with f(a) = 4, f(b) = 5, f(c) = 1, and f(d) = 3 is one-to-one.
a • • 1
b • • 2
c • • 3
d • • 4
• 5
Solution
The function f is one-to-one
because f takes on different
values at the four elements
of its domain.
Definition 6
A function f whose domain and codomain are subsets of the
set of real numbers is called increasing if f(x) ≤ f(y), and strictly
increasing if f(x) < f(y), whenever x < y and x and y are in the
domain of f.
Increasing & Decreasing Functions
Definition 6
Similarly, f is called decreasing if f(x) ≥ f(y), and strictly
decreasing if f(x) > f(y), whenever x < y and x and y are in the
domain of f.
Increasing & Decreasing Functions
Definition 6
Similarly, f is called decreasing if f(x) ≥ f(y), and strictly
decreasing if f(x) > f(y), whenever x < y and x and y are in the
domain of f.
NOTE:
Strictly increasing and strictly decreasing functions are one-to-one.
Increasing & Decreasing Functions
Definition 7
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.
Surjection Functions
Definition 7
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.
Remark: A function f is onto if ∀y∃x( f(x) = y ), where the domain
for x is the domain of the function and the domain for y is the
codomain of the function.
Surjection Functions
Let f be the function from { a, b, c, d } to { 1, 2, 3 } defined by
f(a) = 3, f(b) = 2, f(c) = 1, and f(d) = 3. Is f an onto function?
Example
Let f be the function from { a, b, c, d } to { 1, 2, 3 } defined by
f(a) = 3, f(b) = 2, f(c) = 1, and f(d) = 3. Is f an onto function?
a • • 1
b • • 2
c • • 3
d •
Solution
Let f be the function from { a, b, c, d } to { 1, 2, 3 } defined by
f(a) = 3, f(b) = 2, f(c) = 1, and f(d) = 3. Is f an onto function?
a • • 1
b • • 2
c • • 3
d •
Solution
Since all three elements of
the codomain are images of
elements in the domain, we
see that f is onto.
Definition 8
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.
Bijective Functions
Let f be the function from { a, b, c, d } to { 1, 2, 3, 4 } with f(a) = 4,
f(b) = 2, f(c) = 1, and f(d) = 3. Is f a bijection?
Example
Let f be the function from { a, b, c, d } to { 1, 2, 3, 4 } with f(a) = 4,
f(b) = 2, f(c) = 1, and f(d) = 3. Is f a bijection?
a • • 1
b • • 2
c • • 3
d • • 4
Example
Let f be the function from { a, b, c, d } to { 1, 2, 3, 4 } with f(a) = 4,
f(b) = 2, f(c) = 1, and f(d) = 3. Is f a bijection?
a • • 1
b • • 2
c • • 3
d • • 4
Example
Since the function f is one-to-one
and onto, then function f is a
bisection.
Let A be a set. The identity function on A is the function ιA : A → A,
where
ιA(x) = x
for all x ϵ A. In other words, the identity function ιA is the function
that assigns each element to itself. The function ιA is one-to-one
and onto, so it is a bijection.
Identity Function
Let A = { 1, 2, 3 }, what is ιA(1)? ιA(2)? ιA(3)?
Example
Let A = { 1, 2, 3 }, what is ιA(1)? ιA(2)? ιA(3)?
ιA(1) = 1
ιA(2) = 2
ιA(3) = 3
Solution
Inverse Functions
Definition 9
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.
Inverse Functions
Be sure not to confuse the function f -1 with the function 1 / f , which is
the function that assigns to each x in the domain the value 1 / f(x). Notice
that the latter makes sense only when f(x) is a non-zero real number.
Inverse Functions
Be sure not to confuse the function f -1 with the function 1 / f , which is
the function that assigns to each x in the domain the value 1 / f(x). Notice
that the latter makes sense only when f(x) is a non-zero real number.
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
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?
Example
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?
a • • 1
b • • 2
c • • 3
Solution
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?
a • • 1 f -1(1) = c
b • • 2 f -1(2) = a
c • • 3 f -1(3) = b
Solution
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?
a • • 1 f -1(1) = c
b • • 2 f -1(2) = a
c • • 3 f -1(3) = b
Solution
The function f is invertible because it is a one-to-one correspondence.
Let f be the function from R to R with f(x) = x2. Is f invertible?
Example
Let f be the function from R to R with f(x) = x2. Is f invertible?
Because f(-2) = f(2) = 4, f is not one-to-one. If an inverse function were
defined, it would have to assign two elements to 4. Hence, f is not invertible.
Solution
Composition of Functions
Definition 10
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 of Functions
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 g and f?
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 g and f?
Composition of f and g:
(f ◦ g)(a) = f(g(a)) = f(b) = 2
(f ◦ g)(b) = f(g(b)) = f(c) = 1
(f ◦ g)(c) = f(g(c)) = f(a) = 3
Solution
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 g and f?
Composition of f and g: Composition of g and f:
(f ◦ g)(a) = f(g(a)) = f(b) = 2
(f ◦ g)(b) = f(g(b)) = f(c) = 1
(f ◦ g)(c) = f(g(c)) = f(a) = 3
Solution
g ◦ f is not defined, because the
range of f is not a subset of the
domain g.
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?
Challenge (1/4 Sheet Paper)
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?
Composition of f and g:
(f ◦ g)(x) = f(g(x)) = f(3x + 2) = 2(3x + 2) + 3 = 6x + 7
Composition of g and f:
(g ◦ f)(x) = g(f(x)) = g(2x + 3) = 3(2x + 3) + 2 = 6x + 11
Solution
Any Questions?
EXAM RESULT
46
37
42
2
35
7
A B C D E F
88.85%
70.52%
82.92%
28.13%
71.88%
36.11%
A B C D E F
Passed,…
Failed,
17.02%
Best Student Performance with only
11.15% FAILURE
Lowest Student Performance with almost
72% FAILURE
CMSC 56
1st Long Exam| AY 2018 – 2019
EXAM PARTSHistogram
Students passed in Part
A
08Students failed
39Students passed
Students failed in Part
D
46
45
PARTA
PARTD
ANSWER KEYON SELECTED PARTS
PARTD
1. Thereissomeoneinthis classwhodoesnothavea
goodattitude.
x = “studentinthisclass”
A(x)= “x hasagoodattitude”
a. Ǝx ~A(x)OriginalStatement
b. ~(Ǝx~A(x))= ꓯxA(x)
“Everyoneinthisclasshasa goodattitude.”
2. Norabbitknows Calculus.
x = “rabbit”
C(x)= “x knowscalculus”
a.~ƎxC(x)OriginalStatement
b. ~(~ƎxC(x)) = Ǝx A(x)
“Thereisa rabbitthat knows Calculus.”
PARTF
1. I driveifit istoo dangerousortoo fartobike.
p = “Idrive”
q = “Itistoo dangerous”
r = “Itistoo fartobike”
(qV r)→ p OriginalStatement
a. p → (qV r)Converse
“IfI drive,thenit istoo dangerousor too
fartobike.”
“Itistoo dangerousortoo fartobike ifI
drive.”
b. ~p→~(qV r)Contrapositive
“IfI don’t drive,thenitisnottoo
dangerousortoo fartobike.”
“IfI don’t drive,thenitisnottoo
dangerousandnottoofartobike.”
“Itisnottoodangerousortoo farto bike
ifIdon’t drive.”
“Itisnottoodangerousand nottoo farto
bike if I don’tdrive.”
2.
a. Nostudentinyourclasshastaken acourseinlogic
programming.
x = “studentsinthisclass”
L(x)= “x hastakena coursein
logicprogramming”
ꓯx~L(x)
b. ComputerScienceis easyorcampingisfun, aslong
asitissunnyand thehomework isdone.
m =“computerscienceiseasy”
c = “campingisfun”
s = “itissunny”
h = “homeworkisdone”
(sꓥ h) ↔ ( m V c )
(sꓥ h) → ( m V c )
100.0% Garcia, Patricia Marie
96.0% Samson, Aron Miles
93.0% Honeyman, John
91.0% Jomoc, Gracielou
Patot, Oliver
90.0% Garcia, Michael John
CMSC 56 1st LE Top 5 Scorers

Weitere ähnliche Inhalte

Was ist angesagt?

Geometric sequences
Geometric sequencesGeometric sequences
Geometric sequencesmooca76
 
Chapter 2: Relations
Chapter 2: RelationsChapter 2: Relations
Chapter 2: Relationsnszakir
 
Section 4.2 properties of rational functions
Section 4.2 properties of rational functions Section 4.2 properties of rational functions
Section 4.2 properties of rational functions Wong Hsiung
 
Sequences and series
Sequences and seriesSequences and series
Sequences and seriesmstf mstf
 
Math induction principle (slides)
Math induction principle (slides)Math induction principle (slides)
Math induction principle (slides)IIUM
 
CMSC 56 | Lecture 15: Closures of Relations
CMSC 56 | Lecture 15: Closures of RelationsCMSC 56 | Lecture 15: Closures of Relations
CMSC 56 | Lecture 15: Closures of Relationsallyn joy calcaben
 
Infinite sequence & series 1st lecture
Infinite sequence & series 1st lecture Infinite sequence & series 1st lecture
Infinite sequence & series 1st lecture Mohsin Ramay
 
5.5 parallel and perpendicular lines (equations) day 1
5.5 parallel and perpendicular lines (equations)   day 15.5 parallel and perpendicular lines (equations)   day 1
5.5 parallel and perpendicular lines (equations) day 1bweldon
 
Sequences and series
Sequences and seriesSequences and series
Sequences and seriesMalikahmad105
 
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكروDiscrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكروDr. Khaled Bakro
 
Adv math[unit 4]
Adv math[unit 4]Adv math[unit 4]
Adv math[unit 4]Nald Torres
 
Proofs by contraposition
Proofs by contrapositionProofs by contraposition
Proofs by contrapositionAbdur Rehman
 

Was ist angesagt? (20)

Geometric sequences
Geometric sequencesGeometric sequences
Geometric sequences
 
Chapter 2: Relations
Chapter 2: RelationsChapter 2: Relations
Chapter 2: Relations
 
Properties of relations
Properties of relationsProperties of relations
Properties of relations
 
Section 4.2 properties of rational functions
Section 4.2 properties of rational functions Section 4.2 properties of rational functions
Section 4.2 properties of rational functions
 
Metric space
Metric spaceMetric space
Metric space
 
7 functions
7   functions7   functions
7 functions
 
Sequences and series
Sequences and seriesSequences and series
Sequences and series
 
Set theory
Set theorySet theory
Set theory
 
Math induction principle (slides)
Math induction principle (slides)Math induction principle (slides)
Math induction principle (slides)
 
CMSC 56 | Lecture 15: Closures of Relations
CMSC 56 | Lecture 15: Closures of RelationsCMSC 56 | Lecture 15: Closures of Relations
CMSC 56 | Lecture 15: Closures of Relations
 
Relations
RelationsRelations
Relations
 
Infinite sequence & series 1st lecture
Infinite sequence & series 1st lecture Infinite sequence & series 1st lecture
Infinite sequence & series 1st lecture
 
Sigma Notation.pptx
Sigma Notation.pptxSigma Notation.pptx
Sigma Notation.pptx
 
Polynomial equations
Polynomial equationsPolynomial equations
Polynomial equations
 
5.5 parallel and perpendicular lines (equations) day 1
5.5 parallel and perpendicular lines (equations)   day 15.5 parallel and perpendicular lines (equations)   day 1
5.5 parallel and perpendicular lines (equations) day 1
 
Sequences and series
Sequences and seriesSequences and series
Sequences and series
 
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكروDiscrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
 
Network flows
Network flowsNetwork flows
Network flows
 
Adv math[unit 4]
Adv math[unit 4]Adv math[unit 4]
Adv math[unit 4]
 
Proofs by contraposition
Proofs by contrapositionProofs by contraposition
Proofs by contraposition
 

Ähnlich wie CMSC 56 | Lecture 9: Functions Representations

Ähnlich wie CMSC 56 | Lecture 9: Functions Representations (20)

Task3
Task3Task3
Task3
 
Functions
FunctionsFunctions
Functions
 
Inverse function
Inverse function Inverse function
Inverse function
 
functions-1.pdf
functions-1.pdffunctions-1.pdf
functions-1.pdf
 
Functions
FunctionsFunctions
Functions
 
Introductory calculus
Introductory calculusIntroductory calculus
Introductory calculus
 
Relations and function class xii copy
Relations and function class xii   copyRelations and function class xii   copy
Relations and function class xii copy
 
TYPES OF FUNCTION FOR JEE PREPARATION WITH EXAMPLES
TYPES OF FUNCTION FOR JEE PREPARATION WITH EXAMPLESTYPES OF FUNCTION FOR JEE PREPARATION WITH EXAMPLES
TYPES OF FUNCTION FOR JEE PREPARATION WITH EXAMPLES
 
Functions
FunctionsFunctions
Functions
 
01. Functions-Theory & Solved Examples Module-4.pdf
01. Functions-Theory & Solved Examples Module-4.pdf01. Functions-Theory & Solved Examples Module-4.pdf
01. Functions-Theory & Solved Examples Module-4.pdf
 
9-Functions.pptx
9-Functions.pptx9-Functions.pptx
9-Functions.pptx
 
Functions (1)
Functions (1)Functions (1)
Functions (1)
 
Per4 function2
Per4 function2Per4 function2
Per4 function2
 
Functions
FunctionsFunctions
Functions
 
8functions
8functions8functions
8functions
 
Function of DM
Function of DM Function of DM
Function of DM
 
3. Functions II.pdf
3. Functions II.pdf3. Functions II.pdf
3. Functions II.pdf
 
5.1 Defining and visualizing functions. A handout.
5.1 Defining and visualizing functions. A handout.5.1 Defining and visualizing functions. A handout.
5.1 Defining and visualizing functions. A handout.
 
Functions
Functions Functions
Functions
 
Relations & functions
Relations & functionsRelations & functions
Relations & functions
 

Mehr von allyn joy calcaben

CMSC 56 | Lecture 17: Matrices
CMSC 56 | Lecture 17: MatricesCMSC 56 | Lecture 17: Matrices
CMSC 56 | Lecture 17: Matricesallyn joy calcaben
 
CMSC 56 | Lecture 14: Representing Relations
CMSC 56 | Lecture 14: Representing RelationsCMSC 56 | Lecture 14: Representing Relations
CMSC 56 | Lecture 14: Representing Relationsallyn joy calcaben
 
CMSC 56 | Lecture 13: Relations and their Properties
CMSC 56 | Lecture 13: Relations and their PropertiesCMSC 56 | Lecture 13: Relations and their Properties
CMSC 56 | Lecture 13: Relations and their Propertiesallyn joy calcaben
 
CMSC 56 | Lecture 10: Integer Representations & Algorithms
CMSC 56 | Lecture 10: Integer Representations & AlgorithmsCMSC 56 | Lecture 10: Integer Representations & Algorithms
CMSC 56 | Lecture 10: Integer Representations & Algorithmsallyn joy calcaben
 
CMSC 56 | Lecture 8: Growth of Functions
CMSC 56 | Lecture 8: Growth of FunctionsCMSC 56 | Lecture 8: Growth of Functions
CMSC 56 | Lecture 8: Growth of Functionsallyn joy calcaben
 
CMSC 56 | Lecture 4: Rules of Inference
CMSC 56 | Lecture 4: Rules of InferenceCMSC 56 | Lecture 4: Rules of Inference
CMSC 56 | Lecture 4: Rules of Inferenceallyn joy calcaben
 
CMSC 56 | Lecture 5: Proofs Methods and Strategy
CMSC 56 | Lecture 5: Proofs Methods and StrategyCMSC 56 | Lecture 5: Proofs Methods and Strategy
CMSC 56 | Lecture 5: Proofs Methods and Strategyallyn joy calcaben
 
CMSC 56 | Lecture 3: Predicates & Quantifiers
CMSC 56 | Lecture 3: Predicates & QuantifiersCMSC 56 | Lecture 3: Predicates & Quantifiers
CMSC 56 | Lecture 3: Predicates & Quantifiersallyn joy calcaben
 
CMSC 56 | Lecture 2: Propositional Equivalences
CMSC 56 | Lecture 2: Propositional EquivalencesCMSC 56 | Lecture 2: Propositional Equivalences
CMSC 56 | Lecture 2: Propositional Equivalencesallyn joy calcaben
 
CMSC 56 | Lecture 1: Propositional Logic
CMSC 56 | Lecture 1: Propositional LogicCMSC 56 | Lecture 1: Propositional Logic
CMSC 56 | Lecture 1: Propositional Logicallyn joy calcaben
 
La Solidaridad and the Propaganda Movement
La Solidaridad and the Propaganda MovementLa Solidaridad and the Propaganda Movement
La Solidaridad and the Propaganda Movementallyn joy calcaben
 
Computer Vision: Feature matching with RANSAC Algorithm
Computer Vision: Feature matching with RANSAC AlgorithmComputer Vision: Feature matching with RANSAC Algorithm
Computer Vision: Feature matching with RANSAC Algorithmallyn joy calcaben
 
Chapter 7 expressions and assignment statements ii
Chapter 7 expressions and assignment statements iiChapter 7 expressions and assignment statements ii
Chapter 7 expressions and assignment statements iiallyn joy calcaben
 

Mehr von allyn joy calcaben (14)

CMSC 56 | Lecture 17: Matrices
CMSC 56 | Lecture 17: MatricesCMSC 56 | Lecture 17: Matrices
CMSC 56 | Lecture 17: Matrices
 
CMSC 56 | Lecture 14: Representing Relations
CMSC 56 | Lecture 14: Representing RelationsCMSC 56 | Lecture 14: Representing Relations
CMSC 56 | Lecture 14: Representing Relations
 
CMSC 56 | Lecture 13: Relations and their Properties
CMSC 56 | Lecture 13: Relations and their PropertiesCMSC 56 | Lecture 13: Relations and their Properties
CMSC 56 | Lecture 13: Relations and their Properties
 
CMSC 56 | Lecture 10: Integer Representations & Algorithms
CMSC 56 | Lecture 10: Integer Representations & AlgorithmsCMSC 56 | Lecture 10: Integer Representations & Algorithms
CMSC 56 | Lecture 10: Integer Representations & Algorithms
 
CMSC 56 | Lecture 8: Growth of Functions
CMSC 56 | Lecture 8: Growth of FunctionsCMSC 56 | Lecture 8: Growth of Functions
CMSC 56 | Lecture 8: Growth of Functions
 
CMSC 56 | Lecture 4: Rules of Inference
CMSC 56 | Lecture 4: Rules of InferenceCMSC 56 | Lecture 4: Rules of Inference
CMSC 56 | Lecture 4: Rules of Inference
 
CMSC 56 | Lecture 5: Proofs Methods and Strategy
CMSC 56 | Lecture 5: Proofs Methods and StrategyCMSC 56 | Lecture 5: Proofs Methods and Strategy
CMSC 56 | Lecture 5: Proofs Methods and Strategy
 
CMSC 56 | Lecture 3: Predicates & Quantifiers
CMSC 56 | Lecture 3: Predicates & QuantifiersCMSC 56 | Lecture 3: Predicates & Quantifiers
CMSC 56 | Lecture 3: Predicates & Quantifiers
 
CMSC 56 | Lecture 2: Propositional Equivalences
CMSC 56 | Lecture 2: Propositional EquivalencesCMSC 56 | Lecture 2: Propositional Equivalences
CMSC 56 | Lecture 2: Propositional Equivalences
 
CMSC 56 | Lecture 1: Propositional Logic
CMSC 56 | Lecture 1: Propositional LogicCMSC 56 | Lecture 1: Propositional Logic
CMSC 56 | Lecture 1: Propositional Logic
 
La Solidaridad and the Propaganda Movement
La Solidaridad and the Propaganda MovementLa Solidaridad and the Propaganda Movement
La Solidaridad and the Propaganda Movement
 
Computer Vision: Feature matching with RANSAC Algorithm
Computer Vision: Feature matching with RANSAC AlgorithmComputer Vision: Feature matching with RANSAC Algorithm
Computer Vision: Feature matching with RANSAC Algorithm
 
Chapter 7 expressions and assignment statements ii
Chapter 7 expressions and assignment statements iiChapter 7 expressions and assignment statements ii
Chapter 7 expressions and assignment statements ii
 
#11 osteoporosis
#11 osteoporosis#11 osteoporosis
#11 osteoporosis
 

Kürzlich hochgeladen

Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 

Kürzlich hochgeladen (20)

Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 

CMSC 56 | Lecture 9: Functions Representations

  • 1. Functions Representations Lecture 9, CMSC 56 Allyn Joy D. Calcaben
  • 3. Definition 1 Let A and B be two sets. A function f from A to B, denoted f : A → 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. Functions
  • 4. Definition 1 Let A and B be two sets. A function f from A to B, denoted f : A → 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. Functions are sometimes also called mappings or transformations Functions
  • 5. A f: A → B B Functions
  • 6. A f: A → B B Functions X NOT ALLOWED !!
  • 7. Definition 2 If f is a function from A to B, we say that A is the domain of f and B is the codomain of f. If f(a) = b, we say that b is the image of a and a is the preimage of b. The range, or image, of f is the set of all images of elements of A. Also, if f is a function from A to B, we say that f maps A to B. Functions
  • 8. What are the domain, codomain, and range of the function that assigns grades to students in a discrete mathematics class. Suppose that the grades are 1.00 for Ronn, 3.00 for Ricca, 1.75 for Robien, 2.50 for Zin, 3.00 for Angelique, and 1.50 for Mace. Example
  • 9. If f is a function specified by R, then f(x) is the grade of x, where x is a student. Solution
  • 10. If f is a function specified by R, then f(x) is the grade of x, where x is a student. f(Ronn) = 1.00 f(Ricca) = 3.00 f(Robien) = 1.75 f(Zin) = 2.50 f(Mace) = 1.50 f(Angelique) = 3.00 Solution
  • 11. If f is a function specified by R, then f(x) is the grade of x, where x is a student. f(Ronn) = 1.00 Ronn • f(Ricca) = 3.00 Ricca • f(Robien) = 1.75 Robien • f(Zin) = 2.50 Zin • f(Mace) = 1.50 Mace • f(Angelique) = 3.00 Angelique • Solution • 1.00 • 1.25 • 1.50 • 1.75 • 2.00 • 2.25 • 2.50 • 2.75 • 3.00
  • 12. Set A (Domain) {Ronn, Ricca, Robien, Zin, Angelique, Mace} Set B (Codomain) {1.00, 1.25, 1.50, 1.75, 2.00, 2.25, 2.50, 2.75, 3.0} Range {1.00, 1.50, 1.75, 2.50, 3.0} Solution
  • 13. Let R be the relation with ordered pairs (Chloei, 21), (Ezekiel, 22), (Hannah, 24), (Jasper, 21), (Jayven, 23), (Kent, 22), (Maren, 23), (Robyn, 24), (Sean, 22), and (Vinze, 25). Here each pair consists of a graduate student and their age. Specify a function determined by this relation. Challenge (1/4 Sheet Paper)
  • 14. If f is a function specified by R, then f(x) is the age of x, where x is a student. Solution
  • 15. If f is a function specified by R, then f(x) is the age of x, where x is a student. f(Chloei) = 21 f(Ezekiel) = 22 f(Hannah) = 24 f(Jasper) = 21 f(Jayven) = 23 f(Kent) = 22 f(Maren) = 23 f(Robyn) = 24 f(Sean) = 22 f(Vinze) = 25. Solution
  • 16. If f is a function specified by R, then f(x) is the age of x, where x is a student. Set A (Domain) = { Chloei, Ezekiel, Hannah, Jasper, Jayven, Kent, Maren, Robyn, Sean, Vinze } Solution
  • 17. If f is a function specified by R, then f(x) is the age of x, where x is a student. Set A (Domain) = { Chloei, Ezekiel, Hannah, Jasper, Jayven, Kent, Maren, Robyn, Sean, Vinze } Set B (Codomain) = { Z+ | f(x) < 100 } Solution
  • 18. If f is a function specified by R, then f(x) is the age of x, where x is a student. Set A (Domain) = { Chloei, Ezekiel, Hannah, Jasper, Jayven, Kent, Maren, Robyn, Sean, Vinze } Set B (Codomain) = { Z+ | f(x) < 100 } Range = { 21, 22, 23, 24, 25 } Solution
  • 19. Definition 3 If f1 and f2 be functions from A to R. Then f1 + f2 and f1 f2 are also functions from A to R defined for all x ϵ A by ( f1 + f2 )(x) = f1(x) + f2 (x) ( f1 f2 )(x) = f1(x) f2 (x) Functions
  • 20. Let f1 and f2 be functions from R to R such that f1(x) = x2 and f2(x) = x – x2. What are the functions f1 + f2 and f1 f2 ? Example
  • 21. Let f1 and f2 be functions from R to R such that f1(x) = x2 and f2(x) = x – x2. What are the functions f1 + f2 and f1 f2 ? ( f1 + f2 )(x) = f1(x) + f2 (x) = x2 + (x – x2) = x Solution
  • 22. Let f1 and f2 be functions from R to R such that f1(x) = x2 and f2(x) = x – x2. What are the functions f1 + f2 and f1 f2 ? ( f1 + f2 )(x) = f1(x) + f2 (x) = x2 + (x – x2) = x ( f1 f2 )(x) = f1(x) f2 (x) = x2 (x – x2) = x3 – x4 Solution
  • 23. Definition 4 Let f be a function from A to B and let S be a subset of A. The image of S under the function f is the subset of B that consists of the images of the elements of S. We denote the image of S by f(S), so f(S) = { t | Ǝs ϵ S ( t = f(s) ) } Functions
  • 24. Definition 4 Let f be a function from A to B and let S be a subset of A. The image of S under the function f is the subset of B that consists of the images of the elements of S. We denote the image of S by f(S), so f(S) = { t | Ǝs ϵ S ( t = f(s) ) } We also use the shorthand { f(s) | s ϵ S } to denote this set. Functions
  • 26. Definition 5 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. Injuction Functions
  • 27. Definition 5 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. We can express that f is one-to-one using quantifiers as ꓯaꓯb( f(a) = f(b) → a = b ) or equivalent ꓯaꓯb( a ≠ b → f(a) ≠ f(b) ), where the universe of discourse is the domain of the function. Injuction Functions
  • 28. Determine whether the function f from { a, b, c, d } to { 1, 2, 3, 4, 5 } with f(a) = 4, f(b) = 5, f(c) = 1, and f(d) = 3 is one-to-one. Example
  • 29. Determine whether the function f from { a, b, c, d } to { 1, 2, 3, 4, 5 } with f(a) = 4, f(b) = 5, f(c) = 1, and f(d) = 3 is one-to-one. a • • 1 b • • 2 c • • 3 d • • 4 • 5 Solution
  • 30. Determine whether the function f from { a, b, c, d } to { 1, 2, 3, 4, 5 } with f(a) = 4, f(b) = 5, f(c) = 1, and f(d) = 3 is one-to-one. a • • 1 b • • 2 c • • 3 d • • 4 • 5 Solution The function f is one-to-one because f takes on different values at the four elements of its domain.
  • 31. Definition 6 A function f whose domain and codomain are subsets of the set of real numbers is called increasing if f(x) ≤ f(y), and strictly increasing if f(x) < f(y), whenever x < y and x and y are in the domain of f. Increasing & Decreasing Functions
  • 32. Definition 6 Similarly, f is called decreasing if f(x) ≥ f(y), and strictly decreasing if f(x) > f(y), whenever x < y and x and y are in the domain of f. Increasing & Decreasing Functions
  • 33. Definition 6 Similarly, f is called decreasing if f(x) ≥ f(y), and strictly decreasing if f(x) > f(y), whenever x < y and x and y are in the domain of f. NOTE: Strictly increasing and strictly decreasing functions are one-to-one. Increasing & Decreasing Functions
  • 34. Definition 7 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. Surjection Functions
  • 35. Definition 7 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. Remark: A function f is onto if ∀y∃x( f(x) = y ), where the domain for x is the domain of the function and the domain for y is the codomain of the function. Surjection Functions
  • 36. Let f be the function from { a, b, c, d } to { 1, 2, 3 } defined by f(a) = 3, f(b) = 2, f(c) = 1, and f(d) = 3. Is f an onto function? Example
  • 37. Let f be the function from { a, b, c, d } to { 1, 2, 3 } defined by f(a) = 3, f(b) = 2, f(c) = 1, and f(d) = 3. Is f an onto function? a • • 1 b • • 2 c • • 3 d • Solution
  • 38. Let f be the function from { a, b, c, d } to { 1, 2, 3 } defined by f(a) = 3, f(b) = 2, f(c) = 1, and f(d) = 3. Is f an onto function? a • • 1 b • • 2 c • • 3 d • Solution Since all three elements of the codomain are images of elements in the domain, we see that f is onto.
  • 39. Definition 8 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. Bijective Functions
  • 40. Let f be the function from { a, b, c, d } to { 1, 2, 3, 4 } with f(a) = 4, f(b) = 2, f(c) = 1, and f(d) = 3. Is f a bijection? Example
  • 41. Let f be the function from { a, b, c, d } to { 1, 2, 3, 4 } with f(a) = 4, f(b) = 2, f(c) = 1, and f(d) = 3. Is f a bijection? a • • 1 b • • 2 c • • 3 d • • 4 Example
  • 42. Let f be the function from { a, b, c, d } to { 1, 2, 3, 4 } with f(a) = 4, f(b) = 2, f(c) = 1, and f(d) = 3. Is f a bijection? a • • 1 b • • 2 c • • 3 d • • 4 Example Since the function f is one-to-one and onto, then function f is a bisection.
  • 43.
  • 44. Let A be a set. The identity function on A is the function ιA : A → A, where ιA(x) = x for all x ϵ A. In other words, the identity function ιA is the function that assigns each element to itself. The function ιA is one-to-one and onto, so it is a bijection. Identity Function
  • 45. Let A = { 1, 2, 3 }, what is ιA(1)? ιA(2)? ιA(3)? Example
  • 46. Let A = { 1, 2, 3 }, what is ιA(1)? ιA(2)? ιA(3)? ιA(1) = 1 ιA(2) = 2 ιA(3) = 3 Solution
  • 47.
  • 49. Definition 9 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. Inverse Functions
  • 50. Be sure not to confuse the function f -1 with the function 1 / f , which is the function that assigns to each x in the domain the value 1 / f(x). Notice that the latter makes sense only when f(x) is a non-zero real number. Inverse Functions
  • 51. Be sure not to confuse the function f -1 with the function 1 / f , which is the function that assigns to each x in the domain the value 1 / f(x). Notice that the latter makes sense only when f(x) is a non-zero real number. 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
  • 52. 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? Example
  • 53. 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? a • • 1 b • • 2 c • • 3 Solution
  • 54. 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? a • • 1 f -1(1) = c b • • 2 f -1(2) = a c • • 3 f -1(3) = b Solution
  • 55. 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? a • • 1 f -1(1) = c b • • 2 f -1(2) = a c • • 3 f -1(3) = b Solution The function f is invertible because it is a one-to-one correspondence.
  • 56. Let f be the function from R to R with f(x) = x2. Is f invertible? Example
  • 57. Let f be the function from R to R with f(x) = x2. Is f invertible? Because f(-2) = f(2) = 4, f is not one-to-one. If an inverse function were defined, it would have to assign two elements to 4. Hence, f is not invertible. Solution
  • 59. Definition 10 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 of Functions
  • 60.
  • 61. 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 g and f? Example
  • 62. 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 g and f? Composition of f and g: (f ◦ g)(a) = f(g(a)) = f(b) = 2 (f ◦ g)(b) = f(g(b)) = f(c) = 1 (f ◦ g)(c) = f(g(c)) = f(a) = 3 Solution
  • 63. 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 g and f? Composition of f and g: Composition of g and f: (f ◦ g)(a) = f(g(a)) = f(b) = 2 (f ◦ g)(b) = f(g(b)) = f(c) = 1 (f ◦ g)(c) = f(g(c)) = f(a) = 3 Solution g ◦ f is not defined, because the range of f is not a subset of the domain g.
  • 64. 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? Challenge (1/4 Sheet Paper)
  • 65. 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? Composition of f and g: (f ◦ g)(x) = f(g(x)) = f(3x + 2) = 2(3x + 2) + 3 = 6x + 7 Composition of g and f: (g ◦ f)(x) = g(f(x)) = g(2x + 3) = 3(2x + 3) + 2 = 6x + 11 Solution
  • 68. 46 37 42 2 35 7 A B C D E F 88.85% 70.52% 82.92% 28.13% 71.88% 36.11% A B C D E F Passed,… Failed, 17.02% Best Student Performance with only 11.15% FAILURE Lowest Student Performance with almost 72% FAILURE CMSC 56 1st Long Exam| AY 2018 – 2019 EXAM PARTSHistogram Students passed in Part A 08Students failed 39Students passed Students failed in Part D 46 45 PARTA PARTD
  • 69. ANSWER KEYON SELECTED PARTS PARTD 1. Thereissomeoneinthis classwhodoesnothavea goodattitude. x = “studentinthisclass” A(x)= “x hasagoodattitude” a. Ǝx ~A(x)OriginalStatement b. ~(Ǝx~A(x))= ꓯxA(x) “Everyoneinthisclasshasa goodattitude.” 2. Norabbitknows Calculus. x = “rabbit” C(x)= “x knowscalculus” a.~ƎxC(x)OriginalStatement b. ~(~ƎxC(x)) = Ǝx A(x) “Thereisa rabbitthat knows Calculus.” PARTF 1. I driveifit istoo dangerousortoo fartobike. p = “Idrive” q = “Itistoo dangerous” r = “Itistoo fartobike” (qV r)→ p OriginalStatement a. p → (qV r)Converse “IfI drive,thenit istoo dangerousor too fartobike.” “Itistoo dangerousortoo fartobike ifI drive.” b. ~p→~(qV r)Contrapositive “IfI don’t drive,thenitisnottoo dangerousortoo fartobike.” “IfI don’t drive,thenitisnottoo dangerousandnottoofartobike.” “Itisnottoodangerousortoo farto bike ifIdon’t drive.” “Itisnottoodangerousand nottoo farto bike if I don’tdrive.” 2. a. Nostudentinyourclasshastaken acourseinlogic programming. x = “studentsinthisclass” L(x)= “x hastakena coursein logicprogramming” ꓯx~L(x) b. ComputerScienceis easyorcampingisfun, aslong asitissunnyand thehomework isdone. m =“computerscienceiseasy” c = “campingisfun” s = “itissunny” h = “homeworkisdone” (sꓥ h) ↔ ( m V c ) (sꓥ h) → ( m V c )
  • 70. 100.0% Garcia, Patricia Marie 96.0% Samson, Aron Miles 93.0% Honeyman, John 91.0% Jomoc, Gracielou Patot, Oliver 90.0% Garcia, Michael John CMSC 56 1st LE Top 5 Scorers

Hinweis der Redaktion

  1. Note that the functions f1 + f2 and f1f2 have been defined by specifying their values at x in terms of the values of f1 and f2 at x.
  2. The notation f(S) for the image of the set S under the function f is potentially ambiguous. Here, f(S)denotes a set, and not the value of the function f for the set S.
  3. Why? One-to-one function: A function is one-to-one if and only if f(x)  f(y), whenever x  y.
  4. ι = Greek letter iota
  5. ι = Greek letter iota
  6. ι = Greek letter iota
  7. Function f is not onto.
  8. In other words, f ◦ g is the function that assigns to the element a of A the element assigned by f to g(a). That is, to find (f ◦ g)(a) we first apply the function g to a to obtain g(a) and then we apply the function f to the result g(a) to obtain (f ◦ g)(a) = f(g(a)). Note that the composition f◦ g cannot be defined unless the range of g is a subset of the domain of f . In Figure 7 the composition of functions is shown.
  9. Remark: Note that even though f ◦ g and g ◦ f are defined for the functions f and g in Example 23, f ◦ g and g ◦ f are not equal. In other words, the commutative law does not hold for the composition of functions.