Module 3 Functions
Module 3 Functions
Graphical Representations
Functions can be represented
graphically in several ways:
f A B
• •
f • •
a• •
b
•
•
y
•
• •
x
A Bipartite Graph
B Plot
Like Venn diagrams
113/10/17 2
Module #4 - Functions
113/10/17
Another example: →((T,F)) = F. 3
Module #4 - Functions
113/10/17 4
Module #4 - Functions
113/10/17 5
Module #4 - Functions
A Neat Trick
Sometimes we write YX to denote the
set F of all possible functions f:XY.
This notation is especially appropriate,
113/10/17 6
Module #4 - Functions
113/10/17 7
Module #4 - Functions
{A,B,C,D,E}
__________, unknown!
and its range is ________.
Suppose the grades turn out all As and
Bs.
{A,B} but its
Then the range of f is _________,
codomain is __________________.
still {A,B,C,D,E}!
113/10/17 9
Module #4 - Functions
113/10/17 10
Module #4 - Functions
Constructing Function
Operators
If (“dot”) is any operator over B,
then we can extend to also denote
an operator over functions f:AB.
E.g.: Given any binary operator
113/10/17 12
Module #4 - Functions
One-to-One Functions
A function is one-to-one (1-1), or injective, or an
injection, iff every element of its range has only 1
pre-image.
– Formally: given f:AB,
“x is injective” : (x,y: xy f(x)f(y)).
Only one element of the domain is mapped to any
given one element of the range.
– Domain & range have same cardinality. What about
codomain?
Each element of the domain is injected into a
different element of the range.
– Compare “each dose of vaccine is injected into a different
patient.”
113/10/17 15
Module #4 - Functions
One-to-One Illustration
113/10/17 16
Module #4 - Functions
113/10/17 17
Module #4 - Functions
113/10/17 18
Module #4 - Functions
Illustration of Onto
Some functions that are or are not
onto their codomains:
•
• • • • • • • •
• • • • • • • •
• • • • • •
• • • •
• • • • • •
• •
Onto Not Onto Both 1-1 1-1 but
(but not 1-1) (or 1-1) and onto not onto
113/10/17 19
Module #4 - Functions
Bijections
A function f is a one-to-one
correspondence, or a bijection, or
reversible, or invertible, iff it is both
one-to-one and onto.
For bijections f:AB, there exists an
•
• • y
• •
• •
• •
113/10/17 22
Module #4 - Functions
Graphs of Functions
We can represent a function f:AB as a
set of ordered pairs {(a,f(a)) | aA}.
Note that a, there is only 1 pair (a,f(a)).
113/10/17 23
Module #4 - Functions
Comment About
Representations
You can represent any type of discrete
structure (propositions, bit-strings,
numbers, sets, ordered pairs, functions)
in terms of virtually any of the other
structures (or some combination
thereof).
Probably none of these structures is
truly more fundamental than the others
(whatever that would mean). However,
strings, logic, and sets are often used as
the foundation for all else.
113/10/17 24
Module #4 - Functions
113/10/17 25
Module #4 - Functions
1 .
x x 1.6=1
0
Note that if xZ, . 1.4= 1
1 .
1.4
x = x = x . 2 .
1.4= 2
3 3 .. .
3=3= 3
113/10/17 26
Module #4 - Functions
3 +3 x
2
113/10/17 28
Module #4 - Functions
113/10/17 31
Module #4 - Functions
113/10/17 32
Module #4 - Functions
113/10/17 33
Module #4 - Functions
113/10/17 34
Module #4 - Functions
113/10/17 35
Module #4 - Functions
Transfinite Numbers
113/10/17 36
Module #4 - Functions
113/10/17 37
Module #4 - Functions
113/10/17 38