Compute the preimage of dyadic interval via binary expansion map. I am working on an exercise about measure theory and I need to use the binary expansion of real number in the dyadic interval.
Firstly, we know that the binary expansion of real number in $[0,1]$ is a map $f:\Omega\longrightarrow [0,1]$ maps $\omega=(x_{1},\cdots, x_{n},\cdots)$ to $$f(\omega):=\sum_{j=1}^{\infty}\dfrac{x_{j}}{2^{j}}.$$
My question is then how to express $f^{-1}(E)$ if $E=(\frac{k}{2^{j}}, \frac{k+1}{2^{j}})$ is the dyadic interval.
This question is basically equivalent to finding a way to represent $x\in E$ in binary expansion.
I am not really familiar with this material, so I read several online notes. For now, the only thing I know is that this map is well-defined since the series converges (comparison test), it is surjective since any real number in $[0,1]$ has a binary expansion, but it is not injective because not all real number has a unique binary expansion (the dyadic rationals have two expansion).
I also tried to follow the post here how to find the binary expansion of any number in the unit interval [0,1], but I got confused.
The post identifying the measure $\lambda f^{-1}$ on the interval $[0,1]$ seems suggested that the binary expansion of points in the dyadic interval has only finitely many of entries, but I have no idea why it is true.
From this, Whether a real number is a dyadic rational iff its binary expansion terminates?, I know that dyadic rational has terminating representation, but why does all the points in the dyadic intervals has finite length representation?
For now, I can only say that since dyadic rational has terminating binary expansion, and the length is the same as $j$. That is, $$\dfrac{k}{2^{j}}=0.x_{1}x_{2}\cdots x_{j}\ \ \text{and}\ \ \dfrac{k+1}{2^{j}}=0.y_{1}y_{2}\cdots y_{j}.$$ So, every $x\in E$ satisfies $$0.x_{1}x_{2}\cdots x_{j}<x<0.y_{1}y_{2}\cdots y_{j},$$ and thus $$f^{-1}(E)=f^{-1}(0.x_{1}x_{2}\cdots x_{j}, 0.y_{1}y_{2}\cdots y_{j}),$$ but then what does this mean in the space $\Omega$?.. It seems that we have many choices for the preimage.
 A: There are always numbers in any interval of the form $\ \left(\frac{k}{2^n},\frac{k+1}{2^n}\right)\ $ which don't have binary expansions of finite length (in fact, there are always an uncountable number of irrational numbers in such an interval). Your question about the binary expansion of points in a dyadic interval having only a finite number of entries therefore implicitly assumes a false proposition.
