Construction of $g:\mathbb{N}\rightarrow\mathbb{N}$ surjective, such that $g^{-1}(n)=\infty,\;\forall n\in\mathbb{N}$

examples-counterexamplesfunctionsnatural numbers

The question is as the title describes. I found this exercise where it was asked to prove the existence of a subjective function $g:\mathbb{N}\rightarrow\mathbb{N}$, such that $g^{-1}(n)=\infty,\;\forall n\in\mathbb{N}$.

I thought in expressions like $g(n)=\left[\frac{n^2}{|\mathbb{N}|}\right]$, or $g(n)=|\mathbb{N}|-n$, but I don't fill very comfortable with them. Any suggestions or explanations for the possible expressions that I thought for $g$? 🙁

PS: $|\mathbb{N}|$ stands for the cardinality of $\mathbb{N}$, and $[x]$ is the integer part of $x$.

Best Answer

Consider a bijection $f : \mathbb{N} \rightarrow \mathbb{N}^2$, and consider the function $h : \mathbb{N}^2 \rightarrow \mathbb{N}$ defined for every $(x,y) \in \mathbb{N}^2$ by $$h(x,y)=x$$

Then, $g : =h \circ f$ should do the job.

Related Question