Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The title says it all: I'm looking for an open set $X$ with $\Bbb Q\subset X$ and $\Bbb R-X$ uncountable. This was a problem in a previous assignment, but I just couldn't get any set satisfying those conditions.

share|cite|improve this question
possible duplicate… – clark Sep 20 '12 at 6:46
up vote 1 down vote accepted

Many of the answers to this question give you such a set by a pretty explicit construction ensuring that you cover the rationals and miss lots of irrationals.

A completely different approach uses the fact that $\Bbb P$, the space of irrational numbers as a subspace of $\Bbb R$, is homeomorphic to $\Bbb N^\omega$, the product of countably infinitely many copies of the natural numbers. Let $h:\Bbb N^\omega\to\Bbb P$ be a homeomorphism. Let $C=\{0,1\}^\omega$; $C$ is a compact subspace of $\Bbb N^\omega$, since it’s a product of compact spaces. (In fact it’s homeomorphic to the middle-thirds Cantor set.) Since $h$ is continuous and $C$ is compact, $h[C]$ is compact in $\Bbb R$ and therefore closed. Let $U=\Bbb R\setminus h[C]$; $U$ is open in $\Bbb R$, and its complement $h[C]$ is a subset of $\Bbb P$, so $U$ is an open set containing $\Bbb Q$. Finally, $C$ is uncountable, and $h$ is a bijection, so $h[C]$ is uncountable. (In fact $|h[C]|=|\Bbb R|=2^\omega$.)

share|cite|improve this answer
What do you mean by "very explicitly"? Rapidly reading the answers of that question I get the impression they fall in two categories: those that force a particular irrational number (but only one) to be in the complement, and those that use measure theory to show that most irrationals are in the complement, but without being able to point to even one specific example. I could imagine something more explicit. – Marc van Leeuwen Sep 20 '12 at 7:50
@Marc: I probably shouldn’t have said very, but I consider the recursive constructions pretty explicit. (Given our respective mathematical backgrounds and interests, it’s not really surprising that I’ve a somewhat more relaxed notion of what qualifies as explicit.) – Brian M. Scott Sep 20 '12 at 8:08

Inspired by the answer by Brian M. Scott, and challenged by his "very explicitly", let me give explicitness a try.

I'll focus on positive numbers only, to simplify (one can always symmetrize around $0$). The Stern-Brocot tree is a way to arrange the positive rationals into a binary search tree for their natural ordering (and this is all you need to know about it). The irrational numbers are in bijection with the infinite paths descending this tree, choosing left or right at each step, but using each option infinitely often (since choosing left (say) forever beyond a certain point would converge to a rational number).

If we limit the "irrational" paths even more by putting a limit on the number of successive times we can choose the same option, then we can never get back very close to a rational number we already visited on our path (since that would require either continuing left and then immediately right very often, or right and then left very often). So this gives the following idea.

Take as set of irrationals those whose path in the Stern-Brocot tree never goes in the same direction more than twice in succession; since we can still choose between doing so once or twice at each occasion, this clearly defines an uncountable set $S$ of irrational numbers. Now choose as open interval around each positive rational number $\alpha$ the one whose lower bound is found by descending left and then twice right from $\alpha$, and whose upper bound is similarly obtained by descending right and then twice left. For instance the interval around $\frac12$ is $(\frac25,\frac35)$. Now one easily shows that every element of $S$ lies in the complement of all these intervals: given $s\in S$, it cannot lie in the interval of any $\alpha$ that lies on the path of $s$ because it can never get back close enough, and for any rational $\alpha$ that is not on the path of $s$ there is a rational point $\beta$ where the path of $s$ and the path to $\alpha$ first diverge, and $\beta$ separates $s$ from the interval around $\alpha$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.