TITLE: Is this a sufficient condition for two spaces to be homeomorphic; proof or counter example please.
QUESTION [10 upvotes]: Let $X$ and $Y$ be topological spaces. let $f: X \to Y$ and $g: Y \to X$. Assume that both $f$ and $g$ are continuous bijections. Can we say that $X$ and $Y$ are homeomorphic? If not are there assumptions we can place on the spaces so we do know this is true? (Like let $X$ and $Y$ be Hausdorff for instance.) I understand it isn't immediately obvious this should be true, but can't think of a counterexample. 
Basically I am wondering if there is a Cantor–Schroeder–Bernstein Theorem for homeomorphisms. 
I have been talking to several peers and have a possible simplification. Let $X = Y$; let $T$ and $S$ be two toplogies on $X$ and let $f:(X,T)\to(X,S)$ be the identity map. Then we can conclude $S$ is contained in $T$, or $T$ is finer than $S$ if you prefer.
Thanks for your thoughts.

REPLY [4 votes]: No; see the counterexamples on this MathOverflow thread.
Gerhard Paseman gives this counterexample:

Let $X = Y = \mathbb{Z} \times \{0,1\}$. We declare that the following subsets of $X$ are open for each $n>0$:
  $$\{(-n,0)\},\quad  \{(-n,1)\},\quad  \{(0,0)\},\quad  \{(0,0),(0,1)\},\quad  \{(n,0),(n,1)\}$$ This is a basis
  for a topology on $X$.
We declare that the following subsets of $Y$ are open for each $n>0$:
  $$\{(-n,0)\},\quad  \{(-n,1)\},\quad  \{(0,0),(0,1)\},\quad  \{(n,0),(n,1)
\}$$ This is a basis for a topology on $Y$. 
Define $f:X\to Y$ and $g:Y\to X$ by $f((n,i))=(n,i)$ and $g((n,i))=(n+1,i)$. Then $f$ and $g$ are continuous bijections, but $X$ and $Y$ are not homeomorphic. 

Scott Carnahan gives this counterexample:

Here's a continuum analogue of Gerhard Paseman's answer:  Let $X$ and $Y$ be topological spaces whose underlying sets are $\mathbb{R}$.  As topological spaces, $X$ is the disjoint union of the open interval $(0,\infty)$ with a discrete space whose points are nonpositive reals, while $Y$ is the disjoint union of $(-1,0)$, $(1,\infty)$, and a discrete space whose points form the complement of those intervals.  Translation by adding one is a continuous bijection from $X$ to $Y$, and also a continuous bijection from $Y$ to $X$, but the two spaces are not homeomorphic.