If the function $f: N \rightarrow N$ is defined as $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 Choose the correct answer from the options given below: |
(B) only (A), (B) and (D) only (A) and (C) only (A), (C) and (D) only |
(A), (C) and (D) only |
The correct answer is Option (4) →(A), (C) and (D) only injective test (if n → odd) ⇒ $f(x_1)=f(x_2)$ $x_1+1=x_2+1⇒x_1=x_2$ (if n → even) ⇒ $f(x_1)=f(x_2)$ $x_1-1=x_2-1⇒x_1=x_2$ surjective test $y=\left\{\begin{matrix}x+1,&x\,odd\\x-1,&x\,even\end{matrix}\right.$ so $x=\left\{\begin{matrix}y-1,&y\,is\,even\\y+1,&y\,is\,odd\end{matrix}\right.$ for every y there exist atleast some x f is surjective ⇒ f is bijective ⇒ f is invertible |