Q22 / 50 · Manipal (MET) 2024 · Mathematics
Let: $f: N \rightarrow N$ be defined as
$f(n)=\left\{\begin{array}{ll}\frac{n+1}{2}, & \text { if is } n \text { odd } \\ \frac{n}{2}, & \text { if } n \text { is even }\end{array}\right.$ for all $n \in N$. Then $f$ is
- Ainjective but not surjective
- Correct answerBsurjective but not injective
- Cboth injective and surjective
- Dneither injective nor surjective
Solution
$\because f(n)= \begin{cases}\frac{n+1}{2}, & n \text { is odd } \\ \frac{n}{2}, & n \text { is even }\end{cases}$
$\therefore f(1)=\frac{1+1}{2}=1$
and $f(2)=\frac{2}{2}=1$
$\because f(1)=f(2)=1$
So, $f$ is not injective
and Range of $f(n)$ is all natural numbers.
So, it is surjective
Hence, $f$ is surjective but not injective.
Hence, the correct answer is option: 'B'.