65.85 CyclicCodes

CyclicCodes( n, F )

CyclicCodes returns a list of all cyclic codes of length n over F. It constructs all possible generator polynomials from the factors of x^n-1. Each combination of these factors yields a generator polynomial after multiplication.

NrCyclicCodes( n, F )

The function NrCyclicCodes calculates the number of cyclic codes of length n over field F.

    gap> NrCyclicCodes( 23, GF(2) );
    8
    gap> codelist := CyclicCodes( 23, GF(2) );
    [ a cyclic [23,23,1]0 enumerated code over GF(2),
      a cyclic [23,22,1..2]1 enumerated code over GF(2),
      a cyclic [23,11,1..8]4..7 enumerated code over GF(2),
      a cyclic [23,0,23]23 enumerated code over GF(2),
      a cyclic [23,11,1..8]4..7 enumerated code over GF(2),
      a cyclic [23,12,1..7]3 enumerated code over GF(2),
      a cyclic [23,1,23]11 enumerated code over GF(2),
      a cyclic [23,12,1..7]3 enumerated code over GF(2) ]
    gap> BinaryGolayCode() in codelist;
    true
    gap> RepetitionCode( 23, GF(2) ) in codelist;
    true
    gap> CordaroWagnerCode( 23 ) in codelist;
    false    # This code is not cyclic 

Previous Up Top Next
Index

GAP 3.4.4
April 1997