Equality between the measure of a compact set and the limit of a series of open sets Suppose $E$ is a given set, and $O_n = \{x : d(x,E)<\frac1n\}$.
Show that if $E$ is compact, then $$m(E) = \lim_{n \rightarrow \infty} m(O_n)$$
Also, show that this conclusion may be false for $E$ closed an unbounded, or $E$ open and bounded.
I'm gonna need some help on this one... this measure theory stuff is so tricky! Thanks everyone.
 A: For the second part. 
(i). In $\Bbb R,$ if  $E=\Bbb N$ then $m(O_n)=\infty$ for every $n$ but $m(E)=0.$ 
(ii). In $\Bbb R,$ let $C$ be a "fat Cantor set" that is, $C$ is  a closed nowhere-dense subset of $[0,1]$ with $0<m(C)<1,$ and $\{0,1\}\subset C.$ Let $E=[0,1]\backslash C.$ Now $\overline E= [0,1]$ so for any $n\in \Bbb N$ and any  $y\in C$ there exists  $x\in U\cap (-1/n+y,1/n+y),$ so $y\in (-1/n+x, 1/n+x)\subset O_n.$ Therefore $O_n\supset E\cup C=[0,1]$ so $m(O_n)\geq 1.$ But $m(E)<1.$  
For the first part.If $E$ is compact and not empty (to avoid the trivial case):
Given $\epsilon >0$ take an open $U_{\epsilon}$  with $E\subset U_{\epsilon}$ and $m(E)<m(U_{\epsilon})+\epsilon.$
For each $x\in E$ take $r_{x,\epsilon}>0$ such that $B(x,2r_{x,\epsilon})\subset U_\epsilon.$ Now $\{B(x,r_{x,\epsilon}): x\in E\}$ is an open cover of $E,$ and $E$ is compact, so there exists   a finite $F\subset E$ such that $\{B(x,r_{x,\epsilon}):x\in F\}$ is a cover of $E.$
Let $\delta=\min \{r_{x,\epsilon}:x\in F\},$ which exists because $F$ is finite and not empty.   
For any $n\in \Bbb N$ such that $1/n<\delta,\;$ if $y\in O_n$ then $d(y,z)<1/n<\delta$ for some $z\in E,$ and $d(z,x)<r_{x,\epsilon}$ for some $x\in F$ so $d(y,x)<\delta+r_{x,\epsilon}\leq 2r_{x,n},$ so $y\in B(x,2r_{x,\epsilon})\subset U_{\epsilon}.$
Therefore $n>1/\delta \implies O_n\subset U_{\epsilon}.$
Therefore $n>1/\delta \implies m(E)\leq m(O_n)\leq m(U_{\epsilon})<m(E)+\epsilon.$
Since such $\delta >0$ exists for any $\epsilon >0,$ therefore $\lim_{n\to \infty}m(O_n)=m(E).$
NOTE: We can shorten this with the Lebesgue Covering Theorem/Lemma: If $E$ is a compact subset of a metric space and $C$ is an open cover of $E$ then there exists $\delta > 0$ such that $B(z,\delta)$ is a subset of a member of $C$ for every $z\in E.$ That is, with $C=\{U_\epsilon\},$ let $\delta>0$ such that $B(z,\delta)\subset U_{\epsilon}$ for all $z\in E.$  Then $n>1/\delta \implies O_n\subset U_{\epsilon}.$
A: For the first part, use that if $E$ is compact, then $E$ is bounded. Therefore, $\mathcal{O}_1$ is bounded, so $m(\mathcal{O}_1) < \infty$. Then use that as $E$ is closed to show that $E = \bigcap_{k=1}^{\infty}\mathcal{O}_k$. Then use that if $m(\mathcal{A}_1) < \infty$ where $\mathcal{A} = \bigcap_{k=1}^{\infty} \mathcal{A}_k$, then $\lim_{k \rightarrow \infty} m(\mathcal{A}_k) = m(\mathcal{A})$
Now for the second part, for closed and unbounded take $E = \mathbb{N}$, so for every $O_n$, $m(\mathcal{O}_n) = \sum_{k=1}^{\infty} \frac{1}{n} = \infty$ But $m(E) = 0$. 
For open and bounded, take the Cantor like set complement on $[0,1]$ (described in detail in Stein Real Analysis ch 1 ex #4). Let the Cantor like set := $\mathcal{C}$. Then $m(\mathcal{C}^c \cap [0,1]) < 1$, but as shown in ex4, for every $x \in \mathcal{C}$, there's a sequence $x_n$ such that $x_n \rightarrow x$ where $x_n \subset \mathcal{C}^c \cap [0,1]$. Then as shown earlier as $\overline{E} = \bigcap_{k=1}^{\infty}\mathcal{O}_k$, and use the theorem used in $A$, we can show the two measures agree as $k \rightarrow \infty$. But as $\overline{E} = [0,1]$, we see $m(\overline{E}) = m(\bigcap_{k=1}^{\infty} \mathcal{O}_k) = 1 > m(E)$. Hence, we have the desired result.
Hint: I have taken a course in Stein's real analysis before; Stein likes to build on problems from earlier. And ~90% of counter examples for the lebesgue measure are this cantor like set, the cantor set, $\mathbb{Q}$, or $\mathbb{N}$
