Show that $f: N \rightarrow N$,given by $f(x) = \begin{cases} x+1, & \text{if } x \text{ is odd} \\ x-1, & \text{if } x \text{ is even} \end{cases}$ is both one-one and onto.

Vedclass pdf generator app on play store
Vedclass iOS app on app store
(A) Suppose $f(x_1) = f(x_2)$.
If $x_1$ is odd and $x_2$ is even,then $x_1+1 = x_2-1$,which implies $x_2-x_1 = 2$. Since $x_1$ is odd and $x_2$ is even,the difference between an even and an odd number is always odd,so $x_2-x_1$ cannot be $2$. Thus,this case is impossible.
Similarly,if $x_1$ is even and $x_2$ is odd,$x_1-1 = x_2+1$,implying $x_1-x_2 = 2$,which is also impossible.
Therefore,$x_1$ and $x_2$ must be both odd or both even.
If both are odd,$f(x_1) = f(x_2) \Rightarrow x_1+1 = x_2+1 \Rightarrow x_1 = x_2$.
If both are even,$f(x_1) = f(x_2) \Rightarrow x_1-1 = x_2-1 \Rightarrow x_1 = x_2$.
Thus,$f$ is one-one.
For onto,consider any $y \in N$. If $y$ is odd,$y = 2r+1$ for some $r \ge 0$. Then $f(2r+2) = (2r+2)-1 = 2r+1 = y$. If $y$ is even,$y = 2r$ for some $r \ge 1$. Then $f(2r-1) = (2r-1)+1 = 2r = y$. Since every $y \in N$ has a pre-image in $N$,$f$ is onto.

Explore More

Similar Questions

The function $f: R \to R$ defined by $f(x) = x|x| + x^3|x|$ is

The number of one-one functions $f : \{a, b, c, d\} \rightarrow \{0, 1, 2, \dots, 10\}$ such that $2f(a) - f(b) + 3f(c) + f(d) = 0$ is

If $f:[0, \infty) \to [0, \infty)$ and $f(x) = \frac{x}{1+x}$,then $f$ is

Prove that the function $f: R \rightarrow R$,defined by $f(x)=2x$,is one-one and onto.

Given that $f: S \rightarrow R$ is said to have a fixed point at $c \in S$ if $f(c)=c$. Let $f:[1, \infty) \rightarrow R$ be defined by $f(x)=1+\sqrt{x}$. Then:

Vedclass Products

For Students

Vedclass Test Series

Mock tests in real JEE/NEET style with performance analysis. 5-day free trial.

Start Free Trial
For Teachers

Exam Paper Generator

Generate Set A/B/C/D exam papers from 7.5L+ questions in 2 minutes. 3 chapters free.

Try Free
For Institutes

Online Exam Module

Live online exams with unlimited students, 360° analytics & white-label branding.

See Demo