# let N be the set of natural

Question:

Let $\mathbf{N}$ be the set of natural numbers and two functions $f$ and $g$ be defined as $f, g: \mathbf{N} \rightarrow \mathbf{N}$ such that

$f(\mathrm{n})= \begin{cases}\frac{\mathrm{n}+1}{2} & \text { if } \mathrm{n} \text { is odd } \\ \frac{\mathrm{n}}{2} & \text { if } \mathrm{n} \text { is even }\end{cases}$

and $g(\mathrm{n})=\mathrm{n}-(-1)^{\mathrm{n}} .$ Then $f o g$ is:

1. (1) onto but not one-one.

2. (2) one-one but not onto.

3. (3) both one-one and onto.

4. (4) neither one-one nor onto.

Correct Option: 1,

Solution:

(1) $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}$

$g(n)= \begin{cases}2, & n=1 \\ 1, & n=2 \\ 4, & n=3 \\ 3, & n=4 \\ 6, & n=5 \\ 5, & n=6\end{cases}$

then $f(g(n))= \begin{cases}\frac{g(n)+1}{2}, & \text { if } g(n) \text { is odd } \\ \frac{g(n)}{2}, & \text { if } g(n) \text { is even }\end{cases}$

$f(g(n))=\left\{\begin{array}{cc}1, & n=1 \\ 1, & n=2 \\ 2, & n=3 \\ 2, & n=4 \\ 3, & n=5 \\ 3, & n=6 \\ : & : \\ : & : \\ : & :\end{array}\right.$

$\Rightarrow f o g$ is onto but not one - one