Continuous in subspace topology Suppose $X = \lbrace 1,2,3,4,5 \rbrace$ and $\tau = \lbrace X, \emptyset , \lbrace 1 \rbrace , \lbrace 1,2 \rbrace , \lbrace 1,3,4 \rbrace , \lbrace 1,2,3,4 \rbrace , \lbrace 1,2,5 \rbrace \rbrace$. 
For $\tau_{M}$ we take subspace topology on $M = \lbrace 1,3,5 \rbrace$. 
We consider the function $f: X \rightarrow \lbrace 0,1 \rbrace$, where 
$$f(n) = \left\{ \begin{array}{ll}
0 & \textrm{if $n \le 3$}\\
1 & \textrm{others }\\
\end{array} \right.
$$
Let $f \mid_{M} : M \rightarrow \lbrace 0,1 \rbrace$ be the restriction of $f$ to $(M, \tau_{M})$.
Show that these function $f$ and $f \mid_{M}$ are continuous. If not, point the counterexample.
What I did? I think, that $\tau_{M} = \lbrace \lbrace 1,3,5 \rbrace , \emptyset , \lbrace 1 \rbrace  \rbrace$. But,  have no idea, what can I do next. Please, help me :)

You have $\tau_{M} = \lbrace \lbrace 1,3,5 \rbrace , \emptyset , \lbrace 1 \rbrace  \rbrace$. You missed $\{1,3\}$ and $\{1,5\}$.
$(f \mid_{M})^{-1}(0) = \{1,3\}$ an open set & $(f \mid_{M})^{-1}(1) = \{5\}$ not an open set. So $f \mid_{M}$ is not continuous.
