# Measure of reals in $[0,1]$ which don't have $4$ in decimal expansion

It's an exercise in E. M. Stein's "Real Analysis."

Let $A$ be the subset of $[0,1]$ which consists of all numbers which do not have the digit $4$ appearing in their decimal expansion. What is the measure of $A$?

I would be grateful if someone can give me some hints.

Thank you.

• Your question is not complete.
– user9413
Commented Oct 27, 2011 at 13:11
• @Chandrasekhar You have to find the measure of A. Commented Oct 27, 2011 at 13:16
• I remember doing a problem of this type. I think you want to know what $m(A) = ?$. Do the following trick. Divide $[0,1]$ into ten equal parts and remove the open interval $(0.4,0.5)$. Next divide each of the ten intervals, $[0,0.1], [0.1,0.2] \cdots$ into ten parts and remove each of the interval $(0.04,0.05), (0.14,0.15)$ and so on. So you get $9$ intervals of this type. If $(a_{i},b_{i})$ denote the $i^{th}$ division, then: $$m([0,1]\setminus A) = [0,1] \setminus \bigcup\limits_{i=1}^{\infty} (a_{i},b_{i})$$
– user9413
Commented Oct 27, 2011 at 13:20
• @RamanaVenkata : Yes, that's what even i thought :)
– user9413
Commented Oct 27, 2011 at 13:22
• For any infinite subset $I$ of the integers, the set of real numbers in $[0,1]$ with no $4$ at any position in $I$ has measure zero.
– Did
Commented Oct 27, 2011 at 18:22

You can construct the set $A$ as a limit of nested sequence, so you prove measurability of $A$ and find its measure at the same time. With $n$-th digit of a number we refer to the $n$-th digit after the delimiter in the decimal expansion of the number, e.g. $2$ is the $4$-th digit of $0.434256$

The answer is $\mu(A) =0$. The informal proof is simple: each time you restrict the $n$-th digit, you truncate the measure by multiplying it with $9/10$. So, $\mu(A) = \lim\limits_{n\to\infty}\frac{9^n}{10^n} = 0$.

About the formal proof: we elaborate the idea by Chandrasekhar. Let us denote let $A_n = \{x\in [0,1]:\text{ first n digits of }x\neq 4\}$. Clearly, $$A_{n+1}\subseteq A_n, \quad A = \lim\limits_{n\to\infty}A_n = \bigcap\limits_{n=1}^\infty A_n,\quad \mu(A) = \lim\limits_{n\to\infty}\mu(A_n).$$ E.g. $A_1 = [0,0.4)\cup [0.5,1]$ with $\mu(A_1) = 0.9$. To calculate $A_2$ we first notice that it is a subset of $A_1$ such that $2$-th digit of any number in $A_2$ is any digit but $4$.

That gives an idea that each time it's just sufficient to consider first-step truncation. Let us denote $$K(B) = \{x\in B:\text{ first digit of }x\neq 4\}$$ and $10^kB = \{10^kx:x\in B\}$. Clearly, we have $A_1 = K([0,1])$ and $A_{n+1} = 10^{-n}K(10^nA_n)$.

Note that each time $10^n A_n$ is a union of intervals with integer bounds, so $$\mu(K(10^nA_n)) = 10^{n}\frac9{10}\mu(A_n) = 9\cdot 10^{n-1}\mu(A_n)$$ so $$\mu(A_{n+1}) = \frac{9}{10}\mu(A_n)$$ and we come to the finish line: $$\mu(A) = \lim\limits_{n\to\infty}\mu(A_n) = 0.$$

Notice that equality $\mu(10^k B) = 10^k \mu(B)$ we just need for the finite unions of intervals, so you can easily prove it.

• You are right. Thank you very much. Commented Oct 27, 2011 at 13:51

A quick way to see the solution is to consider a random (uniformly distributed) number in $[0,1]$. By the infinite monkey principle, the decimal expansion of such a random number must contain a $4$ almost surely. But the probability measure of the uniform distribution is just the Lebesgue measure on $[0,1]$, so we're excluding a set of measure $1$. Therefore $A$, consisting of the numbers that are left, must have measure $0$.

Making this rigorous probably entails doing something like Chandrasekhar's comment.

• My favorite way (when big guns are allowed) is the Lebesgue density theorem. It's virtually immediate that no point of the set can be a point of density of the set, so the set must have measure zero. Commented Oct 27, 2011 at 13:46
• @DaveL.Renfro: Thanks for the reference, nice theorem. Anyway, you either use big guns here, or should develop them by yourself.
– SBF
Commented Oct 27, 2011 at 13:58
• @Gortaur: By the way, Lebesgue measurability of the set is not needed for this application--almost all points of an arbitrary subset of ${\mathbb R}^n$ are points of outer Lebesgue density. In the case that the set is measurable, then "outer Lebesgue density" becomes "Lebesgue density" (this part is trivial) and we can additionally conclude that almost all points not in the set have Lebesgue density $0$ with respect to the set. Commented Oct 27, 2011 at 14:06
• Just in case, the "infinite monkey principle" is usually called Borel-Cantelli lemma. Commented Oct 27, 2011 at 14:18
• @BrunoStonek: Well, it's a special case of Borel-Cantelli: when all the independent events $A_n$ have the same positive probability (which makes it pretty clear that $\sum P(A_n) = \infty$.) This special case is also easier (almost trivial) to prove. Commented Oct 27, 2011 at 14:37

