2

Can someone please tell me if I can have a function that is one to one but not onto $\mathbb{Z}$ to $\mathbb{N}$? I tried these formulas \begin{align*} F(x) & = x^2+1\\ F(x) & = x^2 -1 \end{align*} But it always gives me a function that is onto but not not one to one, and I don't want it to be like this.

N. F. Taussig
  • 76,571
Yooko
  • 21
  • Try something that is not continuous. You can always take a bijection from $\mathbb Z$ to $\mathbb N$ and make it miss $1$ by pushing all the values up. –  Mar 13 '16 at 02:27
  • How can i do it ?? – Yooko Mar 13 '16 at 02:28
  • You’re close. How about something like $F(x)=x^2+\mathop{sign}(x)$? – Steve Kass Mar 13 '16 at 02:34
  • will sin or cos or any works in Discrete Mathematics? Because i am new with it . – Yooko Mar 13 '16 at 02:38
  • Sure, you just have to make sure your answer comes out in the right set, but otherwise go for it. Things like $\cos(\pi n)$ can be a nice shortcut for the equivalent statement written with powers of $(-1)$. – Eric Stucky Mar 13 '16 at 02:43
  • "not onto $Z$ to $N$" ? I think you mean from $Z$ into, but not onto $N$. For example $f(z)=2 |z|+17$ if $z\leq 0$ and $f(z)=2 z$ if $z>0$. – DanielWainfleet Mar 13 '16 at 05:43

4 Answers4

8

If $k\ge 0$, let $f(k)=2^k$. If $k\lt 0$, let $f(k)=3^{-k}$.

André Nicolas
  • 507,029
1

f(n) = 3|n| + sign(n), where sign(n) is -1, 0, or 1, according to whether n is negative, zero, or positive. All the positive multiples of 3 will have no preimage.

1

Take any bijection from $\mathbb Z \rightarrow \mathbb N$, and then double the value of the images for every point. It'll still be injective because unique points will have unique images, even after the doubling, but now it misses the odd naturals.

A. Thomas Yerger
  • 17,862
  • 4
  • 42
  • 85
0

How about

$f(n) = \begin{cases} n+3, & \text{if } n \in \{-2, -1, 0, 1, 2\}\\ n^2+1, & \text{if } n \ge 3 \\ n^2-1, & \text{if } n \le -3 \\ \end{cases}$

$f(n) = (4+sgn(n))^{|n|}$

$f(n) = \begin{cases} 2n+2, & \text{if } n\ge 0\\ 1-2n, & \text{if } n \lt 0 \\ \end{cases}$