On Friday, August 19, 2011 2:32:18 PM UTC-7, Alastair Irving wrote: > > On 19/08/2011 18:57, Sucharit wrote: > > I am using Sage to compute homologies of large chain complexes. For > > this, I need to compute kernels of matrices over GF(2). > > > > The attached file testmatrix.sage contains the 128 X 120 matrix that I > > started with. The first command loads the file. The second command > > should output a zero vector, but it does not. > > > > sage: load testmatrix.sage > > sage: M.kernel().basis()[0]*M > > (0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, > > 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, > > 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, > > 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, > > 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1) > > > Hi > > I get the same result as you so it does look like a bug. I also tried > putting algorithm="generic" into the call and got a different, but also > wrong, answer. > > Your example seems to be quite special, I'm running an infinite loop > generating matrices of the same size over GF(2) and so far the kernel is > computed correctly for all of them. > I agree with all of this; I get something nonzero for your example, but I'm also coming up with 0 whenever I multiply a random 128 x 120 matrix over GF(2) by a vector in its kernel.
Meanwhile, for computing homology groups, have you tried installing CHomP? You can accomplish this by running "sage -i chomp". It's faster at computing homology groups than the built-in methods in Sage, in my experience. -- John -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
