Question:

A function \( f \) from the set of natural numbers to integers defined by \[ f(n) = \begin{cases} \frac{n-1}{2}, & \text{when } n \text{ is odd} -\frac{n}{2}, & \text{when } n \text{ is even} \end{cases} \] is

Show Hint

Split domain into cases (odd/even) to analyze injectivity and surjectivity clearly.
Updated On: May 6, 2026
  • neither one-one nor onto
  • one-one but not onto
  • onto but not one-one
  • one-one and onto
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is D

Solution and Explanation

Step 1: Check one-one (injective).
For odd \( n = 2k+1 \):
\[ f(n) = \frac{2k+1-1}{2} = k \]
For even \( n = 2k \):
\[ f(n) = -k \]

Step 2: Outputs for different inputs.

Odd inputs give non-negative integers, even inputs give negative integers.

Step 3: No overlap in outputs.

Therefore different inputs always give different outputs → function is one-one.

Step 4: Check onto (surjective).

Every integer can be written as:
Positive/zero → from odd \( n \)
Negative → from even \( n \)

Step 5: Covering all integers.

All integers \( \mathbb{Z} \) are obtained.

Step 6: Hence function is onto.

Both injective and surjective satisfied.

Step 7: Final Answer.

\[ \boxed{\text{one-one and onto}} \]
Was this answer helpful?
0
0