1. ## Topology

Let (X,d) be a metric space. X is said to be separable if there is a countable set Q contained in X such that Q is dense in X. Show that a separable metric space has a basis for its open sets consisting of a countable family of open sets.

I started by establishing the open ball B(q,1/n) where n = 1,2,...

I know I want to show that every open set is a union of these sets.

I'm not sure where to go from here. Any help would be great!

2. You're going to the good direction. Make a drawing in the case of metric space (IRē,||.||).

I know I want to show that every open set is a union of these sets.
in fact you need show it just for the open balls because the open balls form a basis of your metric space.

3. Let $O$ be an open set. We will prove that every $x$ in $O$ belongs to an open ball $B(q_{x},\frac{1}{n_{x}})$ with $q_{x} \in Q$ and $n_{x} \in \mathbb{N}$.
We know there exists $y \in X$, $r>0$ such that $x \in B(y,r)$, so $d(y,x).
We will note $\epsilon=r-d(x,y)$

Let $n$ be an integer such that $\frac{1}{n}<\frac{\epsilon}{2}$. Since $Q$ is dense in $X$, there is a $q_{x} \in Q\cap B(x,\frac{1}{n})$.

At this point, just visualize the scene, and try to conclude.