# Equivalent Set [0,1] and [0,1]\X

Let $$X:= \left \{\frac{1}{n}: n\in\mathbb{N}\right \}$$. Prove that there is a bijection between $$[0,1]$$ and $$[0,1]-X$$.

I still don't find a bijective function between $$[0,1]$$ and $$[0,1]-X$$. So far, I already know that $$[0,1]$$ and $$(0,1)$$ are equivalent sets. We may find a bijective function between $$(0,1)$$ and $$[0,1]-X$$ and use the composition of bijective functions.

• Here's a hint. There's a classic way to find a bijection $f:[0, 1]\to (0, 1)$ which is to pick an infinite sequence $(s_n)$ in $(0, 1)$ and define $f(0)=s_1, f(1)=s_2, f(s_k)=s_{k+2}$, and $f(x)=x$ for $x \neq 0, 1, s_k$. Can you see how to adapt that to the case where there are infinitely many points missing? Commented Mar 6 at 15:13
• I already have bijective function $f : [0,1]\to (0,1)$, but my question between $[0,1]$ and $[0,1]-X$. Commented Mar 6 at 15:15
• yes, and I'm suggesting you adapt that method to the new case. Commented Mar 6 at 15:16

The identity function is an injection $$[0,1]\setminus X\to [0,1]$$. If we can also find an injection $$[0,1]\to [0,1]\setminus X$$, we know that there is a bijection by the Schroeder-Bernstein Theorem. We can construct such an injection by sending $$0$$ to $$0$$ and "compressing" each interval $$\left(\frac{1}{n+1},\frac{1}{n}\right]$$ into $$\left(\frac{1}{n+1},\frac{2n+1}{2n(n+1)}\right]$$. This is expressed as follows:
$$f(x) = \begin{cases}0 & x= 0\\ \frac{1}{n+1}+\frac{1}{2}\left(x - \frac{1}{n+1}\right)& x\in\left(\frac{1}{n+1},\frac{1}{n}\right],n\in\mathbb{N}\end{cases}$$
• The proof of the theorem given on Wikipedia is constructive. The example there shows how to construct a bijection from $[0,1)$ to $[0,1]$; the function for this problem would be similar.0 Commented Mar 6 at 15:56
Here's a different way to do this that works for any countable set $$X$$. Enumerate $$X$$ as $$\{a_1, a_2, \ldots\}$$ (meaning that $$i\mapsto a_i$$ should be a bijection) and choose a sequence $$b_1, b_2, \ldots$$ of distinct elements of $$[0, 1]\setminus X$$. You can do that because $$[0, 1]\setminus X$$ is still infinite.
Define a function $$f: [0, 1] \to [0, 1]\setminus X$$ by $$f(a_i) = b_{2i}, f(b_i) = b_{2i-1}$$, and $$f(x)=x$$ if $$x \neq a_i, b_i$$. It is pretty clearly onto (the image obviously contains everything aside from the $$b_i$$ because of the third case of the definition, and the first two cases show that it includes every $$b_i$$) and 1-1, so $$f$$ is a bijection.
The value of this method is that it generalises. You can replace $$[0, 1]$$ with any infinite set $$Y$$ and $$X$$ with any countable set such that $$Y\setminus X$$ is infinite. The same argument still works.