# Density of the rationals in the reals

While studying measure theory I have encountered the following set, $$U_\varepsilon=\bigcup_{n\in \mathbb{N}}(q_n-\varepsilon /2^n,q_n+\varepsilon/2^n),$$ where $(q_n)_{n\in \mathbb{N}}$ is an enumeration of the rationals in $[0,1]$. We have $$m^*(U_\varepsilon)\le \sum_{n\in \mathbb{N}}2\varepsilon/2^n=2\varepsilon,$$ and thus for $\varepsilon$ small enough, $U_\varepsilon$ does not contain every irrational in $[0,1]$.

If we are allowed to take any function $f$ so that $f(n)\to 0$ and look at $$U_{f,\varepsilon}:=\bigcup_{n\in \mathbb{N}}(q_n-\varepsilon f(n),q_n+\varepsilon f(n)),$$where $(q_n)_{n\in \mathbb{N}}$ is an enumeration of the rationals in $[0,1]$,

1. Does there exist such a function $f$ so that $[0,1]\subset U_{f,\varepsilon}$ for every $\varepsilon >0$?

2. What are the asymptotics of $f$ ensuring $[0,1]\subset U_{f,\varepsilon}$ for every $\varepsilon >0$?

3. What is the dependency in the enumeration?

And more generally,

• Hi Yoav, long time no see. This seems to be somewhat related to the notion of "Strong measure zero sets". The first answer has a trivial answer, take $f(1)=\frac1\varepsilon$. The rest of what $f$ is doing doesn't matter, so (2) becomes trivialized as a question as well; the dependency on the enumeration might allow us to take smaller values. Perhaps to exclude these sort of trivial answers, you might want to change the requirement that there is no $n$ such that $(q_n-\varepsilon f(n),q_n+\varepsilon f(n))$ covers $[0,1]$. Dec 20, 2014 at 12:33
• Hello my friend :) Note that $f$ can't depend on $\varepsilon$.. Dec 20, 2014 at 19:26
3.For any monotonic function $f$ such that $f(1)\le 1/2$ and $f(n)\to 0$ and any irrational $\alpha\in [0,1]$ there exists an enumeration $(q_n)_{n\in \mathbb{N}}$ of the rationals in $[0,1]$ such that $U_{f,1}\not\ni\alpha$. For this purpose, while enumerating the rationals of $[0,1]$ it suffices to choose $q_n\not\in (\alpha-f(n), \alpha+f(n))$. Since $f(n)\to 0$, this restriction allows us to enumerate all rationals of $[0,1]$.
4.Let $\alpha\in [0,1]$ be any irrational number and $(q_n)_{n\in \mathbb{N}}$ be any enumeration of the rationals in $[0,1]$. For each natural $n$ put $f(n)=\min \{|q_m-\alpha|:m\le n\}$. Then $U_{f,1}\not\ni\alpha$, but $f(n)\to 0$, because rationals are dense in $[0,1]$.
1.Let $(q_n)_{n\in \mathbb{N}}$ be any enumeration of the rationals in $[0,1]$. For each natural $n$ let $g(n)$ denotes the number of the last occurrence of a rational with a denominator $n$. Clearly, $g(n)\to\infty$. If the function $f$ is monotonically non-increasing and $f(g(n))>1/n$ then $[0,1]\subset U_{f,\varepsilon}$ for every $\varepsilon >0,$ because if $n\ge 1/\varepsilon$ then $U_{f,\varepsilon}\supset \{q_m:m\le g(n)\}+[-1/n,1/n]\supset [0,1].$