If S is a subset of $\hspace{0.1cm}$$[0,1]\times[0,1]$$\hspace{0.1cm}$ such taht one point of the ordered pair is rational and the other is irrational or both are irrationals,then which of the following is true?
$1$.S is closed.
$2$.S is open.
$3$.S is compact.
$4$.S is connected.
$5$.S is totally disconnected.
My Try:I think 5 is true.
{$(\frac{1}{3}+\frac{1}{\sqrt{2}n},\frac{1}{2}+\frac{1}{\sqrt{3}n})$} is a sequence in S which converges to $(\frac{1}{3},\frac{1}{2})$ which is not in S.Therefore S is not closed.Also because of this S is not compact.
Since the ordered pairs (x,y) with both x,y rational are not in S so should be totally disconnected.Also it is not open because S contains boundary points.If i am wrong please correct me.Thanks in advance.
Your are right on 1., 2., 3. But 4. is true. Let $x,y \in S$. Consider a line $L \subseteq [0,1]^2$ which contains neither $x$ nor $y$. For each poinz $z \in L$ there is a path $\gamma_z$ connecting $x$ and $y$ consisting of the straight segments $[x,z]$ and $[z,y]$. Now $\gamma_z \cap \gamma_{z'} = \{x,y\}$ for $x\ne y$ and $\{\gamma_z \mid z \in L\}$ is uncountable, and $([0,1]\cap \mathbb Q)^2$ is countable. Hence there is a $\gamma_z$ not intersecting $([0,1]\cap \mathbb Q)^2$. So $S$ is pathwise connected and hence connected.