Doubts in definition of continuity in a topological space EDITED
Let $(X, \mathscr T_X)$ and $(Y, \mathscr T_Y)$ be two topological spaces. Let there be a function $f: X \to Y$. Then $f$ is said to be continuous if for every $E \in \mathscr T_Y$ the corresponding $f^{-1}(E)$ is open in $(X, \mathscr T_X)$, i.e. $f^{-1}(E) \in \mathscr T_X$.
My doubts:
1. Does this mean that continuity of $f$ depends on $\mathscr T_X$, If we change $\mathscr T_X$, $f$ might cease to remain continuous?
2. Can we define continuity in the following way: Let $\{E_i \mid i \in I \}$ be a family of all open sets in $\mathscr T_Y$. If the set $\{f^{-1}(E_i) \mid i \in I \}$ is a topology such that $\{f^{-1}(E_i) \mid i \in I \} = \mathscr T_X$, then $f$ is continuous.
3 What if $\{f^{-1}(E_i) \mid i \in I \} $ is NOT a topology. Then, given $Y, \mathscr T_Y$ and a given $X$, can $f$ ever become continuous?
If YES then how?
4 Will the definition stated by me in "Doubt 2" be an equivalent definition of continuity?
Please help!!
 A: Yes, it means exactly that. In fact, any function from a space X with the discrete topology is continuous. Similarly, every function to a space $Y$ with the indiscrete topology is continous.
As for the definition of continuity, I think this is the most intuitive definition: $f:X\to Y$ is continuous iff for every $x\in X$ and every $V$ neighborhood of $f(x)$ there's a neighborhood $U$ of $x$ such that $f(U)\subseteq V$.
The set $\{f^{-1}(E_i)|i\in I\}$ is always a topology, because $\{\}=f^{-1}(\{\})$, $X=f^{-1}(Y)$, $\bigcup f^{-1}(E_j)=f^{-1}(\bigcup E_j)$ and $\bigcap f^{-1}(E_j)=f^{-1}(\bigcap E_j)$.
You require $\{f^{-1}(E_i)|i\in I\}=\mathscr T_X$ which is strictly stronger than what the standard definition says which is $\{f^{-1}(E_i)|i\in I\}\subseteq\mathscr T_X$, take the discrete topology on X for an example.
If $f$ is surjective, then $\{f^{-1}(E_i)|i\in I\}\supseteq\mathscr T_X\Longrightarrow(\forall A\in\mathscr T_X)\ f(A)\in\mathscr T_Y$, which is the definition of an open map (image of every open set is open).
If $f$ is bijective, then $\{f^{-1}(E_i)|i\in I\}\supseteq\mathscr T_X\Longleftrightarrow(\forall A\in\mathscr T_X)\ f(A)\in\mathscr T_Y$ and your definition means exactly that $f$ is an open continuous map, which is equivalent to $f$ being a homeomorphism (since $f^{-1}$ is continuous iff $f$ is open for bijective $f$).
