Partition of $0,1$ sequences with even $1$'s into groups s.t. elements in each group differ from a sequence by one entry

59 Views Asked by At

Consider $S$, the set of all $0,1$-sequences of length $n=2^k$ and there is an even number of $1$'s in the sequence. Clearly, $|S|=2^{n-1}$. Is it always possible to find $2^{n-1-k}$ representatives, which are $0,1$-sequences with odd numbers of $1$'s, say $a_i$, such that $S$ can be partitioned into $2^{n-1-k}$ disjoint groups $S_i$, $|S_i|=n$, $S=\cup_{i=1}^{2^{n-1-k}}S_i$, all elements of $S_i$ differ from the representative $a_i$ by exactly one entry?

For example, $n=4$, $2^{n-1-k}=2$, $S=\{0000,0011,0110,0101,1001,1010,1100,1111\}$. Choose the representatives and their corresponding groups as: \begin{equation} a_1=0001: S_1=\{0000,0011,0101,1001\};\quad\quad a_2=1110: S_2=\{1111,0110,1010,1100\}. \end{equation}

I feel this is always possible but cannot give a constructive proof.

1

There are 1 best solutions below

1
On

Let $V(d)$ be vector space of binary integers of length $d$.

The Hamming code $C$ is a subset (actually subgroup under modulo $2$ componentwise addition) of $V(2^k-1)$ with $2^{2^k-1-k}$ members that is a *perfect code8 (see Wikipedia) with minimum distance $3.$ This means that the spheres of radius $1$ (with respect to Hamming distance, i.e., minimum number of bitflips to get from one vector to another) around the codewords $x \in C$ are disjoint and cover the whole space $V(2^k-1).$ Also, obviously for any vector of length $2^k-1$ the nearest Hamming code codeword is unique.

Take an arbitrary $u \in S$ and remove the last coordinate, call this projection map $f$. This gives a unique member $u'=f(u)$ of $V(2^k-1).$

This vector $u'$ is either a Hamming code codeword or within Hamming distance $1$ of a Hamming codeword. So $u'$ lies in either $C$ itself or a unique coset of $C$ of the form $C+z$ where $z$ has Hamming weight $1.$

If you now carefully extend the elements of the code $C$ or the coset $C+z$ by one bit and you have your collection of sets $S_k.$ In summary

$$S_0=\{ u 0: u' \in C, w(u')~even~ \} \cup \{ u' 1: u' \in C, w(u')~odd~\},$$ and $$S_k=\{ u' 0: u \in C+z_k,w(u')~even~\} \cup \{u' 1: u' \in C+z_k,w(u)~odd~\},\quad k=1,\ldots,2^k-1$$ where $z_k$ is the binary vector with a single $1$ in the $k^{th}$ coordinate and $w(z)$ denotes the Hamming weight of a vector $z.$