A function \( f \) from the set of natural numbers to integers defined by
\[
f(n) =
\begin{cases}
\frac{n-1}{2}, & \text{when } n \text{ is odd}
-\frac{n}{2}, & \text{when } n \text{ is even}
\end{cases}
\]
is
Show Hint
Split domain into cases (odd/even) to analyze injectivity and surjectivity clearly.