What are connected subspaces of the product of copies of the discrete topological space 2? Let $A$ be a set, and $S$ be a topological space $\Pi_{\alpha\in A} 2$, where $2 = \{0, 1\}$ carries the discrete topology. Then, what subspace $T \subset S$ is connected?  What if $A$ is countably infinite, and what if $A$ is countable? (When $A$ is countably infinite, $S$ is essentially what is known as Cantor set.) 
 A: Note that if $a, b$ are points in a topological space $X$ and $f : X \to \{ 0, 1 \}$ is a continuous function such that $f(a) = 0, f(b) = 1$, then $a, b$ must lie in different connected components of $X$ (in fact $f^{-1}(0)$ and $f^{-1}(1)$ must be disjoint clopen sets whose union is $X$). Now, by definition, $\{ 0, 1 \}^A$ has the property that all projections $f_a : \{ 0, 1 \}^A \to \{ 0, 1 \}$ (for $a \in A$) are continuous, and any two points in $\{ 0, 1 \}^A$ can be separated by such a projection. 
A: The space $\{0,1\}^A$ is known as Cantor cube. (If $|A|=\aleph_0$ then it is Cantor space.) This space is a zero-dimensional Hausdorff space and, consequently, it is totally disconnected, which means that connected components are one-point sets.

Let me give a little more details.
$\{0,1\}^A$ is a product space, i.e. the topology generated by the basis consisting of sets $B_{F,G}=\{f: A\to \{0,1\}, f[F]=0, f[G]=1\}$ for disjoint finite sets $F$, $G$. It is relatively  easy to show that the basic sets of this form are also closed, since the complement of $B_{F,G}$ is the open set $B_{G,F}$. Thus this space has a basis consisting of clopen sets. (Spaces having this property are called zero-dimensional.)

Now, if $X$ is a Hausdorff zero-dimensional space, then there is no connected subset $S$ of $X$ consisting of more than one point.
To show this, suppose that $x,y\in S$ and $x\ne y$. Since $X$ is Hausdorff, there are neighborhoods $U_x\ni x$, $U_y\ni y$ such that $U_x\cap U_y=\emptyset$. In fact, we can choose the neighborhoods $U_x$ and $U_y$  from any given basis, hence there exist clopen neighborhoods with these properties. Then $U_x\cap S$  is a clopen proper subset of $S$, which means that $S$ is not connected.
