Join WhatsApp Icon JEE WhatsApp Group
Question 78

Let $$N$$ be the set of natural numbers and two functions $$f$$ and $$g$$ be defined as $$f, g: N \to N$$ such that $$f(n) = \begin{cases} \frac{n+1}{2}, & \text{if n is odd} \\ \frac{n}{2}, & \text{if n is even} \end{cases}$$ and $$g(n) = n - (-1)^n$$. Then $$fog$$ is:

We consider the set of natural numbers $$N=\{1,2,3,\dots\}$$ and the two given functions

$$f:N\to N,\qquad f(n)= \begin{cases} \dfrac{n+1}{2}, & \text{if }n\text{ is odd}\\[6pt] \dfrac{n}{2}, & \text{if }n\text{ is even} \end{cases}$$

and

$$g:N\to N,\qquad g(n)=n-(-1)^n.$$

First we rewrite $$g$$ separately for even and odd inputs. We know the elementary fact $$(-1)^n=\begin{cases}1,& n\text{ even}\\-1,& n\text{ odd.}\end{cases}$$ Using this fact, we have

For even $$n,$$ say $$n=2k,$$

$$g(2k)=2k-1.$$

For odd $$n,$$ say $$n=2k-1,$$

$$g(2k-1)=2k-1-(-1)^{2k-1}=2k-1-(-1)=2k.$$

So

$$g(n)=\begin{cases} n-1,& n \text{ even}\\ n+1,& n \text{ odd}. \end{cases}$$

Now we evaluate the composition $$f\circ g,$$ that is, $$\bigl(f\circ g\bigr)(n)=f\bigl(g(n)\bigr).$$ We again consider the parity of $$n.$$

Case 1 : $$n$$ is even. Write $$n=2k.$$ Then

$$g(n)=g(2k)=2k-1,$$

and this number $$2k-1$$ is odd. When the input to $$f$$ is odd we use the first branch of $$f,$$ hence

$$f\bigl(g(2k)\bigr)=f(2k-1)=\dfrac{(2k-1)+1}{2}=\dfrac{2k}{2}=k.$$

Because $$n=2k,$$ we can rewrite this result as

$$\bigl(f\circ g\bigr)(n)=\dfrac{n}{2},\qquad n\text{ even}.$$

Case 2 : $$n$$ is odd. Write $$n=2k-1.$$ Then

$$g(n)=g(2k-1)=2k,$$

and this output $$2k$$ is even. For an even input, $$f$$ takes its second branch, giving

$$f\bigl(g(2k-1)\bigr)=f(2k)=\dfrac{2k}{2}=k.$$

Because $$n=2k-1,$$ this can be rewritten as

$$\bigl(f\circ g\bigr)(n)=\dfrac{n+1}{2},\qquad n\text{ odd}.$$

Combining the two cases, we obtain the explicit expression

$$\boxed{\bigl(f\circ g\bigr)(n)= \begin{cases} \dfrac{n+1}{2}, & n\text{ odd}\\[6pt] \dfrac{n}{2}, & n\text{ even} \end{cases}}$$

We notice that this is exactly the same rule that defines $$f$$ itself. Hence $$f\circ g=f.$$ To decide between the options we must examine whether this function is one-one (injective) and/or onto (surjective) as a map from $$N$$ to $$N.$$

Injectivity test. We compute two different inputs that yield the same output:

$$f(1)=\dfrac{1+1}{2}=1,\qquad f(2)=\dfrac{2}{2}=1.$$

The values $$1$$ and $$2$$ are distinct, yet $$f(1)=f(2).$$ Therefore $$f$$ is not one-one. Since $$f\circ g=f,$$ the composition is also not one-one.

Surjectivity test. Take any arbitrary natural number $$m\in N.$$ Choosing $$n=2m$$ (which is even) gives

$$f(2m)=\dfrac{2m}{2}=m.$$

Thus every element $$m$$ in the codomain $$N$$ is hit by some element of the domain, so $$f$$ is onto, and therefore $$f\circ g$$ is also onto.

We have proved that $$f\circ g$$ is onto but not one-one.

Hence, the correct answer is Option A.

Get AI Help

Create a FREE account and get:

  • Free JEE Mains Previous Papers PDF
  • Take JEE Mains paper tests

50,000+ JEE Students Trusted Our Score Calculator

Predict your JEE Main percentile, rank & performance in seconds

Ask AI

Ask our AI anything

AI can make mistakes. Please verify important information.