Number of connected components for a graph of binary n-tuples. This exercise is from Ralph P.Grimaldi Discrete and Combinatorial Mathematics.
For $n\geq2$, let $G=(V,E)$ be the loop-free undirect where $V$ is the set of binary n-tuples (of 0's and 1's) and $E=\{ \{v,w\}: v,w \in V \hspace{10pt}\text{$v,w$ differ in exactly two positions}\}$. Find $\kappa(G)$.
I know that $|V|=2^n$. For pairs I get $\kappa(G)=2$, for $3$-tuples $\kappa(G)=2$, and for $4$-tuples I get $\kappa(G)=1$, where $\kappa(G)$ is the number of connected components.
Is $G$ connected for $n\geq 4$?
I can't see a patern for $n$-tuples. How can I calculate $\kappa(G)$?.
 A: The number of connected components is always equal to $2$.
Notice that adjacent sequences always have the same parity for the sum of the coordinates.
On the other hand, if two sequences have the same sum parity then they must differ in an even number of places, so it is clear that we can get from one to the other by changing those positions by pairs.
A: Here is an outline to show that $\kappa(G)=2$ for all $n$. First, define the Hamming weight of a vector to be the sum of its entries (in this case, it is equal to the number of nonzero entries).
It is easy to show that a vector with Hamming weight $0$ is connected to the zero vector (this can be done for example by inducting on the number of nonzero entries). Similarly, it is easy to show that a vector with Hamming weight $1$ is connected to $(1,0,0,\dots,0)$. These two facts (and transitivity of connectedness) give us the upper bound $\kappa(G)\leq 2$. Now we just need to show that $(0,0,\dots,0)$ and $(1,0,0,\dots,0)$ are not connected. 
To do this, note what happens when you flip two entries in the vector. Either the two entries were both $1$, in which case you remove two $1$s, or they were both $0$, in which case you add two $1$s, or they were different, in which case the total number of $1$s is unchanged. So moving along an edge does not change the Hamming weight, and hence the the two vectors in question are not connected. 
