# Bijection between $[0,1)$ and the space of binary sequences

My question deals with the problem of showing that the set $$\Omega = \{ \omega \colon \omega =(a_1,a_2, \ldots ), a_i =0,1\}$$ has the same cardinality as the interval $[0,1)$. In a textbook I read the following explanation:

It is well known that every number $a \in [0,1)$ has a unique binary expansion (containing an infinite number of zeros) $$a = \frac{a_1}{2} + \frac{a_2}{2^2} + \ldots \qquad (a_i=0,1).$$ Hence it is clear that there is a one-to-one correspondence between the points $\omega \in \Omega$ and the points $a$ of the set $[0,1)$, and therefore $\Omega$ has the cardinality of the continuum.

Now I have two questions:

• It's simply saying that the binary numerals that terminate with finitely many digits (e.g. $0.1$) can also be written with infinitely many zeros after the last $1$-digit (e.g. $0.1000...$). Thus, requiring all binary numerals to have infinitely many zeros eliminates the terminating kind, and guarantees uniqueness. – r.e.s. Mar 30 '16 at 5:32
• You can look up the theorem known as the Cantor-Bernstein or Schroeder-Bernstein or Cantor-Schroeder-Bernstein theorem for more ideas on this issue. – DanielWainfleet Mar 30 '16 at 15:26
• A correction to the last paragraph. The binary expansion is usually unique. The set of points that have two expansions is countable, being only fractions with denominator a power of $2$. The set of points with a unique expansion is the uncountable rest. – Ross Millikan Jun 23 '17 at 14:19

You are correct that there is a mistake in the text, though you are not quite correct about what the mistake is. By "containing an infinite number of zeros", they mean that when you have a number whose binary expansion is not unique, you should choose the one which has infinitely many $0$s (it will have one expansion ending in all $0$s, and one expansion ending in all $1$s; choose the first one). So this does give a well-defined function $f:[0,1)\to\Omega$.

However, because of the non-uniqueness of binary expansions, this function is not a bijection (contrary to what the text claims)! It is injective, but it is not surjective. After all, by construction, for every $a\in [0,1)$, the sequence $f(a)$ has infinitely many $0$s. So any sequence that has only finitely many $0$s will not be in the image of $f$.

• Is it possible to modify the function $f$ in such a way that it is a bijection? Or do we need a completely other way to show that $[0,1)$ and $\Omega$ have the same cardinality? – user98187609 Mar 30 '16 at 5:57
• You can modify $f$ to be a bijection, but it's not especially simple to do so. One way to do it is to notice that the set of points of $\Omega$ that are not in the image of $f$ form a countable set. You can then choose a countably infinite subset of $[0,1)$ send half of that countable subset to cover its original image under $f$ and the other half to cover the points of $\Omega$ that $f$ missed. – Eric Wofsey Mar 30 '16 at 6:13
• I think in math.stackexchange.com/questions/553526/the-set-of-real-numbers I found the map you just described. One last step is missing: How can I show that both the sets of numbers with a binary expansion with finitely many zeroes resp. ones are countably infinite sets? – user98187609 Mar 30 '16 at 7:37
• – Eric Wofsey Mar 30 '16 at 7:41
• $A=\mathbb{N}$ and the set of finite subsets are the sequences which break at a certain position and continue with nothing but zeroes resp. ones. Is this correct? – user98187609 Mar 30 '16 at 7:49

An infinite number of zeros means that in the expansion $$a=\frac{a_1}{2}+\frac{a_2}{4}+...,$$ infinitely many of the numbers $a_i$ are zero. The reason we need this is because otherwise, as you say, the binary expansion is not unique. An example of this is $1/2=0+1/4+1/8+....$

This function is not a bijection, merely an injection. Its image is the set of all binary sequences with an infinite number of zeros. So perhaps this function is a step in the invocation of the Schroder Bernstein Theorem?

At first glance, it seems to me like the fact that we are limiting ourselves to binary sequences containing infinite zeroes means that we are guaranteed uniqueness.

In base 10, non uniqueness basically comes from the fact that $0.9999\ldots = 1$. Similarly in binary, non uniqueness comes from the fact that $0.111\ldots = 1$ (as an exercise, prove this using the $a_i$ expansion formula in your question). However, if we assert that there are infinitely many zeroes in our sequence, it means that the tail of the sequence cannot consist only of ones (why?). This in turn guarantees that our binary expansions are unique.