# Explicit description of small open set containing the rationals

We know that the set $\mathbb{Q}$ of rational numbers has measure zero because it is countable. In fact, if $(q_n)_{n=1,2,\ldots}$ is an enumeration of $\mathbb{Q}$, then $\bigcup_{n=1}^\infty(q_n-2^{-n}\varepsilon,q_n+2^{-n}\varepsilon)$ covers $\mathbb{Q}$, and this open set is a union of open intervals whose lengths add up to $2\varepsilon$.

That is nice and explicit – but those intervals will overlap (a lot, probably), and we know of course that an open set is a disjoint union of open intervals. It is not too hard to show that the combined lenghts of those intervals (the components of the open set) is less than $2\varepsilon$. However, this is far less explicit.

Question: Can you give an explicit list of pairwise disjoint open intervals of finite combined length whose union contains all rational numbers?

It is not hard to give a procedure for creating such a list, but that is not explicit enough. I would like a nice formula for the end points of the $n$th interval. (Those end points would have to be irrational, of course.)

• The easier task of finding an open set $U\subset[0,1]$ covering all rationals in this interval so that $|U|<1$ and $U$ is the union of explicit intervals seems difficult already. Aug 17, 2014 at 14:03
• @JoonasIlmavirta I am not surprised. But do you know of any reference to this difficulty? Aug 17, 2014 at 14:05
• Another note: The sequences of endpoints of the intervals can't be monotone since the endpoints need to cluster at every endpoint. Thus there will be no natural ordering. I don't know a reference though where this would have been studied. Aug 17, 2014 at 14:09
• Using a breadth-first search on the Stern–Brocot tree to generate an explicit enumeration of the rationals might help, if you manage to find irrationals lengths so that when putting interval of that length around one of the rationals, you can determine which subtrees are included. Aug 17, 2014 at 14:25

Here is a not so satisfactory answer, since there is a single parameter $$\alpha$$ that I can't make explicit (I just know it can be any element of a dense set, but don't know what it could be...).

The heart of the idea is to use the complement of a fat Cantor set, which has a nice expression as a union of disjoint intervals. More precisely, I adapt a construction of Boes, Darst and Erdös.

