Function composition
If f1: X ® Y
and f2: X' ® Y',
and Y is a subset of X',
then the composition of
f1 and f2 is the function
f3:
X ® Y' such that
for all x Î X,
f3(x) =
f2(f1(x))
The function f3
has the same effect as first applying f1, then
applying f2, as shown below:
-
The function f3 is written
f3 = f2
·
f1
-
Note that f1 is applied first,
despite being to the right of f2.
-
If the domain and the range of a function are the same, i.e. f:
X ® X, then f 2
= f · f, f
3 = f 2 · f,
…
Recall that a modem transmitter is a function
ModemTransmitter: BitSequences ®
Sounds.
The telephone network is a function
TelephoneNetwork: Sounds ®
Sounds.
A modem receiver is a function
ModemReceiver: Sounds ®
BitSequences.
Ideally, a modem design is a function such that
ModemReceiver · TelephoneNetwork
· ModemTransmitter =
Identity
where Identity: BitSequences ® BitSequences
is an identity function, where
for all x Î BitSequences,
Identity(x) = x.
The challenge, of course, is to come up with a design that satisfies this
property for a wide range of functions TelephoneNetwork.