Let $B = A \setminus \{1\}$.

The first digit of any element $x$ of $B$ is not 4. The fractional part of $10x$ is also in $B$. We thus have a disjoint union

$$B = \bigcup_{i \in \{0,1,2,3,5,6,7,8,9\}} \left( \frac{i}{10} + \frac{1}{10} B \right)$$

so $\mu(B) = 9 \cdot \frac{1}{10} \mu(B)$. Solving gives $\mu(B) = 0$ or $\mu(B) = +\infty$, and the latter is clearly impossible.

Here's another solution which is related to Henning's. This solution uses methods from algorithmic randomness.

Any Martin-Löf random (indeed, any Kurtz random) must have at least one (indeed, infinitely many) 4's in its decimal expansion. To see this, let $r$ be a real number with no 4's in its decimal expansion. The computable betting strategy (i.e. martingale) that spreads all current capital evenly over all digits except 4 will then succeed (with a computable rate of success) on $r$. In other words, having seen some initial segment of the decimal expansion of $r$, this strategy bets that then next bit isn't a 4. Since the house (i.e. the Lebesgue measure) gives uniform odds for each digit, we're guaranteed a payback factor of $10/9$. Since $(10/9)^{n} \to \infty$ (computably), we'll win arbitrarily much.

Thus your set $A$ is contained in the complement of the collection of Martin-Löf (or Kurtz) randoms. Since the collection of Martin-Löf (or Kurtz) randoms has measure 1, your set $A$ must have measure 0.

We can change assumption of $$A$$ being subset of $$[0,1]$$, to be a subset of $$[0,1)$$. That won't change measure of but will make our calculation cleaner.

Let $$A_{n}$$ be partition of $$[0,1)$$ into $$10^{n}$$ left-closed intervals of equal length. Further, let $$A_{n}^{\prime}$$ be $$A_{n}$$ minus intervals which contain numbers, which fractional part of the decimal expansion up to n-th digit poses digit $$4$$.

For example $$A_{0}=A_{0}^{\prime}=\{[0,1]\}$$ $$A_{1}=\{[0,0.1), [0.1,0.2),[0.3,0.4),[0.4,0.5)...,[0.9,1)\}$$ $$A_{1}^{\prime}=\{[0,0.1), [0.1,0.2),[0.3,0.4),[0.6,0.7),[0.7,0.8),[0.9,1]\}$$ $$A_{2}=\{[0,0.01), [0.01,0.02),...,[0.99,1)\}$$ $$A_{2}^{\prime}=A_{2}- \{[0.07,0.08),[0.17,0.18),...[0.70,0.71),...,[0.79,0.80),...,[0.99,0.1)\}$$

Notice

1. Length of each interval $$X$$ in $$A_{n}$$ (or $$A_{n}^{\prime}$$) is $$\frac{1}{10^n}$$.
2. $$A\subset \bigcup A_{n}^{\prime}$$ for all n. As a consequence $$\mu(A)\leq\mu(\bigcup A_{n}^{\prime})=\Sigma_{X\in A_{n}^{\prime}}\mu(X)=\Sigma_{X\in A_{n}^{\prime}}\frac{1}{10^n}=\frac{\#A_{n}^{\prime}}{10^n}$$
3. For $$n>0$$, each interval from $$A_{n}$$ can be uniquely paired with the sequence $$a_{1}a_{2}...a_{n}$$, (where $$a_{k}\in\{0..9\}$$) in the following way: let $$X\in A_{n}$$. Then X is of the form $$[0.a_{1}a_{2}...a_{n}, 0.a_{1}a_{2}...a_{n}+ \frac{1}{10^n})$$. On the other hand if we have sequence $$a_{1}a_{2}...a_{n}$$, then in $$A_{n}$$ there exists interval for which left bound is a number $$0.a_{1}a_{2}...a_{n}$$.
4. If we take interval $$X\in A_{n}$$ that is related to the $$a_{1}a_{2}...a_{n}$$ sequence, and for some $$k$$, $$a_{k}=4$$ then since $$0.a_{1}a_{2}...a_{n}\in X$$ we deduce $$X\not\in A_{n}^{\prime}$$.
5. On the other hand, if number $$0.b_{1}b_{2}...b_{n}...$$ belongs to interval $$[0.a_{1}a_{2}...a_{n}, 0.a_{1}a_{2}...a_{n}+ \frac{1}{10^n})$$, and for some $$k\leq n$$, $$b_{k}=4$$, then also $$a_{k}=4$$. So if $$X\not\in A_{n}^{\prime}$$ then sequence $$a_{1}a_{2}...a_{n}$$ related to X has some $$a_{k}=4$$.
6. So to calculate $$\#A_{n}^{\prime}$$, we have to calculate how many sequences $$a_{1}a_{2}...a_{n}$$ are there which do not poses number 4.

For example $$\#A_{0}^{\prime}=1$$, $$\#A_{1}^{\prime}=9$$, $$\#A_{2}^{\prime}=81$$, and it's easy to notice that in general $$\#A_{n}^{\prime}=9^{n}$$.

From that $$0\leq\mu(A)\leq\frac{\#A_{n}^{\prime}}{10^n}=\frac{9^{n}}{10^n}\to^{n}0$$ so $$\mu(A)=0$$. Of course it works for numbers other than 4.