= Solution
For each integer $n\ge1$, the <open balls> $\{B(x,1/n):x\in M\}$ cover the <compact metric space> $M$. <Compactness> supplies a finite subcover with centres forming a <finite set> $S_n$. Define $S=\bigcup_{n\ge1}S_n$, a <countable union> of <finite sets> and therefore countable.
For any $x\in M$ and $\varepsilon>0$, choose $n$ with $1/n<\varepsilon$. One of the covering balls contains $x$, so there is $s\in S_n\subseteq S$ with $d(x,s)<1/n<\varepsilon$. Every open <neighbourhood> of $x$ therefore meets $S$, giving $x\in\operatorname{cl}(S)$. Thus \b[$\operatorname{cl}(S)=M$, and $S$ is a countable <dense subset>]. If $M$ is empty, simply take $S=\varnothing$.
Back to article page