Question:

Let \( f:\mathbb{N} \to \mathbb{N} \) be defined as \[ f(n)= \begin{cases} \frac{n+1}{2}, & \text{if } n \text{ is odd} \\ \frac{n}{2}, & \text{if } n \text{ is even} \end{cases} \] Then \( f \) is:

Show Hint

Check injectivity using counterexample.
Updated On: Apr 14, 2026
  • injective but not surjective
  • surjective but not injective
  • both injective and surjective
  • neither injective nor surjective
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

Concept:

Step 1:
Check injectivity: \[ f(2)=1,\quad f(1)=1 \Rightarrow f(1)=f(2) \] Not injective.

Step 2:
Check surjectivity: For any \(k \in \mathbb{N}\), \[ f(2k)=k \Rightarrow \text{every value is achieved} \]
Was this answer helpful?
0
0