Let H be the set of all humans, alive or dead. Making H→H associations, are the following functions or not:
f(x) is a parent of xNot a function: people have two parents
f(x) is the mother of xFunction: each person has exactly one mother
f(x) is the oldest child of xNot a function: some people have no children
f(x) is the set of all children of x
This is a function but it is not a H→H function because each person is associated with a set of people.
This f is a H→P(H) function.
A tuple can be thought of as a function. For example, the 5-tuple (22,14,55,1,700) can be thought of as a listing of the values of the function f:{0,1,2,3,4}→N defined by:
f(0)=22,f(1)=14,f(2)=5,f(3)=1,f(4)=700
Infinite Sequence
An infinite sequence of objects can be thought of as a function.
For example, take (b0,b1,...,bn) is an infinite sequnce of objects from a set S. This sequence can be thought of as a listing of the values of the function f:N→S defined by:
A function f:A→B is called onto or a surjective function if every element $b$ in $B$ can be obtained as $b = f(a)$ for some $a$ in $A$. To summarise, the entire codomain must be mapped to the domain.
Example of a Surjective mapping
In general, this might not be the case. If f is an A→B function, we know that for every a∈A, we have f(a)∈B. If the range of f can be a proper subset of B (which is the codomain), then it is not onto.
Bijections always come in pairs, if f:A→B is a bijection, then there is a function f−1:B→A, it is called the inverse of f, defined by:
f−1(b)=a whenever f(a)=b
This also means f−1 is also a bijection, so we have:
f−1(f(a))f−1(f(b))=a for every a∈A=b for every b∈B
For example, let Odd and Even be the sets of odd and even natural numbers, respectively. Define a function f:Odd → Even by f(n)=n−1. Then f is a bijection and its inverse f−1:Even → Odd is defined as f−1(n)=n+1.
Let S be a set.
For every subset A⊆S, its characteristic function, fA:S→{0,1} is defined for all x∈S by: $$ f_A(x) = \begin{cases} 1, &\text{if } x \in A, \\ 0, &\text{if } x \notin A \end{cases} $$
If A⊆N then fa:N→{0,1} can be represented by an infinite 0-1 sequence.
Leonardo Fibonacci asked in 1202: Let’s start with a pair of rabbits that needs one month to mature, and assume that every month each pair produces a new pair that becomes productive after one month. How many new pairs are produced each month?
The Fibonacci function, defined recursively is:
Basis step: f(0)=1 and f(1)=1.
Recursive step: If n>1 then f(n)=f(n−2)+f(n−1).
This generates a series of integers: 0,1,1,2,3,5,8,13,21,[...]
Let g:A→B and f:B→C be functions.
The composition of f and g is the function $\boxed{ (f \circ g): A \rightarrow C }$, can also define this for all $a \in A$ as: $$ (f \circ g)(a) = f(g(a)) $$
We only define the composition f∘g when the codomain of g is equal to the domain of f.
For finite sets, we can simply count the number of elements in each.
If finite sets have the same number of elements, then there is always a bijection between them.
Two infinite sets have the same size if there is a bijection between them.
Countable set
We can call a set Acountable if it is either finite or there is a [[Bijection (function)|bijection]] between $A$ and $\mathbb N$.
For example:
idN:N→N is a bijection hence N is countable.
Given Odd is the set of odd natural numbers, we find that even if Odd⊂N, it still has the same size as N.
The function f:N→Odd defined by f(x)=2x+1 is a bijection.