TITLE: Which is the domain set?
QUESTION [5 upvotes]: Let $X \subseteq \mathbb{R}$  and  $f,g : X \rightarrow X $  be  continuous  functions  such  that $f(X) \cap g(X) = \emptyset$ and $f(X) \cup g(X) = X$.  Then  which  of  the  following  cannot  be $X$ ?
A. $[0,1]$
B. $(0,1)$
C. $[0,1)$
D. $\mathbb{R}$

Now  I  can  see  B. , C. , D.  can  be  $X$  through  some  examples. Then A.  must  be  the  answer.  Also  $[0,1]$ being  compact and  connected  its  image  under  $f$ and $g$ has  to  be  closed  intervals  and no  to  closed  sub-intervals  can  be  found of  $[0,1]$  satisfying all  the  above  criteria. But  this  is  my  intuition. How  to  begin  if  I  have  to  write  a  solid  proof  for  option A. ?

REPLY [3 votes]: Since $[0,1]$ is compact, also $f([0,1])$ and $g([0,1])$ are compact and thus closed.
Let $[0,1]$ be the disjoint union of $f([0,1])$ and $g([0,1])$. Because $f([0,1])=[0,1] \setminus g([0,1])$ the set $f([0,1])$ must be open. This contradicts $f([0,1])$ being closed because the only sets in $[0,1]$ which are both open and closed are $[0,1]$ and $\emptyset$. Because $f([0,1])$ and $g([0,1])$ have at least one element, $f([0,1])$ cannot be $[0,1]$ or empty.