How do I prove this function is not surjective?

70 Views Asked by At

\begin{align*} g: \mathbb{N} & \to \mathbb{Z} \\ g(n) &= \begin{cases} \frac{n+1}{2} & n \textrm{ is odd.}\\ -\frac{n}{2} & n \textrm{ is even.} \end{cases} \end{align*}

Since $0\notin \mathbb{N}$, I think this function is not surjective. How are you supposed to prove this? Pick a generic element $x$ of natural numbers and somehow show that it can never produce $g(n)=0$?

Thanks.

2

There are 2 best solutions below

0
On BEST ANSWER

I think that your idea is right, just observe that since

  • $\frac{n+1}{2}=0\iff n=-1\not \in\mathbb{N}$
  • $ -\frac{n}{2} \iff n=0\not \in\mathbb{N}$

$g(n)=0\in \mathbb{Z}$ is not reached.

0
On

It depends how you define $\mathbb{N}$. If $0\in\mathbb {N}$, then $g(0)=0$ since $0$ is even. Otherwise, you right. See here: http://mathworld.wolfram.com/NaturalNumber.html