Let f: W$\rightarrow$W be defined as f(n) $=$n$-$1, if n 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.
Let f: W$\rightarrow$W be defined as f(n) $=$n$-$1, if n 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.
Official Solution
f : W$\rightarrow$ W
$f(n) = \left\{ {\begin{array}{llllllllllllllllllll}{n - 1,}&{if}&{{\rm{n is odd}}}\\{n + 1,}&{if}&{{\rm{n is even}}}\end{array}} \right.$
Injectivity
Let n, m be any two odd real whole numbers.
$\therefore$ $f(n) = f(m) \Rightarrow n - 1 = m - 1 \Rightarrow n = m$
Again, let n, m be any two even whole numbers.
$\therefore$ $f(n) = f(m) \Rightarrow n + 1 = m + 1 \Rightarrow n = m$
If n is even and m is odd, then n $\ne$ m.
Also, if f(n) is odd and f(m) is even, then f(n)$\ne$f(m)
Thus, if $n \ne m \Rightarrow f(n) \ne f(m)$ $\therefore$ f is an injective.
Surjectivity :
Let n be an arbitrary whole number.
If n is an odd number, then there exists an even whole number
(n + 1) such that f(n + 1) $=$n + 1$-$1 $=$n
If n is an even number, then there exists an odd whole number,
such that f(n$-$1)$=$(n $-$1) + 1 $=$n
Thus, every $n \in W$ has its pre-image in W.
So, f: W$\rightarrow$W is a surjective.
Thus, f is invertible and ${f^{ - 1}}$ exists.
Now, f(n$-$1) $=$ n, if n is odd and f(n + 1) $=$n, if n is even.
$\Rightarrow$ n$-$1 $=$ ${f^{ - 1}}$(n), if n is odd and n + 1 $=$ ${f^{ - 1}}(n)$, if n is even.
Hence, ${f^{ - 1}}(n) = \left\{ {\begin{array}{llllllllllllllllllll}{n - 1,}&{if}&{{\rm{n is odd}}}\\{n + 1,}&{if}&{{\rm{n is even}}}\end{array}} \right.$. Hence, ${f^{ - 1}} = f$
No comments yet — start the discussion.