Let $N$ be the set of natural numbers and two functions $f$ and $g$ be defined as $f, g : N \rightarrow N$ such that
$f(n) = \begin{cases} \dfrac{n+1}{2}, & \text{if } n \text{ is odd} \\ \dfrac{n}{2}, & \text{if } n \text{ is even} \end{cases}$
and $g(n) = n - (-1)^n$. Then $fog$ is:
- (1)
onto but not one-one
- (2)
Both one-one and onto
- (3)
One-one but not onto
- (4)
Neither one-one nor onto
Show answer
Option (1) is correct.
Key from source paper