Let $f: N \rightarrow N $ defined by $f(N) = \begin{equation}
f(x)=\begin{cases}
\dfrac {n+1}{2} , & \text{if n is odd}.\\
\dfrac {n}{2} , & \text{if n is even}.
\end{cases}
\end{equation}$
then $f$ is
Solution
The correct answer is onto but not one-one
Explanation
Given that $f: N \rightarrow N $ defined by $f(N) = \begin{equation}
f(x)=\begin{cases}
\dfrac {n+1}{2} , & \text{if n is odd}.\\
\dfrac {n}{2} , & \text{if n is even}.
\end{cases}
\end{equation}$
For n = 1, we have $f(1) = \dfrac {1+1}{2} = 1$
For n = 2, we have $f(2) = \dfrac {2}{2} = 1$
So $f(1) = f(2)$, but $1 \ne 2$
Therefore, $f(x)$ is not one-one
$f(x) = \dfrac {n+1}{2}$ if n is odd
If $y = \dfrac {n+1}{2}$, the $n = 2y - 1$ $ \forall y$