What is the measure of the set of numbers in $[0,1]$ whose decimal expansions do not contain $5$?

See, study the complement of the set. That is, look at integers which contain $5$ in their decimal expansion. Caveat : note that $0.6 = 0.5\overline{9}$ also counts as a decimal which is expressed with a $5$ as one of the digits, so belongs in the set. In particular, any terminating decimal which terminates with $6$ can be considered to belong to the set.

The first such category we can think of is: Those that have $5$ as the first digit following the decimal point. This is the set of numbers $[0.5,0.6]$. This has measure $0.1$, so the left over measure is $0.9$.

Now, from the remaining set, remove the set of all numbers with second digit $5$. This consists of $[0.05,0.06[, [0.15,0.16] \ldots [0.95,0.96]$ without $[0.55,0.56]$, since that was already removed earlier. Now, each of these has measure $0.01$, so we have removed $0.09$ more from the system. Hence, the left over is $0.81$.

By induction, prove the following : at the $n$th step, the set left over has measure $\frac{9^n}{10^n}$. Now, as $n \to \infty$, we see that the given set has measure zero (I leave you to rigorously show this, you can use the Borel-Cantelli lemma). This also incorporates the fact that the given set is measurable, since it's measure is computable(and is $0$).


Denote $E_2^c =$ the set of real numbers $x$ on the interval $[0, 1]$ such that in the decimal form of $x = 0.i_1 i_2 i_3 \dots$ there is no digits $2$.

Write $x \in E_2^c$ in decimal form $$ x = 0. i_1 i_2 i_3 \dots, \ \ i_k = 0, 1, 3, 4, 5, 6, 7, 8, 9, \ \ x = \sum_{k=1}^{\infty} \frac{i_k}{10^k}, $$ and assume that the first digit $2$ appeals at $k$th decimal of $x$.

Denote $E_{2,1}$ as the set of real numbers $x$ on the interval $[0, 1]$ such that the first digit $2$ appeals at $1$th decimal of $x$: $E_{2,1}= \{x | x = 0. 2 \dots\} = [0.2, 0.3)$, then $m(E_{2,1}) = 10^{-1}$.

Denote $E_{2,2}$ as the set of real numbers $x$ on the interval $[0, 1]$ such that the first digit $2$ appeals at $2$th decimal of $x$: $E_{2,2} = \{x | x = 0. i_1 2 \dots\}= \cup_{i_1} [0.i_1 2, 0.i_1 3)$, $i_1 \in \{0, 1, 3, 4, 5, 6, 7, 8, 9\}$, then $m(E_{2,2}) = 9 \times 10^{-2}$;

Inductively, \begin{align*} E_{2,k} &= \{x | x = 0. i_1 \dots i_{k-1} 2 \dots\} \\ &= \cup_{i_1, \dots, i_{k-1}} [0. i_1 \dots i_{k-1} 2, 0. i_1 \dots i_{k-1} 3), \end{align*} where $i_1, \dots, i_{k-1} \in \{0, 1, 3, 4, 5, 6, 7, 8, 9\}$, then $m(E_{2,k}) = 9^{k-1} \times 10^{-k}$;

Define $E_2 =$ the set of real numbers $x$ on the interval $[0, 1]$ such that in the decimal form of $x = 0.i_1 i_2 i_3 \dots$ there is digits $2$.

Then the measure of $E_2$ is $$ m(E_2)= m(\cup_{k=1}^{\infty} E_{2,k})= \sum_{k=1}^{\infty} m(E_{2,k})=\sum_{k=1}^{\infty} 9^{k-1} \times 10^{-k}= 1. $$

Thus, the measure of $E_2^c$ is $$ m(E_2^c) = m([0, 1] \setminus E_2) = m([0, 1]) - m(E_2)= 1 - 1 = 0. $$