A cyclic code is associated to an
irreducible polynomial over
which divides
.
For example, to get the
cyclic code over
having generator matrix
R<x>:=PolynomialRing(GF(2)); g:=x^3+x+1; Factorization(x^7-1); C:=CyclicCode(7,g); C; G:=GeneratorMatrix(C); G;
To get the parity check matrix, type
H:=ParityCheckMatrix(C);
Try IsCyclic(C);
To get the dimension of the code, type
Dimension(C); To get its
minimum distance, type MinimumDistance(C);