Hi Marc, I'm sure better answers are possible (and probably forthcoming), but the following may be good enough.
If your algebra has a nontrivial radical, then you can take an arbitrary (nonzero) element of that. Otherwise, I would expect it's much more efficient (in expectation) to try the elements in pseudorandom order than in whatever is the default, to get around any systematic effect that might put zero divisors later. Two trivial examples: gap> m:= [ [ 1, 1, 2 ], [ 1, 0, 3], [ 1, 0, 0 ] ];; gap> A:= AlgebraWithOne( Rationals, [ m ] ); <algebra-with-one over Rationals, with 1 generators> gap> ra := RadicalOfAlgebra(A); <algebra of dimension 2 over Rationals> gap> GeneratorsOfAlgebra(ra); [ [ [ 0, 1, 2 ], [ 0, 0, 3 ], [ 0, 0, 0 ] ], [ [ 0, 0, 1 ], [ 0, 0, 0 ], [ 0, 0, 0 ] ] ] gap> # These are all nilpotent. gap> A2 := Rationals^[7,7]; ( Rationals^[ 7, 7 ] ) gap> # Has a trivial radical. gap> psr := PseudoRandom(A2);; gap> while Determinant(psr) <> 0 or psr = Zero(A2) do > psr := PseudoRandom(A2); > od; gap> # Now psr is nilpotent. Hope this helps, Erik Postma. On 3 October 2010 10:52, mbg nimda <[email protected]> wrote: > Dear forum members, > > I have a finitely generated matrix algebra over the rationals that I know is > not a field but contains > zero divisors. > To find one (and this seems to be quite suitable) I simply use: > i:=First(rc.algebra, a-> Determinant(a)=0 and a <> 0*I); > > Sometimes it works for 120x120 matrices within a reasonable time, sometimes > I have to give up > after several hours even with 24x24 matrices. > > Does anybody know how to do this another way with more chance for a success? > > Thanks, > > Marc Bogaerts > _______________________________________________ > Forum mailing list > [email protected] > http://mail.gap-system.org/mailman/listinfo/forum > _______________________________________________ Forum mailing list [email protected] http://mail.gap-system.org/mailman/listinfo/forum
