# Specific question on showing every open set in $\mathbb{R}$ can be written as the disjoint union of dyadic intervals

Sorry if this was unneccesarily wordy! Still learning to talk in math haha.

So I was trying to show that if i'm trying to show every open set in $$\mathbb{R}$$ can be written as a disjoint union of dyadic intervals, then it suffices to show that every open interval can be written as the disjoint union of dyadic intervals. Assuming that i've shown every interval of the form $$(a,b)$$ is the disjoint union of dyadic intervals, how do I show that $$(-\infty,b)$$ and $$(a,\infty)$$ are also disjoint union of dyadic intervals?

Sorry if this was unnecessarily wordy!

BTW, a dyadic interval is any interval of the form $$[j2^{-k},(j+1)2^{-k})$$ where $$j,k \in \mathbb{N}$$

Here's a sketch for $$(-\infty, b)$$. The $$(a, \infty)$$ case is similar.

Clearly there's no problem if $$b$$ is an integer (use dyadic intervals of length $$1$$ with integer endpoints). So it suffices to show that you can express $$I = [\lfloor b \rfloor, b)$$ as a disjoint union of dyadic intervals, where $$\lfloor b \rfloor$$ is the floor of $$b$$ (i.e., the greatest integer not exceeding $$b$$).

To do this, we build a pairwise disjoint collection of dyadic intervals as follows.

Let $$a_1 = \lfloor b \rfloor$$, and $$b_1 = a_1 + 1/2$$. Define $$I_1 = [a_1, b_1)$$. If $$I_1 \subseteq I$$, then add $$[a_1,b_1)$$ to the collection, otherwise don't. Then for general $$n > 1$$, if we kept $$I_{n-1}$$, then set $$a_n = b_{n-1}$$, otherwise set $$a_n = a_{n-1}$$. Let $$b_n = a_n + 1/2^{n}$$. Define $$I_n = [a_n, b_n)$$. If $$I_{n} \subseteq I$$, then add $$I_n$$ to the collection, otherwise don't.

Let $$\mathcal N$$ denote the set of indices $$n$$ for which we added $$I_n$$ to the collection.

It's easy to verify that the $$I_n$$ are pairwise disjoint and dyadic, and that $$\bigcup_{n\in \mathcal N}I_n = I$$. To see why the latter is true, observe that $$0 \leq b - b_n < 1/2^n$$, so $$b_n \to b$$ as $$n \to \infty$$.

Note that the indices in $$\mathcal N$$ correspond exactly to the indices where there are ones in the binary expansion of $$b - \lfloor b \rfloor$$. (Specifically, the terminating expansion, if there is one.)

• Can you talk about how I get started on the other case? It seems there is an added complexity given the form of a dyadic interval.
– user637978
Commented Sep 4, 2019 at 13:29
• @MathematicalMushroom For the $(a, \infty)$ case, let $n$ be any integer larger than $a$. Then $(a, \infty)$ is the disjoint union of $(a,n)$ and $[n, \infty)$. The latter can easily be expressed as the disjoint union of dyadic intervals of length $1$ with integer endpoints, so you only need to worry about $(a,n)$. But this is a bounded open interval, and in the OP you said you were already able to solve that case.
– user169852
Commented Sep 4, 2019 at 17:46