The number of numbers on $[0,1]$ which can be written in the binary notion in two different ways is countable.

71 Views Asked by At

I have done this question before but I can't seem to prove it this time. I think I concluded that the numbers that can be written in two different ways would be numbers with a finite notation and infinite notation at the same time.

But I'm having trouble formally putting this together, and proving it. Can anyone help out with this?

2

There are 2 best solutions below

3
On BEST ANSWER

The way a number in $[0,1]$ can be written two different ways is always as follows: it either has some number of digits, ending in a $1$, followed by an infinite number of $0$s; or it has those same digits, except the final $1$ is a $0$ and it is followed by an infinite number of $1$s instead.

To give an explicit bijection from $\mathbb N$ to such numbers, simply take any $n \in \mathbb N$, write it in binary (writing $0$ as the empty string), reverse it, prepend $0.$, and then pad it on the end with an infinite number of $0$s.

Edit: actually, this gives a bijection to $[0,1)$ instead. But of course a set with one element more than a countable set is still countable.

0
On

You are right that if a number has two representations, then one of them terminates at finite length. It is not difficult to list / count them all, thus proving that the set containing them is countable.

Start with the ones with $0$ bits after the decimal point before terminating. That's $0$ and $1$. Then the ones with one bit before terminating. That's just $0.1$. Then the ones with two bits. That's $0.01$ and $0.11$. Then three bits (four numbers here): $0.001, 0.011, 0.101,0.111$. And so on. In each step there are only finitely many of them (after the first hiccup, the number of numbers follows the powers of $2$).

So our list is countable, and every terminating number is counted, since we take all numbers of any given length before moving on to the next length.