3
$\begingroup$

I'm having a bit of trouble formulating a bijection between the sets $\{0,1\} \times \mathbb N$ and $\mathbb Z$. I understand how to find a bijection between $\mathbb N$ and $\mathbb Z$ using a piecewise function that sends even values of $\mathbb N$ to positive integers and odd values of $\mathbb N$ to negative integers, but I'm a bit stuck formulating a function $f(a,n)$ for these two sets. Any help would be greatly appreciated and I apologize for formatting.

$\endgroup$
  • 1
    $\begingroup$ you can start with $f((0,n))=n$ and $f((1,n))=-n$ this is almost an answer. (the difficult part is dealing with zero) $\endgroup$ – Yanko Oct 20 '17 at 13:25
  • 1
    $\begingroup$ Do you include $0$ in $\mathbb N$? $\endgroup$ – Wojowu Oct 20 '17 at 13:27
  • $\begingroup$ I believe that ℕ generally excludes 0. $\endgroup$ – John21 Oct 20 '17 at 13:28
  • $\begingroup$ I quickly saw my mistake, but you guys are faster $\endgroup$ – Gustavo Oct 20 '17 at 13:31
3
$\begingroup$

Visual solution:

$\mathbb N$ looks like this:

$$\times\times\times\times\times\times\times\times\times\times\cdots\\$$

So $\mathbb N\times\{0,1\}$ looks like this:

$$\times\times\times\times\times\times\times\times\times\times\cdots\\ \times\times\times\times\times\times\times\times\times\times\cdots\\$$

While $\mathbb Z$ looks like this:

$$\cdots\times\times\times\times\times\times\times\times\times\times\cdots\\$$


Now, imagine you take the middle picture and you take the upper line of $\times$-s and flip it so you would get:

$$\cdots \times\times\times\times\times\times\times\times\times\times\times\\ \times\times\times\times\times\times\times\times\times\times\cdots\\$$

Now, imagine if I draw a little more space between two arbitrary elements of $\mathbb Z$:

$$\cdots \times\times\times\times\times\times\qquad\times\times\times\times\times\times\cdots\\$$

Can you see the bijection that is naturally appearing between these two sets?

$\endgroup$
3
$\begingroup$

Assuming $\Bbb N$ does not contain zero, you can use

$$f(s,n)\quad=\quad\begin{cases} n&\text{for $s=0$} \\ 1-n &\text{for $s=1$}\end{cases} \quad=\quad (-1)^s\left(n-\frac12\right)+\frac12$$

which can be written with or without cases.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.