Solveeit Logo

Question

Mathematics Question on Functions

Let NN be the set of natural numbers and two functions ff and gg be defined as f,g:NNf,g : N \to N such that : f(n)={n+12if n is odd n2if n is evenf(n) = \begin{cases} \frac{n+1}{2} & \quad \text{if } n \text{ is odd}\\\ \frac{n}{2} & \quad \text{if } n \text{ is even} \end{cases} and g(n)=n(1)ng(n) = n-(-1)^n. The fogfog is :

A

Both one-one and onto

B

One-one but not onto

C

Neither one-one nor onto

D

onto but not one-one

Answer

onto but not one-one

Explanation

Solution

f(x)={n+12n is odd (n+1)/2n is evenf(x) = \begin{cases} \frac{n+1}{2} & \quad n \text{ is odd}\\\ -(n+1)/2 & \quad n \text{ is even} \end{cases}
g(x)=n(1)n{n+1;n is odd n1;if n is eveng(x) = n - (-1)^n \begin{cases} n+ 1 & ; \quad n \text{ is odd}\\\ n - 1 &; \quad \text{if } n \text{ is even} \end{cases}
f(g(n))={n2;n is even n+12;n is oddf(g(n)) = \begin{cases} \frac{n}{2} ; & \quad n \text{ is even}\\\ \frac{n +1}{2} ; & \quad n \text{ is odd} \end{cases}
\therefore many one but one to one