65.73 GeneratorPolCode

GeneratorPolCode( g, n [, Name ], F )

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

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

    gap> P := Polynomial(GF(2), Z(2)*[1,0,1]);
    Z(2)^0*(X(GF(2))^2 + 1)
    gap> G := GeneratorPolCode(P, 7, GF(2));
    a cyclic [7,6,1..2]1 code defined by generator polynomial over GF(2)
    gap> GeneratorPol(G);
    Z(2)^0*(X(GF(2)) + 1)
    gap> G2 := GeneratorPolCode([1,1], 7, GF(2));
    a cyclic [7,6,1..2]1 code defined by generator polynomial over GF(2)
    gap> GeneratorPol(G2);
    Z(2)^0*(X(GF(2)) + 1) 

Previous Up Top Next
Index

GAP 3.4.4
April 1997