Q. Q function $f$ from the set of natural numbers to integers defined by $f(n) = \left\{ \begin{array}{r} \frac{n - 1}{2},\ where\ n\ is\ odd \\ - \frac{n}{2},\ when\ n\ is\ even \end{array} \right.\$ is

A) One-one but not onto
B) Onto but not one-one
C) One-one and onto both
D) Neither one-one nor onto
Explanation

(c)
Given, $f(n) = \left\{ \begin{array}{r}
\frac{n - 1}{2},\ when\ n\ is\ odd \\
- \frac{n}{2},\ when\ n\ is\ even
\end{array} \right.\$
And $f:N \rightarrow I$, where $N$ is the set of natural numbers and $I$ is the set of integers.
Let $x,\ y \in N$ and both are even.
Then, $f(x) = f(y)$
$\Rightarrow - \frac{x}{2} = - \frac{y}{2} \Rightarrow x = y$
Again, $x,\ y \in N$ and both are odd.
Then, $f(x) = f(y)$
$\Rightarrow \ \ \ \ \ \frac{x - 1}{2} = \frac{y - 1}{2}$
$\Rightarrow \ \ \ \ \ \ \ \ \ \ \ \ \ x = y$
So, mapping is one-one.
Since, each negative integer is an image of even natural number and positive integer is an image of odd natural number. So, mapping is onto.

Dr. Abubacker
Reviewed by Dr. Abubacker

Physics Educator & NEET/JEE Specialist

Ph.D. in Physics with 19+ years of teaching experience.