$S \subset X$ maximal discrete subset of $X$ and $f: X \rightarrow \mathbb{R}$ be continuous surjective map. Show $f(S) \cap (0,1) \neq \emptyset$. Let $X$ be a topological space and define $Y \subset X$ to be discrete if the subspace topology on $Y$ is the discrete topology.  Let $S \subset X$ be the maximal discrete subset of $X$ and let $f: X \rightarrow \mathbb{R}$ be a continuous surjective map.  Prove $f(S) \cap (0,1) \neq \emptyset$.
My attempt: I want to show $S \cap f^{-1}(0,1) \neq \emptyset$.  Since $f$ continuous $f^{-1}(0,1)$ open in $X$ and not empty since $f$ is surjective.  Then it follows that $S \cap f^{-1}(0,1)$ open in $S$ by the subspace topology. Not sure how to finish off - my only idea would be to somehow use the fact that $S$ is maximal, so if $S \cap f^{-1}(0,1) = \emptyset$ to create a larger discrete set than $S$ to get a contradiction.
Thanks
 A: To create a larger discrete subset, just take $x\in X\setminus S$ such that $f(x)\in(0,1)$.  Then $S\cup\{x\}$ is discrete, since $x\in f^{-1}(0,1)$, and $f^{-1}(0,1)$ is open and disjoint from $S$.  That is, $\{x\}$ is clopen in $S\cup\{x\}$.
A: Let $U$ be non-empty open in $\Bbb R$. If $f[S]$ misses $U$, then $f^{-1}[U]$ misses $S$. Pick $p$ in it and also pick open $V$ in $\Bbb R$ such that $f(p) \in V$ and $\overline{V} \subseteq U$. (Using $\Bbb R$ is regular for a technical reason..)
Then $T:=S \cup \{p\}$ is discrete: $s \in S$ is open in $S$, so $U_s \subseteq X$ open exists with $U_s \cap S = \{s\}$. Now $U'_s:=U_s\setminus f^{-1}[\overline{V}]$ is open (open minus closed) and $U'_s \cap T = \{s\}$. So $\{s\}$ is still open in $T$. And $\{p\}$ is open as it equals $f^{-1}[U] \cap T$ by construction.
$T$ contradicts the maximality of $S$, so $f[S]$ must intersect every non-empty open subset of $\Bbb R$; i.e. its dense in it; we could show similarly that $S$ is dense in $X$ if $X$ were assumed to be $T_1$; the $V$ above is to circumvent this potential nuisance.
