TITLE: Lebesgue measure question on carefully-defined subset of $[0,1]$ and showing that it is measurable
QUESTION [12 upvotes]: In my self-study, I came across the following interesting little exercise: 
Let $A \subseteq [0,1]$ be the set of numbers $x$ between zero and one such that the digit 3 appears before the digit 2 in the decimal expansion of $x$. Prove that $A$ is measurable and find its Lebesgue measure directly. 
I am aware of a "sleight-of-hand" probability theory way for computing the Lebesgue measure of this set, and from there one might conclude that $A$ is measurable without being rigorous, but I am looking for a proof that proceeds by doing each of the following with sufficient rigor: verifying the measurable claim FIRST, and then evaluating the Lebesgue measure.

REPLY [3 votes]: First, you should specify which decimal expansion to take when there are two possibilities. For example. $.29999\ldots = .3$ will fail or meet your criterion depending on which expansion is taken. Second, you should notice that this actually doesn't matter since the collection of numbers with non-unique decimal expansion has measure zero (being countable) and Lebesgue measure is complete. Thus we might as well let $A$ be the set of numbers with unique decimal expansion in which a 3 appears before a 2.
Now we'll show that the set $A$ is in fact open (hence measurable): split $[0,1]$ into $10$ subintervals of equal length, so a number $x$ is in the $i$th interval ($0\leq i \leq 9$) iff the decimal expansion of $x$ has an $i$ in the tenths place (i.e. $x=.ix_{2}x_{3}\ldots$). Notice that the endpoints of these intervals all have non-unique decimal expansion, so we only care about them as open intervals. The $3$rd interval is a subset of $A$ whereas the $2$nd is disjoint from $A$. Split each of these remaining intervals (that is, all but the $3$rd and $2$nd) into 10 subintervals of equal length. The $3$rd of each of these is in $A$ whereas the $2$nd is disjoint from $A$. Continuing, we see that $A$ is a countable union of these "$3$rd" open intervals and hence is open.
The measure can also be computed from this construction. Since at each stage we add and remove things of equal measure (the "$3$rd" and "$2$nd" intervals, respectively), $\mu A = 1/2$ (where $\mu$ denotes Lebesgue measure).