Constructing a countable dense subset of a totally bounded set

Given a metric space $(X,d)$, and (non-empty) totally bounded set $E$ in $X$, is it possible to construct $D \subseteq E$ which is countable and dense?

I feel that this should definitely be possible. Since $E$ is totally bounded, I suspect we need to pick the $\epsilon$-balls that cover $E$ in such a way that the centres of them are dense (and assumed to be in $E$).

I've thought about picking $\epsilon>0$ so that every $\epsilon$-ball contains the centre of another $\epsilon$-ball, but this does not guarantee the density we require. I'm not sure which other $\epsilon$ to try.

To do this, you want to make use of the totally bounded nature of the set a few times; a cover by $\varepsilon$-balls with centers $C_{\varepsilon}$ ensures there is, for any $x\in X$, an $c\in C_{\varepsilon}$ which is a distance of no more than $\varepsilon$ away. This isn't strong enough, and there is no way you could choose $\varepsilon$ small enough, nor ensure the existence of many stronger conditions. For instance, suppose we only knew that $[0,1]$ could be covered by balls of radius $\frac{1}4$, and we weren't sure if we could cover it by smaller balls, we could, at best, ensure the existence of a set like $\{\frac{1}5,\frac{2}5,\frac{3}5,\frac{4}5\}$ - which is not dense.
The trick here is to, instead, layer a bunch of sets. The "totally bounded" thing means that $C_{\varepsilon}$ is finite. In particular, suppose we defined a sequence of sets $C_{\varepsilon}, C_{\varepsilon/2},C_{\varepsilon/3},\ldots,C_{\varepsilon/n},\ldots$, where each are the centers of some finite cover of balls of radius $\varepsilon/n$. If we let $$C = \bigcup_{n=1}^{\infty} C_{\varepsilon/n},$$ taking the union of every set, it should be relatively easy to prove that, for any $x\in X$ there is some $c\in C$ within a radius of any $\varepsilon/n$ - and choosing $n$ large enough can show that any ball around $x$ contains an element of $C$. Clearly, $C$, being a union of countably many finite sets, is countable. This is why it's important that "totally bounded" says any radius will suffice - the fact that a finite cover of any specific radius is not strong enough to prove much, but in the proof above, we make full use of the property, assuming covers of arbitrarily small radiuses exist.
• Just take $\epsilon = 1$, and all the $C_{1/ n}$ will do the job just fine. – Henno Brandsma Sep 26 '14 at 12:00