For what values of $n$, it is possible to partition $\mathbb{Z}_2^n$ into $n$ disjoint parts, say $A_1, ..., A_n$ such that every element in $\mathbb{Z}_2^n$ is at most one-edit away from each part, i.e., the Hamming distance between $x$ and $A_k$ is at most 1 for all $x\in\mathbb{Z}_2^n$ and $k\in[n]$?

Moreover, if $n=2^m-1$ for some $m$, is it always possible to partition the space into $n+1$ parts with the same property?

Here are some observations.

- We can not hope for more than $n+1$ parts. If we can partition the space into $n+1$ parts. Then $n+1$ must divide $2^n$. Hence $n=2^m-1$ for some $m$. In fact, we can partition $\mathbb{Z}_2^n$ into $n+1$ parts for $n=1,3$.
- We can partition $\mathbb{Z}_2^n$ into $n$ parts for $n=2,4$, but NOT for $n=5$. This does not work for $n=5$ because one of the parts must have $\leq 6$ elements and it is not possible to have $6$ points in $\mathbb{Z}_2^n$ that 'controls' the entire space. In fact, there are at least 2 points that are 'not under control'.