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,       0,      x0,       0,       0,       0,       0,       0],
[b2,      x0,       0,      x6,       0,       0,       0,       0],
[b3,       0,      x6,       0,      x3,       0,       0,       0],
[b4,       0,       0,      x3,       0,      x4,       0,       0],
[b5,       0,       0,       0,      x4,       0,      x2,       0],
[b6,       0,       0,       0,       0,      x2,       0,      x1],
[b7,       0,       0,       0,       0,       0,      x1,       0]])
m

m.det()  gives answer immediatelly and you can substitute back for a's
and b's.

Do not know where the bug is, but hope that this helps.

Robert



On 17 pro, 09:53, William Stein <wst...@gmail.com> wrote:
> ---------- Forwarded message ----------
> From: Christian Szegedy <christian.szeg...@gmail.com>
> Date: Thu, Dec 17, 2009 at 12:26 AM
> Subject: sage bug report
> To: William Stein <wst...@gmail.com>
>
> Simple 8X8 matrix determinant computation makes sage hang:
>
> load x.py
> test()
>
> On the other hand if m.det() is replaced m.inverse(), it runs through
> in no time.
>
> The determinant of the matrix is a sum of two monomials:
> x1*x4*x5*x6 + x0*x2*x3*x7, but even the most primitive implementation
> (summing all 8! permutations,most of them zero) should run through in
> much less than minute.
>
> --
> William Stein
> Associate Professor of Mathematics
> University of Washingtonhttp://wstein.org
>
>
>
>  x.py
> < 1KZobrazitStáhnout

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to