HammingCode( r, F )
HammingCode
returns a Hamming code with redundancy r over F. A
Hamming code is a single-error-correcting code. The parity check matrix
of a Hamming code has all nonzero vectors of length r in its columns,
except for a multiplication factor. The decoding algorithm of the Hamming
code (see Decode) makes use of this property.
If q is the size of its field F, the returned Hamming code is a
linear
[(q^<r>-1)/(q-1), (q^<r>-1)/(q-1) - <r>, 3] code.
gap> C1 := HammingCode( 4, GF(2) ); a linear [15,11,3]1 Hamming (4,2) code over GF(2) gap> C2 := HammingCode( 3, GF(9) ); a linear [91,88,3]1 Hamming (3,9) code over GF(9)
GAP 3.4.4