Practicing Success
A function f from the set of natural numbers to integers defined by $f(n)=\left\{\begin{matrix}\frac{n-1}{2},&when\,n\,is\,odd\\-\frac{n}{2},&when\,n\,is\,even\end{matrix}\right.$ is |
neither one-one nor onto one-one but not onto onto but not one-one one-one and onto both |
one-one and onto both |
Clearly, range (f) = Z (Set of integers) So, f is onto. We observe that distinct odd natural numbers are mapped to distinct non-negative integers and distinct even natural numbers are mapped to distinct negative integers. So, f is one-one. Hence, f is both one-one and onto. |