Bijection $\mathbb N \to \mathbb Z$ using floor function. Define bijection $\mathbb Z \to \mathbb Q$ After defining the bijection
$$ 
F: \mathbb{N}\to \mathbb{Z}$$ using floor function,
and by defining bijections:
$$\mathbb{N} \to \mathbb{N} \setminus \{ 0 \}\\
\mathbb{Q} \to \mathbb{Q} \setminus \{ 0 \} 
$$
define bijection:
$$\mathbb{Z} \to \mathbb{Q} \setminus \{ 0 \}$$.
After a few attempts I got first one $F: \Bbb N \to \Bbb Z$ , $F(x) = (-1)^x \lfloor(x/2)\rfloor$ but I'm stuck with other ones.
I'm new into that course at university - if I made some mistakes - I'm sorry.

*

*$F : \mathbb N \to \mathbb Z$ defined as $F(n)=(-1)^n \lfloor {n+1 \over 2} \rfloor$.

*$G : \mathbb N \to \mathbb N \backslash \{0\}$ defined as $G(n)=n+1$.

*$H : \mathbb Q \to \mathbb Q \backslash \{0\}$ defined as $H(n)=n+1$ for $n \in \mathbb N$ and identity function otherwise.

*You can find very nice detailed answers here.

