> < ^ Date: Tue, 07 Dec 1999 11:21:33 +0100 (CET)
> < ^ From: Thomas Breuer <Thomas.Breuer@Math.RWTH-Aachen.DE >
< ^ Subject: Re: Row reducing (0,1) matrices over finite fields

Dear GAP Forum,

Ken W. Smith asked

I've been using GAP to create incidence matrices of combinatorial
designs. (An incidence matrix M has entries which are 0 and 1 and so the
matrix may be viewed as existing over *any* field.) I would now like to
examine the codes generated by these matrices, that is, I would like to
examine the row space of the matrix M over a field of prime order. I'd
like to find bases for the row space.
How do I do this? A first step, I assume, is to row reduce the
matrix M mod p, but I can't seem to find the right commands.

In his answer, Chris Charnes' mentioned the Guava package,
which is probably exactly what Ken Smith needs.

In addition to this, here are some general remarks.

In GAP, the reduction of integer matrices modulo a prime
can be performed by multiplying the matrix with the identity
of the prime field in question.
For example,

gap> mat:= [ [ 1, 2, 3 ], [ 4, 5, 6 ] ];;
gap> p:= 3;;
gap> red:= mat * One( GF(p) );
[ [ Z(3)^0, Z(3), 0*Z(3) ], [ Z(3)^0, Z(3), 0*Z(3) ] ]

The vector space spanned by the rows can then be formed
using the function `VectorSpace'.

gap> v:= VectorSpace( GF(p), red );
<vector space over GF(3), with 2 generators>
gap> Dimension( v );
gap> AsList( v );
[ [ 0*Z(3), 0*Z(3), 0*Z(3) ], [ Z(3)^0, Z(3), 0*Z(3) ], 
  [ Z(3), Z(3)^0, 0*Z(3) ] ]

I hope this helps.

Kind regards,
Thomas Breuer

> < [top]