Let us create a fat Cantor set in $$[\sqrt{2}, \sqrt{2}+1]$$ (here $$x_0 = \sqrt{2}$$ is simply chosen because it is irrational, you could choose any other irrational number) with the following procedure, for a parameter $$\alpha \in ]0,1[$$:

• remove a central (open) interval in $$[x_0, x_0+1]$$ with length $$\frac{a}{3}$$, which creates two segments, from which you remove two central intervals with length $$\frac{a}{3^2}$$, creating four intervals, ...

• at step $$n$$, from the $$2^n$$ intervals with equal lengths, remove central intervals with lengths $$\frac{a}{3^{n+1}}$$.

The set which remains is a Cantor set that we will denote $$C_{\alpha}$$. Before choosing a proper $$a$$, let us specify the form of the open complement, which will (hopefully) contain all rationals in $$[x_0, x_0+1]$$. At step $$n$$, all $$2^n$$ segments not removed have length $$l_n$$, which satisfy $$l_0=1$$ and $$l_n = \frac{l_{n-1} - \alpha 3^{-n}}{2}$$, so $$l_n = 2^{-n}(1 - \frac{\alpha}{3}\sum \limits_{i=0}^{n-1} (\frac{2}{3})^i\big)$$ i.e. $$l_n = 2^{-n} (1-\alpha) + \alpha 3^{-n}$$. Since at step $$N$$, the removed intervals are $$\bigcup \limits_{\varepsilon_0, ..., \varepsilon_{N-1}=0,1} \big]x_0 + \sum \limits_{n=0}^{N-1} \varepsilon_n \big(l_n + \frac{\alpha}{3^n}\big) + l_N, \ x_0 + \sum \limits_{n=0}^{N-1} \varepsilon_n \big(l_n + \frac{\alpha}{3^n}\big) + l_N + \frac{\alpha}{3^n}\big[$$ we deduce that the complement of $$C_{\alpha}$$ is $$[x_0, x_0+1] \backslash C_{\alpha} = \bigcup \limits_{\substack{N \in \mathbb{N} \\ (\varepsilon_n^N) \in \{0,1\}^N \\ \varepsilon_N^N=1}} \Big]x_0 + \sum \limits_{n=0}^N \varepsilon_n \big(\frac{1-\alpha}{2^n} + \frac{2\alpha}{3^n}\big) - \frac{\alpha}{3^N}, \ x_0 + \sum \limits_{n=0}^N \varepsilon_n \big(\frac{1-\alpha}{2^n} + \frac{2\alpha}{3^n}\big)\Big[$$

The procedure mentioned first makes it "obvious" that these intervals are disjoint, so I won't delve into a proof.

The second remark before choosing the proper $$\alpha$$ is that $$\mu(C_{\alpha}) = \lim \limits_{n \to \infty} 2^n l_n = 1-\alpha$$.

Now to prove that $$\alpha$$ can be chosen so that $$C_{\alpha}$$ contains no rational, Boes, Darst and Erdös write $$C_{\alpha}$$ as an image of $$\{0,1\}^{\mathbb{N}}$$ under the function $$\phi_{\alpha}: S \mapsto \sum \limits_{n \in S} \frac{1-\alpha}{2^n} + \frac{2\alpha}{3^n}$$. They note that:

• $$||\phi_{\alpha}-\phi_{\beta}||_{\infty} = \frac{|\alpha-\beta|}{6}$$, so for any $$x$$, $$[x] := \{\alpha \in ]0,1[: x \in C_{\alpha}\}$$ is closed

• if $$\alpha \neq \beta$$ and $$S \notin \{\emptyset, \mathbb{N}\}$$, $$\phi_{\alpha}(S) \neq \phi_{\beta}(S)$$

• the two previous properties imply that for $$x \in ]x_0, x_0+1[$$, $$[x]$$ is always nowhere dense: if $$\phi_{\alpha}(E)=x=\phi_{\beta}(F)$$ (with $$\alpha \neq \beta$$ and thus $$E \neq F$$), there exists $$\gamma \in ]\alpha, \beta[$$ such that $$x \notin \phi_{\gamma}(\mathcal{P}(\mathbb{N})) = C_{\gamma}$$

That last point is obviously crucial: if we don't want a rational $$q \in ]\sqrt{2}, \sqrt{2}+1[$$ in $$C_{\alpha}$$, we know we can choose $$\alpha$$ in $$[q]^C = ]0,1[\backslash [q]$$ which is an open dense set.

Thus the set of $$\alpha$$ such that $$C_{\alpha}$$ contains no rational is $$\bigcap \limits_{q \in \mathbb{Q} \cap [\sqrt{2}, \sqrt{2}+1]} [q]^C$$ which is the intersection of open dense sets. By Baire's theorem, that set is non-empty, and even dense.

By choosing $$\alpha$$ in that set arbitrarily close to zero, the open sets $$C_{\alpha}^C$$ made explicit earlier, with measure $$\alpha$$ arbitrarily small, contain all rational in $$[\sqrt{2}, \sqrt{2}+1]$$.



Even further, if you want to cover the whole real line and not only $$[\sqrt{2}, \sqrt{2}+1]$$, you know that for any $$q \in \mathbb{Q} \cap [\sqrt{2}, \sqrt{2}+1]$$, for $$k \in \mathbb{N}$$, the set $$\{\alpha \in ]0,1[: q \notin C_{\alpha\cdot 2^{-k}}\}$$ is an open dense set, so their intersection on $$q, k$$ is dense.

Thus there exists $$\alpha \in ]0,1[$$ such that for all $$k \in \mathbb{N}$$, $$C_{\alpha / 2^k}$$ contains no rational. By translation, $$m + C_{\alpha / 2^k}$$ contains no rational either for $$m \in \mathbb{Z}$$.

Thus, choosing $$\alpha / 2^{-|m|}$$ in the segment $$[\sqrt{2}+m, \sqrt{2}+m+1]$$, the following set is an answer :

\begin{align*} \bigcup \limits_{m \in \mathbb{Z}} \bigcup \limits_{\substack{N \in \mathbb{N} \\ (\varepsilon_n^N) \in \{0,1\}^N \\ \varepsilon_N^N=1}} \Big] & \sqrt{2}+m + \sum \limits_{n=0}^N \varepsilon_n \big(\frac{1-\alpha 2^{-|m|}}{2^n} + \frac{2\alpha 2^{-|m|}}{3^n}\big) - \frac{\alpha 2^{-|m|}}{3^N}, \\ & \sqrt{2}+m + \sum \limits_{n=0}^N \varepsilon_n \big(\frac{1-\alpha 2^{-|m|}}{2^n} + \frac{2\alpha 2^{-|m|}}{3^n}\big)\Big[\end{align*}

It has measure $$\sum \limits_{m \in \mathbb{Z}} \alpha 2^{-|m|} = 3 \alpha < 3$$, contains all rational numbers in $$\mathbb{R}$$, and is made of disjoint intervals.

Final remark: although the set of possible $$\alpha$$ is dense in $$]0,1[$$, I could not find a way to exhibit an explicit one. Maybe a Liouville number-like $$\alpha$$ can do the trick, although I confess I have no hope of making a progress in that direction.

• Very nice! So basically, to have a complete answer, we search for explicit arbitrarily small numbers $\alpha$ such that $$\sqrt{2} + \sum_{n \in S} \frac{1 - \alpha}{2^n} + \frac{\alpha}{3^n}$$ is never a rational number, and if we find one, we're done. Could it be true for some rational numbers? To prove it, it would interesting to study possible values of $$\sum_{n \in S} \frac{a}{2^n} + \frac{b}{3^n}$$ with $a$ ans $b$ integers. Aug 8, 2021 at 17:41
• Exactly! You even have an additional 'degree of freedom' since $\sqrt{2}$ could actually be any irrational number. Say, if you found that for some $a, b$, and $\alpha = \frac{b/2}{a+b/2}$, $\exp(1) + \sum \limits_{n \in S} \frac{1-\alpha}{2^n} + \frac{2\alpha}{3^n}$ is never a rational number, you would have an explicit solution Aug 9, 2021 at 11:13