For which subspace $X\subseteq \mathbb{R}$ with the usual topology and with$\{0,1\} \subseteq X$ will a continious function $f : X \rightarrow \{0,1\}$ satisfying $f(0) =0$ and $f(1) =1$ exist ?
$a)$$ X=[0,1]$
$b)$$X=[-1,1]$
$c)$$X=\mathbb{R}$
$d)$$[0,1] ⊄X$
i was thinking about the function $f(x) = x$ that is $f(0) =0$ and $f(1) =1$ and i don't know how to tackle this question
Any hints/solution
thanks u
Hint: the image of a connected set by a continuous function is again connected.