A number $\ \alpha\ $ will lie in the interval $\ \left[\frac{k}{2^n},\frac{k+1}{2^n}\right]\ $ if and only if $\ 2^n\alpha\ $ lies in the interval $\ [k,k+1]\ $—that is $\ 2^n\alpha=k+\beta\ $, where $\ \beta\ $ is  a number in the interval $\ [0,1]\ $. If $\ \displaystyle k=\sum_{i=0}^r k_i2^i\ $ is the terminating binary expansion of $\ k\ $, then $\ k+\beta\ $ will have a binary expansion $\ \displaystyle k=\sum_{i=0}^r k_i2^i+\sum_{i=1}^\infty\frac{\beta_i}{2^i}\ $ for some sequence $\ \left(\beta_1,\beta_2,\dots, \beta_j,\dots\right)\in\Omega\ $, and $\ \alpha\ $ will have a binary expansion $\ \alpha=$$\displaystyle \sum_{i=0}^r \frac{k_i}{2^{n-i}}+\sum_{i=1}^\infty\frac{\beta_i}{2^{n+i}}\ $.
Thus, corresponding to your map $\ f\rightarrow \left[0,1\right]\ $, there is also a map $\ g:\Omega\rightarrow \left[\frac{k}{2^n},\frac{k+1}{2^n}\right]\ $ given by
$$
g(\omega)= \sum_{i=0}^r\frac{k_i}{2^{n-i}}+\sum_{i=1}^\infty\frac{x_i}{2^{n+i}}=\frac{k+f(\omega)}{2^n}
$$
for $\ \omega=\left(x_1,x_2,\dots,x_j,\dots\right)\ $.
Addendum:
If $\ k\ge 2^n\ $, then no element of $\ \left(\frac{k}{2^n},\frac{k+1}{2^n}\right)\ $ lies in the range of $\ f\ $, so $\ f^{-1}\left(\left(\frac{k}{2^n},\frac{k+1}{2^n}\right)\right)=\phi\ $ in that case.
If $\ 0\le k<2^n\ $ and $\ x\in \left(\frac{k}{2^n},\frac{k+1}{2^n}\right)\ $ is not a dyadic rational, then $\ x\ $  has a unique binary expansion $\ \displaystyle \sum_{i=0}^r\frac{k_i}{2^{n-i}}+\sum_{i=1}^\infty\frac{x_i}{2^{n+i}}\ $ where $\ \left(x_1,x_2,\dots,x_j,\dots\right)\in\Omega\setminus\{\mathbf{0},\mathbf{1}\}\ $, with $\ \mathbf{0}=$$(0,0,\dots,0,\dots)\ $ and $\ \mathbf{1}=(1,1,\dots,1,\dots)\ $. Therefore $\ x=f\left(\underbrace{0,\dots,0}_{n-r-1},k_r,k_{r-1},\dots,k_0,x_1,x_2,\dots\right)\ $ in this case.
On the other hand if $\ x=\frac{\ell}{2^m} \in \left(\frac{k}{2^n},\frac{k+1}{2^n}\right)\ $ is a dyadic rational with $\ \ell\ $ odd, then we must have $\ m>n\ $ and $\ 2^{m-n}k<$$\ell<$$2^{m-n}(k+1)\ $, and $\ x\ $ has exactly two binary expansions:
\begin{align}
x&=\sum_{i=0}^r\frac{k_i}{2^{n-i}}+\sum_{i=1}^{m-n-r}\frac{\ell_{m-n-r-i}}{2^{n+i}}&\text{ and}\\
x&=\sum_{i=0}^r\frac{k_i}{2^{n-i}}+\sum_{i=1}^{m-n-r-1}\frac{\ell_{m-n-r-i}}{2^{n+i}}+\sum_{i=m-n+1}^\infty \frac{1}{2^{n+i}}\ .
\end{align}
Thus, if $\ x=f(\omega)\ $, then we must have either
\begin{align}
\omega&=\\
&\big(\underbrace{0,\dots,0}_{n-r-1},k_r,k_{r-1},\dots,k_0,\ell_{m-n-1},\ell_{m-n-2},\dots,\ell_1,1,0,0,\dots\big)\\
\text{or}\\
\omega&=\\
&\big(\underbrace{0,\dots,0}_{n-r-1},k_r,k_{r-1},\dots,k_0,\ell_{m-n-1},\ell_{m-n-2},\dots,\ell_1,0,1,1,\dots\big)
\end{align}
Thus, $\ x=f\big(\underbrace{0,\dots,0}_{n-r-1},k_r,k_{r-1},\dots,k_0,x_1,x_2,\dots\big)\ $ for some  $\ \left(x_1,x_2,\dots,x_j,\dots\right)\in\Omega\setminus\{\mathbf{0},\mathbf{1}\}\ $, in this case also.
Therefore, if $\ 0\le k<2^n\ $, then
\begin{align}
f^{-1}&\left(\left(\frac{k}{2^n},\frac{k+1}{2^n}\right)\right)=\\
&\bigg\{\big(\underbrace{0,\dots,0}_{n-r-1},k_r,k_{r-1},\dots,k_0,x_1,x_2,\dots\big)\,\bigg|\left(x_1,x_2,\dots\right) \in\Omega\setminus\{\mathbf{0},\mathbf{1}\}\bigg\}
\end{align}
