Consider the function $F; N →N $ given by $f(x)=\left\{\begin{matrix} x+1, \text{if x is odd}\\x-1, \text{if x is even}\end{matrix}\right.$ |
f is neither one-one nor onto f is one-one but not onto f is onto but not one-one f is both one-one and onto |
f is both one-one and onto |
The correct answer is Option (4) → f is both one-one and onto $f(x)=\left\{\begin{matrix} x+1\\x-1\end{matrix}\right.$ let $x_1,x_2$ be (i) both odd then $f(x_1)=f(x_2)⇒x_1+1=x_2+1⇒x_1=x_2$ (ii) both even then $f(x_1)=f(x_2)⇒x_1-1=x_2-1⇒x_1=x_2$ (iii) one odd, one even $f(x_1)=f(x_2)⇒x_1-1=x_2+1⇒x_1-x_2=2$ Not possible (difference between even and odd number can't be even) ⇒ f is one one also $f^{-1}(x)=\left\{\begin{matrix} x+1&even\,x\\x-1&odd\,x\end{matrix}\right.$ for every y there exists atleast one x ⇒ onto f is both one one, onto |