The question is
Show that f:N→N, given by f(x)={x+1;ifxisoddx−1;ifxiseven
For one-one
Case:IWhen x1,x2 are odd natural number.
∴f(x1)=f(x2)
⇒x1+1=x2+1forallx1,x2∈N
⇒x1=x2
∴f is one-one.
Case:II:When x1,x2 are even natural number.
∴f(x1)=f(x2)
⇒x1−1=x2−1
⇒x1=x2
∴f is one-one
CaseIII:When x1 is odd and x2 is an even number.
f(x1)=f(x2)⇒x1+1=x2−1
⇒x2−x1=2
which is never possible as the difference of odd and even number is always an odd number.
Hence in this case f(x1)≠f(x2)
Thus,f is one-one.
CaseIV:When x1 is even and x2 is odd natural number.
f(x1)=f(x2)⇒x1−1=x2+1
⇒x1−x2=2
which is never possible as the difference of odd and even number is always an odd number.
Hence in this case f(x1)≠f(x2)
Thus,f is one-one.
For onto:
∴f(x)=x+1 if x is odd
=x−1 if x is even.
⇒For every even number y of co-domain there exists an odd number y−1 in domain and for every odd number y of co-domain there exists evert number y+1 in domain.
Thus,f is an onto fucntion.
Hence f is one-one onto function.