Find n binary codes of length n such that distance between each pair is n/2 , where n is a even number , if possible?How to generate all codes? for example if n=4 we have 1110,1101,1011,0111 each pair have distance 2. Distance between a pair of code means number of different bits in both code words. For example 1110 and 1101 ,only last two bits are different so distance between this pair is 2.Here n<=100.
$\begingroup$
$\endgroup$
4
-
1$\begingroup$ I think you're asking about Hadamard matrices. $\endgroup$– Anthony QuasCommented Sep 9, 2015 at 21:43
-
$\begingroup$ Can give some link about details how to generate Hadamard matrices for any n? $\endgroup$– subrat singhCommented Sep 9, 2015 at 21:59
-
$\begingroup$ Here you can find some info about Hadamard code- en.wikipedia.org/wiki/Hadamard_code Notice that the distance is always half the block length, as required. As explained under the "Construction" category, the generator matrix for the Hadamard code of rank is constructed by listing all the binary strings of length k in lexicographical order as column vectors. The example for k=3 is given in the wiki, and for k=4 you get G = | 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 | | 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 | | 0 $\endgroup$– mikibest2Commented Sep 9, 2015 at 22:37
-
$\begingroup$ @subratsingh Have you seen these yet?wolfram,wiki $\endgroup$– Henry.LCommented Sep 10, 2015 at 0:35
Add a comment
|
1 Answer
$\begingroup$
$\endgroup$
Hadamard code is indeed the answer you want. Hadamard matrices are conjectured to exist for all n which are multiples of 4. This is very hard to prove and a longstanding open problem. Sylvester Hadamard matrices can be explicitly constructed for all n which are positive integer powers of 2.