Relations Question 18

Question: A function $f$ from the set of natural number to integers defined by

$f(n)=\begin{cases} \frac{n-1}{2} & \text { when } \mathrm{n} \text { is odd } \\ -\frac{n}{2} & \text { when } \mathrm{n} \text { is even } \end{cases}$

Options:

A) one-one but not onto.

B) onto but not one-one

C) one-one and onto both.

D) neither one-one nor onto.

Show Answer

Answer:

Correct Answer: C

Solution:

$ f:N\to I $

$ f( 1 )=0,f( 2 )=-1, $

$ f( 3 )=1,f( 4 )=-2, $

$ f( 5 )=2,f( 6 )=-3, $ and so on. In this function, every element of set A has unique image in set B and there is no element left in set B. Here f is a one-one and onto function.