# Constructing a bijection

I need help with this question.

Construct an explicit bijection from [0,1] to (0,1) over the real numbers.

I have one that works over naturals but however I cannot not figure it out over the reals. Any and all help is appreciated.

• What does "over the real numbers" mean? – Chris Eagle Sep 15 '11 at 20:22
• For that matter, finding a bijection between the natural numbers in $[0,1]$ and the natural numbers in $(0,1)$ seems rather difficult... – Arturo Magidin Sep 15 '11 at 20:26

Hint. Use Hilbert's Hotel to lodge some numbers in $(0,1)$; then deal with the two newcomers $0$ and $1$.

That is: find a sequence $x_1,x_2,\ldots,x_n,\ldots$ of numbers in $(0,1)$, all distinct. Map $x_1$ to $0$; map $x_2$ to $1$. Map $x_3$ to $x_1$. Map $x_4$ to $x_2$. And so on. As for the rest of the numbers in $(0,1)$, well, they can just stay where they are...

• "lodge" - nice :) – The Chaz 2.0 Sep 16 '11 at 3:36

Consider an injective function $h(n) = 1/(n+1)$ from $\mathbb{N}$ to $(0,1)$. You get a bijection setting

$f(0) = h(1) = 1/2$

$f(1) = h(2) = 1/3$

$f(1/(n+1)) = h(n+2) = 1/(n+3)$

$f(x) = x\quad$ if $\quad x \neq 1/n$.