Post on 01-Apr-2015
1
Fall 2014COMP 2300 Discrete Structures for Computation
Donghyun (David) KimDepartment of Mathematics and PhysicsNorth Carolina Central University
Chapter 7.3Composition of Functions
2Fall 2014 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University
Composition of Two Functions• Let and be
functions with the property that the range of f is a subset of the domain of g and Define a new function as follows:
where is read g circle f and is read g of f of x. The function is called the composition of f and g.
YXf : ZYg :
ZXfg :,))(())(( Xxxfgxfg all for
fg ))(( xfgfg
.YY
3Fall 2014 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University
Composition of Functions De-fined by Formulas• Suppose two functions and
defined as below:
a. Find the compositions and .
b. Is ? Explain.gffg
:g:f
nnng
nnnf
all for
all for 12)(
)(
fg gf
4Fall 2014 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University
Composition of Functions De-fined by Formulas• Suppose two functions and
defined as below:
a. Find the compositions and .
b. Is ? Explain.gffg
:g:f
nnng
nnnf
all for
all for 12)(
)(
fg gf
nnngnfgnfg all for 11 2)()())(())(( nnnfngfngf all for 122)())(())((
5Fall 2014 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University
Composition of Functions De-fined by Formulas• Suppose two functions and
defined as below:
a. Find the compositions and .
b. Is ? Explain.gffg
:g:f
nnng
nnnf
all for
all for 12)(
)(
fg gf
nnngnfgnfg all for 11 2)()())(())(( nnnfngfngf all for 122)())(())((
2141 ))(())(( gffg
6Fall 2014 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University
Composition of Functions De-fined on Finite Sets• Let
and . Define two functions and by the arrow diagram be-low.
• Draw the arrow diagram for . What is the range of ?
},,,,{},,,,{},,,{ edcbaYdcbaYX 321},,{ zyxZ YXf :
ZYg :
fg fg
1
2
3
abc
d
XY
Z
e
x
y
z
f g
Y’
7Fall 2014 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University
Composition of Functions De-fined on Finite Sets – cont’• Let
and . Define two functions and by the arrow diagram be-low.
• Draw the arrow diagram for . What is the range of ? Range is {y, z}
Fall 2010 COMP 4605/5605 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University
},,,,{},,,,{},,,{ edcbaYdcbaYX 321},,{ zyxZ YXf :
ZYg :
fg fg
abc
d
1
2
3
XY
e
Z
x
y
z
f g
Y’
1
2
3
X Z
x
y
z
fg
8Fall 2014 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University
Composition with the Identity Function• If f is a function from a set X to a set Y, and
is the identity function on X, and is the identity function on Y, then
XI
YI
.)()( ffIbfIfa YX and
)())(()(
)())(()(
xfxfIxfI
xfxIfxIf
XX
XX
Roughly, this is because
More formal proof is given in the textbook.
9Fall 2014 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University
Composing a Function with Its Inverse• If is a one-to-one and onto
function with inverse function then
,: XYf 1YXf :
YX IffbIffa 11 and )()(
)()())(()(,)(
)()())(()(,)(
yIxfyffyxfxyf
xIyfxffxyfyxf
Y
X
11
111
then if
then if
Roughly, this is because
More formal proof is given in the textbook.
10Fall 2014 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University
Composition of One-to-One Functions• Suppose we have two one-to-one functions
f and g. Is their composite function one-to-one?
11Fall 2014 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University
Composition of One-to-One Functions• Suppose we have two one-to-one functions f and
g. Is their composite function one-to-one? Yes!• Proof• Suppose we have we two different elements
such that
Since
we have Also, since f is one-to-one
has to be true. Since g is also one-to one,
has to be true. (Contradiction!)
21 and xx). ()( 21 xgfxgf
, and 2211 ))f(g(x)g(xf))f(g(x)g(xf
)g(x)g(x 21
).(( 21 ) xgfxgf
21 xx
12Fall 2014 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University
Composition of Onto Functions• Suppose we have two onto functions
and . Is their composite function still onto?
YXf :ZYg :
13Fall 2014 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University
Composition of Onto Functions• Suppose we have two onto functions
and . Is their composite function still onto? Yes
. that such find
to possible is it , any given onto is :
zf)(x)(gXx
ΖzZXfg
YXf :ZYg :
14Fall 2014 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University
Composition of Onto Functions• Suppose we have two onto functions
and . Is their composite function still onto? Yes
• Proof• Since g is onto, there has to be such that
. Also, since f is onto, there has to be some such that . Therefore, it is true.
. that such find
to possible is it , any given onto is :
zf)(x)(gXx
ΖzZXfg
YXf :ZYg :
zyg )(Yy
Xx yxf )(