Question
Question: Let N be the set of natural number and two functions f and g be defined as \(\text{f}\text{.g}:N\to ...
Let N be the set of natural number and two functions f and g be defined as f.g:N→N such that
f\left( n \right)\left\\{ \begin{matrix}
\dfrac{n+1}{2},\text{if n is odd} \\\
\dfrac{n}{2},\text{if n is even} \\\
\end{matrix} \right.
And g(n)=n−(−1)n . The fog 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
Solution
Hint: For g (n), find the case where n is odd not even, fog is f (g(x)). Hence prove that f (n) = fog (n). Put n = 1, 2 odd and even in the expression of fog (n), find if it's one-one. Then check if fog (n) is onto by taking f (n) in cases of odd and even. Then prove that n is the same as f (n).
Complete step-by-step answer:
It is said that N is a set of number, we have been given two functions which are f and g respectively. We have been given two cases of f (n) and g (n)
\begin{aligned}
& f\left( n \right)\left\\{ \begin{matrix}
\dfrac{n+1}{2},\text{if n is odd} \\\
\dfrac{n}{2},\text{if n is even} \\\
\end{matrix} \right.............................\left( i \right) \\\
& g\left( n \right)=n-{{\left( -1 \right)}^{n}} \\\
\end{aligned}
If n is odd, then g(x) = n – (-1) = n + 1
When n is even, g(x) = n – (+1) = n – 1
Thus we can write,
g\left( n \right)=n-{{\left( -1 \right)}^{n}}=\left\\{ \begin{matrix}
n+1,\text{n is odd} \\\
n-1,\text{n is even} \\\
\end{matrix} \right.............................\left( ii \right)
Now,
fog=\left\\{ \begin{matrix}
f\left( n+1 \right),\text{n is odd} \\\
\text{f}\left( n-1 \right)\text{, n is even} \\\
\end{matrix} \right.............................\left( iii \right)
Here fog = f (g(x)) – f is the outer function and g is the inner function. Now substitute the expression (i) in (iii)
\begin{aligned}
& fog=\left\\{ \begin{matrix}
\dfrac{n+1}{2},\text{if n is odd} \\\
\dfrac{n-1+1}{2},\text{if n is even} \\\
\end{matrix} \right.\left( \text{as it is even odd one to it} \right) \\\
& fog\left( n \right)=\left\\{ \begin{matrix}
\dfrac{n+1}{2},\text{if n is odd} \\\
\dfrac{n}{2},\text{if n is even} \\\
\end{matrix} \right...........................\left( iv \right) \\\
\end{aligned}
Now equation (iv) is equal to (i)
i.e. fog(n) = f(n)
Thus domain and co-domain are both n, as it is given that N→N .
Now let us find,
Fog (n) as 1 in odd, put in expression (iv)
fog(1)=2n+1=21+1=32=1fog(2)=2n=22=1
Here 2 is even. So we have 2n .
Hence fog (1) = 1 and fog (2) = 1.
A function is said to be one-one if every y value has exactly one x value mapped onto it and many one, if there are y values that have more than x value mapped onto them.
Thus fog (1) has fog (2) has the same value 1. Hence we can say that fog is a many one function and not one-one function. Now we need to check if fog (n) is onto or into.
Let us take,
f(n)=2n+1
Where n is odd. Now if we multiply by 2 on the above expression,
2f(n)=(2n+1)×2⇒2f(n)=n+1∴n=2f(n)−1
Now n is odd. Thus we assumed f (n) as odd, we got the value of n as odd. Thus they both are odd, hence we can say that for n being odd, f (n) is onto. Now let us take,
f(n)=2n
Where n is even. Now let us multiply by 2 on the above expression
2f(2)=2n×2⇒2f(n)=n
Thus n is even and f (n) was taken as even. Thus here n belongs to even, hence function f (n) is onto. We said that fog (n) = f (n). As f (n) is onto, fog (n) is also onto function. Hence, we get function fog (n) as many-one but not one-one and fog (n) is onto. Thus fog (n) is many-one and onto function.
Therefore option (b) is correct.
Note: To solve a question like this we should know the basis of one-one function and onto function. We have got here many-one functions in the place of one-one functions as we got the same value for both fog (1) and fog (2). If it wasn’t then fog (n) might have been onto.