# Let $f:\;N\;\to N\;be\;defined\;by\;f(n)= \left\{ \begin{array}{1 1} \frac{n+1}{2}, & if\;n\;is\;odd\\ \frac{n}{2}, & if\;is\;even\end{array} \right. \qquad for\;all\;n \in N$ $\text{state whether the function f is bijective.Justify your answer.}$

Toolbox:
• A function $f: X \rightarrow Y$ where for every $x1, x2 \in X, f(x1) = f(x2) \Rightarrow x1 = x2$ is called a one-one or injective function.
• A function$f : X \rightarrow Y$ is said to be onto or surjective, if every element of Y is the image of some element of X under f, i.e., for every $y \in Y$, there exists an element x in X such that $f(x) = y$.
Given : let function f, $f:N \to N$ be defined by
$f= \left\{ \begin{array}{1 1} \frac{n+1}{2}, & if\;n\;is\;odd\\ \frac{n}{2}, & if\;n \;is\;even\end{array} \right.$
Step1: Injective or One-One function:
we see that $f(1)=f(2)=1$
as since 1 is odd f(1)= $(\frac{1+1}{2})=1\;$ and since 2 is even$f(2)= (\frac{2}{2})=1$
But $1 \neq 2$
Therefore f is not one-one
Step 2: Surjective or On-to function:
To show that f is onto we need to show, for every $y \in N$ there exist $x \in N$ such that $f(x)=y$
we have two cases 1. when n is odd and 2. when n is even
For an on-to function, for every $y \in Y$, there exists an element x in X such that $f(x) = y$.
case 1.Consider a natural number n in domain N, when n is odd Let $n=2x+1$ then exist, an element $4x+1$ such that $f(4x+1)=2x$, x taking values 1,2,3.....
f(n)=$f(4x+1)=\frac{4x+1+1}{2}=2x+1=x$
Since every odd number in N is an image of an element in N therefore f is onto when n is odd
case. 2. Also if n is even let $n=2r$ , then there exist an element 4r such that $f(4r)=n$
$f(4r)=\frac{4r}{2}=2r$
Since every even number in N is an image of an element in N, f is onto when n is even
therefore f defined by $f= \left\{ \begin{array}{1 1} \frac{n+1}{2}, & if\;n\;is\;odd\\ \frac{n}{2}, & if\;n \;is\;even\end{array} \right.$ is onto
Solution: f is not a bijective function since f is onto but not one-one
edited Mar 19, 2013 by meena.p