Skip to main contentSkip to solution

If the function f:N→Nf: \mathbb{N} \rightarrow \mathbb{N} is defined as f(n)={n−1, if n is even n+1, if n is odd f(n)=\left\{\begin{array}{ll}n-1, & \text { if } n \text { is even } \\ n+1, & \text { if } n \text { is odd }\end{array}\right., then

(A) f is injective

(B) f is into

(C) f is surjective

(D) f is invertible

Solution

✅ Correct Option: 4

To understand this function conceptually, it maps even numbers to the odd number just below them, and odd numbers to the even number just above them. For example:

  • f(2)=1f(2) = 1
    • f(3)=4f(3) = 4
    • f(4)=3f(4) = 3
    • f(5)=6f(5) = 6

This creates a pattern where ff essentially "swaps" consecutive pairs of natural numbers.


Property (A): Is ff injective?

A function is injective (one-to-one) if whenever f(a)=f(b)f(a) = f(b), we must have a=ba = b.

For our function, if f(a)=f(b)f(a) = f(b):

Case 1: If both aa and bb are even, then f(a)=a−1f(a) = a-1 and f(b)=b−1f(b) = b-1

So a−1=b−1a-1 = b-1 implies a=ba = b

Case 2: If both aa and bb are odd, then f(a)=a+1f(a) = a+1 and f(b)=b+1f(b) = b+1

So a+1=b+1a+1 = b+1 implies a=ba = b

Case 3: If aa is even and bb is odd, then f(a)=a−1f(a) = a-1 and f(b)=b+1f(b) = b+1

Here, a−1a-1 is odd and b+1b+1 is even, so they cannot be equal

Therefore, ff is injective.


Property (B): Is ff into?

A function is "into" if it maps to a proper subset of the codomain, meaning some elements in the codomain have no preimage.

Let's analyze what values ff can produce:

  • For even inputs n=2kn = 2k: f(2k)=2k−1f(2k) = 2k-1 (all odd numbers ≥1\geq 1)
    • For odd inputs n=2k+1n = 2k+1: f(2k+1)=2k+2f(2k+1) = 2k+2 (all even numbers ≥2\geq 2)

Together, these cover all natural numbers, so ff maps onto the entire codomain N\mathbb{N}.

Since ff doesn't map to just a proper subset, it is not "into".


Property (C): Is ff surjective?

A function is surjective (onto) if every element in the codomain has at least one preimage.

For any natural number yy:

If yy is odd: We can find its preimage as 2k2k where y=2k−1y = 2k-1, so k=y+12k = \dfrac{y+1}{2}

If yy is even: We can find its preimage as 2k−12k-1 where y=2ky = 2k, so k=y2k = \dfrac{y}{2}

Since every element in the codomain N\mathbb{N} has a preimage, ff is surjective.


Property (D): Is ff invertible?

A function is invertible if and only if it's bijective (both injective and surjective).

We've already shown that ff is both injective and surjective, therefore ff is invertible.

The inverse function would be:

f−1(n)={n+1,if n is oddn−1,if n is evenf^{-1}(n) = \begin{cases} n+1, & \text{if } n \text{ is odd} \\ n-1, & \text{if } n \text{ is even} \end{cases}


Comparing all properties:

  • (A) Injective: Yes
    • (B) Into: No
    • (C) Surjective: Yes
    • (D) Invertible: Yes

The answer is: (A), (C) and (D) only

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question