f:→w,w is the set of all whole number such that,
f−1(x)={n−1,ifnisoddn+1,ifniseven}
Letn1,n2ϵwandf(x1)=f(x2){bothodd}n1−1=n2−1⇒n1=n2
Similarly,
Letf(x3)=f(x4){bohteven}n3+1=n4+1⇒n3=n4
So f is one-one function again every element in co-domain w is the image of element in domain of w.So it is also on-to.
Let,y=n−1,n is odd.
and n=y+1,y is even.
∴f′=n+1,n is even
again let z=n+1, n is even
n=z−1, z is odd
∴f−1(x)=n−1, n is odd.
hence,f−1(x)={n−1,ifnisoddn−1,ifniseven}
So, inverse of the given functon is the function itself.