Question
Question: A function f from the set of natural numbers to integers defined by \[f\left( n \right) = \left\\{...
A function f from the set of natural numbers to integers defined by
\dfrac{{n - 1}}{2}\,\,{\text{if }}n{\text{ is odd}} \\\ \dfrac{{n - 1}}{2}{\text{if }}n{\text{ is even}} \\\ \end{gathered} \right.$$ A. Onto but not one-one. B. One-one and onto both. C. Neither one-one nor both. D. One-one but not onto.Solution
In this problem, we need to use injectivity and surjectivity test to check whether the function is one-one or onto or both. A function is said to be an onto function, if co domain of the function is the same as the range of the function.
Complete step by step answer:
Injectivity:
Consider, A and B be any two elements in the domain of function f.
Case (i): Both A and B are even numbers.
Case (ii): Both A and B are odd numbers.
f(A)=f(B) ⇒2A−1=2B−1 ⇒A−1=B−1 ⇒A=BCase (iii): let, A is even B is odd.
f(A)=f(B) ⇒2A−1=2B−1 ⇒A−1=B−1 ⇒A=BFrom, case (iii) it is clear that, the function f has same value for different numbers, thus, the function f is not one-one.
Surjectivity:
The co domain of the function f is shown below.
{\text{Co domain of }}f\left( Z \right) = \left\\{ { \ldots , - 3, - 2, - 1,0,1,2,3, \ldots } \right\\}
Now, the range of function f is shown below.
So, the correct answer is “Option C”.
Note: A function is said to be one to one function if it maps distinct elements of its domain to distinct elements of its codomain. A function is said to be onto if every element of its codomain is the image of at least one element of domain.