IsPerfectCode( C )
true if C is a perfect code. For a code with
odd minimum distance d = 2t+1, this is the case when every word of the
vector space of C is at distance at most t from exactly one element
of C. Codes with even minimum distance are never perfect.
In fact, a code that is not trivial perfect (the binary repetition codes of odd length, the codes consisting of one word, and the codes consisting of the whole vector space), and does not have the parameters of a Hamming- or Golay-code, cannot be perfect.
gap> H := HammingCode(2); a linear [3,1,3]1 Hamming (2,2) code over GF(2) gap> IsPerfectCode( H ); true gap> IsPerfectCode( ElementsCode( [ [1,1,0], [0,0,1] ], GF(2) ) ); true gap> IsPerfectCode( ReedSolomonCode( 6, 3 ) ); false gap> IsPerfectCode(BinaryGolayCode()); true
Previous Up Top Next