Re: [sage-support] Re: Fwd: sage bug report

2009-12-17 Thread Robert Bradshaw
On Dec 17, 2009, at 5:58 PM, Christian Szegedy wrote: > It is impossible to come up with any reasonable explanation for this > kind of slowdown. Even if you do extremely stupid things like > summing all permutations and simplifying the expression at the end, > you > can't get that slow. No, but

Re: [sage-support] Re: Fwd: sage bug report

2009-12-17 Thread William Stein
On Thu, Dec 17, 2009 at 5:58 PM, Christian Szegedy wrote: > It is impossible to come up with any reasonable explanation for this > kind of slowdown. Even if you do extremely stupid things like > summing all permutations and simplifying the expression at the end, you > can't get that slow. > > Addi

Re: [sage-support] Re: Fwd: sage bug report

2009-12-17 Thread Christian Szegedy
It is impossible to come up with any reasonable explanation for this kind of slowdown. Even if you do extremely stupid things like summing all permutations and simplifying the expression at the end, you can't get that slow. Additionally, you cansee that the inverse is computed readily. If you loo

Re: [sage-support] Re: Fwd: sage bug report

2009-12-17 Thread Robert Bradshaw
The speed could be do to the inefficiency of fraction field arithmetic over the polynomial ring. Ideally, we should have fraction-free gaussian elimination. Also, easily invertable/small determinant may actually be worse--as it could be creating a lot of large intermediate values with non-t

Re: [sage-support] Re: Fwd: sage bug report

2009-12-17 Thread Christian Szegedy
You evaluate it over ZZ[x1,...,xn] rather than GF(2)[x1,...,x4]. Anyways, it simply can't be *that* slow in any case: even: the (theoretically ) maximum number of monoms that can be in any expansion is less than a few thousands, so the upper limit for a naively implemented Gaussian elimination is

[sage-support] Re: Fwd: sage bug report

2009-12-17 Thread luisfe
On 17 dic, 11:48, "ma...@mendelu.cz" wrote: > And another observation: > > maxima returns answer immediatelly (with a lag necessary to start > maxima) > m is the original matrix from x.py > > sage: m._maxima_().determinant().expand().sage() > x0^2*x2^2*x3^2*x7^2 - 2*x0*x1*x2*x3*x4*x5*x6*x7 + x1^

[sage-support] Re: Fwd: sage bug report

2009-12-17 Thread ma...@mendelu.cz
And another observation: maxima returns answer immediatelly (with a lag necessary to start maxima) m is the original matrix from x.py sage: m._maxima_().determinant().expand().sage() x0^2*x2^2*x3^2*x7^2 - 2*x0*x1*x2*x3*x4*x5*x6*x7 + x1^2*x4^2*x5^2*x6^2 Anyway, the answer is different from expec

[sage-support] Re: Fwd: sage bug report

2009-12-17 Thread ma...@mendelu.cz
perhaps problems expanding polynomials? even determinant of submatrix (0,0,5,5) is suprisingly slow. workaroud is to replace polynomials in your matrix by variables. var('x0 x1 x2 x3 x4 x5 x6 x7 a1 a2 a3 a4 a5 a6 a7 b1 b2 b3 b4 b5 b6 b7') m=matrix([[ 0, a1, a2, a3, a4, a5, a6, a7], [b1,