65.53 MOLSCode

MOLSCode( n, q )
MOLSCode( q )

MOLSCode returns an (n, q^2, n-1) code over GF(q). The code is created from n-2 Mutually Orthogonal Latin Squares (MOLS) of size q * q. The default for n is 4. GUAVA can construct a MOLS code for <n>-2 leq <q>; q must be a prime power, <q> > 2. If there are no <n>-2 MOLS, an error is signalled.

Since each of the <n>-2 MOLS is a q*q matrix, we can create a code of size q^2 by listing in each code element the entries that are in the same position in each of the MOLS. We precede each of these lists with the two coordinates that specify this position, making the word length become n.

The MOLS codes are MDS codes (see IsMDSCode).

    gap> C1 := MOLSCode( 6, 5 );
    a (6,25,5)3..4 code generated by 4 MOLS of order 5 over GF(5)
    gap> mols := List( [1 .. WordLength(C1) - 2 ], function( nr )
    >       local ls, el;
    >       ls := NullMat( Size(Field(C1)), Size(Field(C1)) );
    >       for el in VectorCodeword( Elements( C1 ) ) do
    >          ls[IntFFE(el[1])+1][IntFFE(el[2])+1] := el[nr + 2];
    >       od;
    >       return ls;
    >    end );;
    gap> AreMOLS( mols );
    true
    gap> C2 := MOLSCode( 11 );
    a (4,121,3)2 code generated by 2 MOLS of order 11 over GF(11) 

Previous Up Top Next
Index

GAP 3.4.4
April 1997