Suppose $X = [0,1]$ is a topological space with $\tau = \{\{\},[0,1/2],(1/2,1], X\}$. I want to find (classify) all of the continuous functions from $X$ to the reals.
I have tried to find the preimage of the function on any open subsets of $\mathbb{R}$ such that they are elements of $\tau$ (such that the function takes the range as one of the elements in $\tau$) but it seems to be useless and I have no idea what I should do next. Would anyone please give me some hints on this problem? Thanks!
The continuous functions are exactly the functions which are constant on the sets $[0,\frac{1}{2}]$ and $(\frac{1}{2},1]$. It is easy to check that such functions are indeed continuous. Now we'll show why these are all the continuous functions.
Suppose $f:X\to\mathbb{R}$ is continuous and we'll show that this function is constant on $[0,\frac{1}{2}]$. Let $x,y\in [0,\frac{1}{2}]$, and write $f(x)=c$. The set $\{c\}$ is closed in $\mathbb{R}$, and by continuity $f^{-1}(c)$ has to be closed in $X$. It is easy to check that the closed sets of $X$ are exactly the elements of $\tau$. Since $x\in f^{-1}(c)$ we know that this inverse image can't be $\emptyset$ or $(\frac{1}{2},1]$. Hence it is either $X$ or $[0,\frac{1}{2}]$, and in either case $y\in f^{-1}(c)$, i.e $f(y)=c$. Similarly we can show that $f$ is constant on $(\frac{1}{2},1]$.