Set of all real numbers with a '$2$' in their decimal expansion

182 Views Asked by At

It is a common question in an elementary probability or combinatorics class to ask "How many integers between $1$ and $10^k$ have at least one '$2$' in their decimal expansion?" This result can then be generalized further, and analyzed as $k$ approaches infinity

However, I'm curious about something slightly different; rather than the set of all integers with a '$2$' in their decimal expansion, I want to consider the set of all real numbers with a '$2$' in their decimal expansion. More specifically, I have the following questions:

1) Which has greater cardinality: the set of all real numbers with a '$2$' in their decimal expansion (which we will denote by $S$), or the set of all real numbers without a '$2$' in their decimal expansion (ie $\mathbb{R} \setminus S$)?

2) In comparing the above sets, $S$ and $\mathbb{R} \setminus S$, by 'how much' is one set's size greater than the other? I realize this is a poorly phrased question, and am not really looking for a formal answer. Anything that gives some general intuition would be much appreciated.

For question 1, I am leaning towards thinking that the latter set, of all real numbers without a '$2$' in their decimal expansion, would be larger. To show this, I've tried using alternative bases and formulating some sort of mapping between the sets, to no avail. I also thought about simplifying the problem to just include numbers in the set $[0, 1]$, and then generalizing for $\mathbb{R}$. However, I haven't found anything by doing this either. I haven't yet attempted the second question, although I think the way I approach the first will largely dictate the answer here.

I'd appreciate any and all help with this problem. Thanks!

1

There are 1 best solutions below

0
On

The cardinalities are the same, namely the same as the cardinality of $\mathbb R$ itself. We can form injections from $(0,1)$ into either $(0,1)\cap S$ or $(0,1)\setminus S$ by the rules

  • $x\mapsto 0.2 + \frac1{10}x$, or
  • Replace all digits 2 in the decimal expansion by 37 and all (original) digits 3 by 35.

By Lebesgue measure, however, the difference is dramatic: $(0,1)\cap S$ has measure $1$ whereas $\mathbb R\setminus S$ has measure $0$. In other words, almost all real numbers (and this is a technical term) have a 2 somewhere in their decimal expansion.

We can see this by writing

$$ \mathbb (0,1)\setminus S = \bigcap_{n\ge 1} \{ x\in(0,1)\mid \text{the $n$th decimal of $x$ is not $2$}\} $$ This is the limit for $k\to\infty$ of $$ \bigcap_{n=1}^k \{ x\in(0,1)\mid \text{the $n$th decimal of $x$ is not $2$}\} $$ whose measure is $0.9^k$ -- each time we exclude 2 from another position, we lose $\frac1{10}$ of the numbers we have left. And $0.9^k\to 0$ for $k\to\infty$. So the measure of $(0,1)\setminus S$ is $0$, and similarly for every other unit interval.


In fact, it is known that almost all real numbers are normal in base 10 (or any other base), and therefore have infinitely many 2s in their decimal expansion.