Real analysis homework problem need help The open cube in $\mathbb{R}^{n}$ with center $a$ and radius $r$ is the set $C_{r}(a):=\big\{x\in \mathbb{R}^{n} : |x_{i}-a_{i}|<r_{i},\text{ for }i=1,2,...,n \big\}$. Prove that every open subset of $\mathbb{R}^{n}$ is a countable union of open cubes.
I need help to prove the problem, it would be really helpful if someone can show me how.
 A: Hint: The rationals, $\mathbb{Q}^n$, are countable and dense in $\mathbb{R}^n$ so any open subset must contain at least one rational. 

From here you can use the definition of open set, that each of the rationals are interior points, to create a countable collection of balls that equal the subset (this can be shown to be true by using the density of the rationals to show that there exists a rational within any neighborhood of any point in the subset). And then there is only one final step to complete the proof. 

A: For $p\in{\mathbb R}^n$ and $r>0$ let
$$C(p,r):=\bigl\{x\in{\mathbb R}^n\>\bigm|\>|x_i-p_i|<r \ (1\leq i\leq n\bigr\}$$
be the open cube with center $p$ and side length $2r$. The set $${\cal Q}:=\bigl\{C(z,q)\>\bigm| z\in{\mathbb Q}^n, \ q\in{\mathbb Q}_{>0}\bigr\}$$ of such cubes with rational centers and side lengths is countable. 
Let an open set $\Omega\subset{\mathbb R}^n$ be given, and consider an arbitrary point $p\in\Omega$. Then there is an $r>0$ such that
$$C(p,r)\subset C(p,2r)\subset\Omega\ ,$$
and between these two cubes there is enough space to fit in a cube $C(z,q)\in{\cal Q}$. Choose one such cube and denote it by $C_p$. Doing this for all $p\in\Omega$ we then have
$$p\in C_p\subset\Omega\qquad(p\in\Omega)\ .$$
The set $\{C_p\>|\>p\in\Omega\}\subset{\cal Q}$ is then a countable collection of open cubes that covers $\Omega$.
