Let f: W → W be defined as f(n) = n − 1, if is odd and f(n) = n + 1, if n is even. Show that f is invertible. Find the inverse of f. Here, W is the set of all whole numbers.
Answers
Let m, n ∈ W such that , f (n ) =f(m)
if n is odd and m is even
then, n - 1 = m + 1
n- m = 2
therefore, 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 get:
f(n) = f(m)
⇒ n -1 = m -1
⇒ n = m
Again, if both n and m are even, the we get:
f(n) = f(m)
⇒ n +1 = m + 1
⇒ n = m
therefore, f is one – one.
also , it is clear that any odd number 2r + 1 in co-domain N is the image of 2r in domain N and any even number 2r in co – domain N is the image of 2r +1 in domain N.
e.g., co - domain = range
therefore, f is onto.
therefore, f is an invertible function.
now , let us define g : W → W such that
Now, when n is odd:
gof(n) = g(f(n)) = g (n-1) = n -1 +1 = n (when n is odd, then n-1 is even)
And when n is even:
gof(n) = g(f(n)) = g (n+1) = n +1 -1 = n (when n is even, then n+1 is odd)
Similarly, when m is odd:
fog(m) = f(g(m)) = f (m-1) = m -1 +1 = m
And when n is even:
fog(m) = f(g(m)) = f (m+1) = m +1 -1 = m
Therefore, gof = and fog =
Therefore, f is invertible and the inverse of f is given by f-1 = g, which is the same as f.
Thus, the inverse of f is f itself.
Answer:
W → W be defined as \begin{gathered}f(n)=\{\begin{array}{ll}n-1&\text{if n is odd}\\n+1&\text{if n is even}\end{array}.\end{gathered}f(n)={n−1n+1if n is oddif n is even.
Let m, n ∈ W such that , f (n ) =f(m)
if n is odd and m is even
then, n - 1 = m + 1
n- m = 2
therefore, 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 get:
f(n) = f(m)
⇒ n -1 = m -1
⇒ n = m
Again, if both n and m are even, the we get:
f(n) = f(m)
⇒ n +1 = m + 1
⇒ n = m
therefore, f is one – one.
also , it is clear that any odd number 2r + 1 in co-domain N is the image of 2r in domain N and any even number 2r in co – domain N is the image of 2r +1 in domain N.
e.g., co - domain = range
therefore, f is onto.
therefore, f is an invertible function.
now , let us define g : W → W such that
\begin{gathered}g(m)=\{\begin{array}{ll}m+1&\text{if m is even}\\m-1&\text{if m is odd}\end{array}.\end{gathered}g(m)={m+1m−1if m is evenif m is odd.
Now, when n is odd:
gof(n) = g(f(n)) = g (n-1) = n -1 +1 = n (when n is odd, then n-1 is even)
And when n is even:
gof(n) = g(f(n)) = g (n+1) = n +1 -1 = n (when n is even, then n+1 is odd)
Similarly, when m is odd:
fog(m) = f(g(m)) = f (m-1) = m -1 +1 = m
And when n is even:
fog(m) = f(g(m)) = f (m+1) = m +1 -1 = m
Therefore, gof = I_WIW and fog = I_WIW
Therefore, f is invertible and the inverse of f is given by f-1 = g, which is the same as f.
Thus, the inverse of f is f itself.