$|\{0,1\}^\infty| = |\mathbb{R}|$?

Let $\{0,1\}^\infty$ = {$(a_n)_{n \in \mathbb{N}}; a_n \in \{0,1\} \forall n \in \mathbb{N}$}

Is there a bijection between $\{0,1\}^\infty$ and $\mathbb{R}$?

I thought about something like this: If $x \in \mathbb{R}$, then $x=a_1,a_2a_3\ldots a_na_{n+1}\ldots$, where $a_1$ is the integer part and $a_n$, $1<n$ are the decimal digits.

So, $f(x)$ would be something like $f(x)=(\underbrace{1,...,1}_{a_1 number 1},0,\underbrace{1,...1}_{a_2number1},0,...)$ .

I don't know if I made my self clear... So I'd like some help to formalize this and to know if I'm in the right way...

Thanks!

• think of binary expansions of real numbers. Argue why it suffices to find a bijection from the set of sequences above to the reals satisfying $0\le x\le 1$. – Ittay Weiss Aug 31 '14 at 0:46
• If you think of binary expansions, be careful with numbers $1 = 0.111\dots$, $0.1 = 0.0111\dots$ and so on. – Antoine Aug 31 '14 at 0:50
• Your $f$ is not a bijection: It is not defined on negative numbers and, except for perhaps the first block, all its blocks of consecutive ones are short. – Andrés E. Caicedo Aug 31 '14 at 1:05
• Do you know the Bernstein-Cantor-Schroeder theorem? It may simplify your task. Alternatively, look up "Cantor's function". – Andrés E. Caicedo Aug 31 '14 at 1:08
• @AndresCaicedo What if I started the sequence with a zero when x is negative? And I didn't understand what you mean by "its blocks of consecutive ones are short."... I'm not familiar with the Bernstein-Cantor-Schroeder theorem, but I will look up to it and Cantor's function... – Anna Aug 31 '14 at 1:13

There is a bijective map from $\mathbb{R}$ into $(0,1)$, given by: $$\phi(x) = \frac{1}{2}+\frac{1}{\pi}\arctan x$$ and an injective map from $(0,1)$ into $\{0,1\}^{\omega}$, given by the base-$2$ representation of a real number in $(0,1)$. Since there is an injective map from $\{0,1\}^{\omega}$ into a Cantor set $K\subset(0,1)$, given by: $$\psi : \{a_n\in\{0,1\}\}_{n\in\mathbb{N}^*}\to \sum_{k=1}^{+\infty}\frac{2a_k+1}{5^k}$$ then $\mathbb{R},(0,1)$ and $\{0,1\}^{\omega}$ have the same cardinality due to the Cantor-Bernstein theorem.