Question:

\(\text{ If the function } f : \mathbb{N} \to \mathbb{N} \text{ is defined as } f(n) = \begin{cases} n - 1, & \text{if } n \text{ is even} \\ n + 1, & \text{if } n \text{ is odd} \end{cases} \text{, then:}\)
(A) f is injective
(B) f is into
(C) f is surjective
(D) f is invertible
Choose the correct answer from the options given below:

Updated On: Nov 15, 2024
  • (B) only
  • (A), (B), and (D) only
  • (A) and (C) only
  • (A), (C), and (D) only
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is D

Solution and Explanation

For n even: \( f(n) = n - 1 \). For n odd: \( f(n) = n + 1 \).

f is injective: No two different inputs map to the same output. For example:

  • If \( n_1 \) and \( n_2 \) are even or odd, the outputs \( f(n_1) \neq f(n_2) \).
  • If \( n_1 \) is even and \( n_2 \) is odd, their outputs \( f(n_1) = n_1 - 1 \) and \( f(n_2) = n_2 + 1 \) are distinct.

Hence, f is injective.

f is surjective: Every natural number \( k \in \mathbb{N} \) is an output of f:

  • For odd k, \( k = f(k - 1) \), where \( k - 1 \) is even.
  • For even k, \( k = f(k + 1) \), where \( k + 1 \) is odd.

Hence, f is surjective.

f is invertible: Since f is both injective and surjective, it is invertible. The inverse function \( f^{-1} \) is:

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

Thus, the function f satisfies properties (A), (C), and (D).

Answer:

\((A), (C), \text{ and } (D)\).

Was this answer helpful?
0
0