65.74 CheckPolCode

CheckPolCode( h, n [, Name ], F )

CheckPolCode creates a cyclic code with a check polynomial h, word length n, over F. h can be entered as a polynomial over F, or as a list of coefficients over F or Integers. If h is a list of integers, these are first converted to F. Name can contain a short description of the code.

If h is not a divisor of x^<n>-1, it cannot be a check polynomial. In that case, a code is created with check polynomial gcd( <h>, x^<n>-1 ), i.e. the greatest common divisor of h and x^<n>-1. This is a valid check polynomial that yields the same elements as the ideal . See Generating Cyclic Codes.

    gap> P := Polynomial(GF(3), Z(3)*[1,0,2]);
    Z(3)^0*(X(GF(3))^2 + 2)
    gap> H := CheckPolCode(P, 7, GF(3));
    a cyclic [7,1,7]4 code defined by check polynomial over GF(3)
    gap> CheckPol(H);
    Z(3)^0*(X(GF(3)) + 2)
    gap> Gcd(P, X(GF(3))^7-1);
    Z(3)^0*(X(GF(3)) + 2) 

Previous Up Top Next
Index

GAP 3.4.4
April 1997