written 2.6 years ago by | • modified 2.6 years ago |
Solution:
It is given that:
$ f: \mathrm{W} \rightarrow \mathrm{W}$ is defined as $f(n)=\left\{\begin{array}{l}n-1, \text { if } n \text { is odd } \\ n+1, \text { if } n \text { is even }\end{array}\right. \\ $
One-one:
Let,
$ f(n)=f(m) $
It can be observed that if n is odd and m is even, then we will have $n-1=m+1$. $\Rightarrow n-m=2$ However, this is impossible.
Similarly, the possibility of n being even and m being odd can also be ignored under a similar argument.
$\therefore$ Both n and m must be either odd or even.
Now, if both n and m are odd, then we have:
$ f(n)=f(m) \Rightarrow n-1=m-1 \Rightarrow n=m \\ $
Again, if both n and m are even, then we have:
$ f(n)=f(m) \Rightarrow n+1=m+1 \Rightarrow n=m \\ $
$\therefore f$ is one-one.
It is clear that any odd number $2 r+1$ in co-domain $\mathbf{N}$ is the image of $2 r$ in domain
$\mathbf{N}$ and any even number $2 r$ in co-domain $\mathbf{N}$ is the image of $2 r+1$ in domain
$ \mathbf{N} \\ $
$\therefore f$ is onto.
Hence, f is an invertible function.
Let us define $g: \mathrm{W} \rightarrow \mathrm{W}$ as:
$ g(m)=\left\{\begin{array}{l}m+1, \text { if } m \text { is even } \\ m-1, \text { if } m \text { is odd }\end{array}\right. \\ $
Now, when n is odd:
$ g \circ f(n)=g(f(n))=g(n-1)=n-1+1=n \\ $
And, when n is even:
$ g \circ f(n)=g(f(n))=g(n+1)=n+1-1=n \\ $
Similarly, when m is odd:
$ f \circ g(m)=f(g(m))=f(m-1)=m-1+1=m \\ $
When m is even:
$ \begin{aligned} &f o g(m)=f(g(m))=f(m+1)=m+1-1=m \\\\ & \therefore g \circ f=\mathrm{I}_{\mathrm{w}} \text { and } f \circ g=\mathrm{I}_{\mathrm{w}} \\ \end{aligned} $
Thus, f is invertible and the inverse of f is given by $f^{-1}=g$, which is the same as f. Hence, the inverse of f is f itself.