Minimum length $m$ of $n$ string with pairwise Hamming distance $m/2$

251 Views Asked by At

I want to construct $n$ binary strings, each of the same length $m$ (to be determined), such that each pair of string has Hamming distance exactly $m/2$ (i.e. the strings disagree on $m/2$ positions).

I want to minimize the length $m$ of the constructed sequences.
I can do it with $m = 2^{n - 1}$ (I believe).

My question: is $m$ necessarily exponential in $n$?

Or is there some $c$ such that length $m \leq n^c$ is enough?

1

There are 1 best solutions below

1
On BEST ANSWER

There's in fact a simple linear-size construction: Choose as $m$ the smallest power of two that is greater or equal to $n$. Then pick any $n$ rows of the $m\times m$ Hadamard matrix.

Here's an example image of a Hadamard matrix:

http://patentimages.storage.googleapis.com/EP1143651A1/00230001.png