If you have seen this part before, ignore the first part and jump to "Change of the algo here" section
In this post I gave this following Algorithm to generate every element of $2^{\mathbb{N}}$ with given a value $x\in \mathbb{R}_{[0,1)}$
let $x\in \mathbb{R}_{[0,1)}$.
If $x=1$, then note that $1_{10}=0.\dot{9}_{10}$ and $0.\dot{9}_{10}=0.\dot{1}_2$
Otherwise calculate $2x$, if $2x\geq 1$, then fix first number $1$, and if $2x<1$, fix first number $0$. Now calculate $\{2x\}$, the fraction part of $2x$.
Calculate $2\{2x\}$, if $2\{2x\}\geq 1$, then fix second number $1$, and if $2\{2x\}<1$, fix second number $0$. Now calculate $\{2\{2x\}\}$, the fraction part of $2\{2x\}$.
Continue this process. Finally you will get an element of $2^{\mathbb{N}}$.
I made this part invisible since this part is not needed after the edit:
But one user(Ross Millikam) argued that I ca not generate $0,1,1,1,\dots$ using this algo! So I wrote "take a sequence $a_1=0.49, a_2=0.499,\dots$, in general $a_n=0.499\dots 9$($n\space 9$s)in base $10$. Now generate the algorithm I gave on $a_1,a_2,\dots$. Generated value of $\lim_{n\to\infty} a_n$ is $0,1,1,\dots$. So the algo generates $0,1,1,\dots$."
Is my argument wrong? Is this algo really do represent the bijection between $\mathbb{R}_{[0,1]}$ and $2^{\mathbb{N}}$ ?
One important things to note:
- $0.4\dot{9}_{10}=0.0\dot{1}_2=0.1_2=0.5_{10}$
Please, I do not need a alternative answer!!! The link gave already have plenty of that!
Change of the algo here:
First, for any $x\in \mathbb{R}_{[0,1)}$ consider these steps. Let's call it Structure:
Calculate $2x$, if $2x\geq 1$, then fix first number $1$, and if $2x<1$, fix first number $0$. Now calculate $\{2x\}$, the fraction part of $2x$.
Calculate $2\{2x\}$, if $2\{2x\}\geq 1$, then fix second number $1$, and if $2\{2x\}<1$, fix second number $0$. Now calculate $\{2\{2x\}\}$, the fraction part of $2\{2x\}$.
Continue this process. Finally you will get an element of $2^{\mathbb{N}}$.
The construction of a bijective function:
Let $f:\mathbb{R}_{[0,1)}\rightarrow 2^{\mathbb{N}}$
Suppose $x\in \mathbb{R}_{[0,1)}$ is not of the form $\frac{n}{2^m}$, where $n<2^m$ is odd natural number and $m\in \mathbb{N}$, then $f(x)=$ the final sequence you get from the Structure.
Now if $x\in \mathbb{R}_{[0,1)}$ is of the form $\frac{n}{2^m}$, where $n<2^m$ is odd natural number and $m\in \mathbb{N}$, then values looks like this: $$\frac{1}{2}\\\frac{1}{4}\space\space\frac{3}{4}\\\frac{1}{8}\space\space\frac{3}{8}\space\space\frac{5}{8}\space\space\frac{7}{8}\\\frac{1}{16}\space\space\frac{3}{16}\space\space\frac{5}{16}\space\space\frac{7}{16}\space\space\frac{9}{16}\space\space\frac{11}{16}\space\space\frac{13}{16}\space\space\frac{15}{16}\\\dots\\\dots\\\dots$$
First fix $f(\frac{1}{2})=(1,1,1,\dots)$. Now calculate the sequence you get from Structure for taking $x=1/2$. Surely you get $(1,0,0,0,\dots)$. Now fix $f(\frac{1}{4})=(1,0,0,0,\dots)$ and $f(\frac{3}{4})=(0,1,1,1,\dots)$. Again calculate the sequence you get from Structure for taking $x=1/4$ and $x=3/4$. Sequence you get are $(0,1,0,0,0,\dots)$ and $(1,1,0,0,0,\dots)$ respectively. You immediately fix $f(\frac{1}{8})=(0,1,0,0,0,\dots)$, $f(\frac{3}{8})=(0,0,1,1,1,\dots)$, $f(\frac{5}{8})=(1,1,0,0,0,\dots)$ and $f(\frac{7}{8})=(1,0,1,1,1,\dots)$.Continue in this way and finally you have $f$ is a bijective mapping.
Your argument is wrong because $\lim_n a_n = 1/2$, which binary digits are $0.1$ The $k$-th binary digit of number $x$ and the digits after it are discontinuous at $x$ if $x$ is a fraction $n/2^k$ where $n$ is an odd number.
Your algorithm simply computes the sequence of binary digits of real numbers, and as such, it cannot generate sequences that end up with $111...$.
Edit after your last algorithm update with "the structure"
I think the argument is now fundamentally correct. The function $f$ now maps every number that is not of the form $\frac{m}{2^k}$ to the sequence of its binary digits. You are left with countably many numbers without an image, namely the $\frac{m}{2^k}$ (with $m$ odd) and also countably many missing elements of $2^\mathbb{N}$, namely the sequences that end with an constant sequence of $0$ or a constant sequence of $1$. You can easily obtain a bijection between these two countable sets by enumerating their elements.
Good job!