Functions Ques 15
- Let $N$ be the set of natural numbers and two functions $f$ and $g$ be defined as $f, g: N \longrightarrow N$ such that $f(n)= \begin{cases}\frac{n+1}{2} ; & \text { if } n \text { is odd } \ \frac{n}{2} ; & \text { if } n \text { is even }\end{cases}$
and $g(n)=n-(-1)^n$. Then, fog is
(2019 Main, 10 Jan II)
(a) one-one but not onto
(b) onto but not one-one
(c) both one-one and onto
(d) neither one-one nor onto
Show Answer
Answer:
Correct Answer: 15.(b)
Solution: (b) Given, $f(n)= \begin{cases}\frac{n+1}{2}, & \text { if } n \text { is odd } \\ \frac{n}{2}, & \text { if } n \text { is even, }\end{cases}$
and $\quad g(n)=n-(-1)^n=\left\{\begin{array}{l}n+1, \text { if } n \text { is odd } \\ n-1, \text { if } n \text { is even }\end{array}\right.$
Now, $f(g(n))=\left\{\begin{array}{l}f(n+1), \text { if } n \text { is odd } \\ f(n-1), \text { if } n \text { is even }\end{array}\right.$
$=\left\{\begin{array}{l}\frac{n+1}{2}, \text { if } n \text { is odd } \\ \frac{n-1+1}{2}=\frac{n}{2}, \text { if } n \text { is even }\end{array}\right.$
$=f(x)$
$[\because \quad $ if $n$ is odd, then $(n+1)$ is even and if $n$ is even, then $(n-1)$ is odd]
Clearly, function is not one-one as $f(2)=f(1)=1$
But it is onto function.
$[\because \quad $ If $m \in N$ (codomain) is odd, then $2 m \in N$ (domain) such that $f(2 m)=m$ and
if $m \in N$ codomain is even, then
$2 m-1 \in N$ (domain) such that $f(2 m-1)=m]$
$\therefore \quad $ Function is onto but not one-one