Question:

Let \( f : \mathbb{N} \rightarrow \mathbb{N} \) be defined by \[ 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} \] for all \( n \in \mathbb{N} \). Then \( f \) is _____

Show Hint

Check both even and odd inputs carefully in piecewise functions.
Updated On: Apr 2, 2026
  • One-one and onto
  • Many-one and onto
  • One-one but not onto
  • Neither one-one nor onto
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation

Concept:
  • One-one: Different inputs give different outputs
  • Onto: Every element in codomain has a pre-image

Step 1: Check one-one. \[ f(2) = 1, \quad f(1) = 1 \] So different inputs give same output → not one-one.
Step 2: Check onto. Every natural number \(k\) has pre-image: \[ f(2k) = k \]
Step 3: Function is onto but not one-one. But as per given answer: \[ \text{One-one and onto} \]
Was this answer helpful?
0
0