On Thursday 11 September 2008, Martin Albrecht wrote: > > Did you check how fast singular is for the Lewis-Wester determinants? > > Are these some kind of benchmark(et)ing examples? Where can I find the > input matrices? Sorry, never heard that name before ... which isn't that > surprising, since I never thought about this computation before the bug > report on [sage-support]. :-) > > Cheers, > Martin
Okay, found it: # the original benchmark is over ZZ, but that's really slow in Sage --------------- P.<x1,x2,x3,x4,x5> = PolynomialRing(QQ, 5) M = MatrixSpace(P, 26) w = [ [ 1, 1, 1, 7, x4, 12, x3, 17, x2, 22, x1 ], [ 2, 2, 1, 8, x4, 13, x3, 18, x2, 23, x1 ], [ 3, 3, 1, 9, x4, 14, x3, 19, x2, 24, x1 ], [ 4, 4, 1, 10, x4, 15, x3, 20, x2, 25, x1 ], [ 5, 5, 1, 26, 1, 1, 0, 1, 0, 1, 0 ], [ 6, 2, x5, 6, 1, 12, x3, 17, x2, 22, x1 ], [ 7, 3, x5, 7, 1, 13, x3, 18, x2, 23, x1 ], [ 8, 4, x5, 8, 1, 14, x3, 19, x2, 24, x1 ], [ 9, 5, x5, 9, 1, 15, x3, 20, x2, 25, x1 ], [10, 10, 1, 26, 1, 1, 0, 1, 0, 1, 0 ], [11, 2, x5, 7, x4, 11, 1, 17, x2, 22, x1 ], [12, 3, x5, 8, x4, 12, 1, 18, x2, 23, x1 ], [13, 4, x5, 9, x4, 13, 1, 19, x2, 24, x1 ], [14, 5, x5, 10, x4, 14, 1, 20, x2, 25, x1 ], [15, 15, 1, 26, 1, 1, 0, 1, 0, 1, 0 ], [16, 2, x5, 7, x4, 12, x3, 16, 1, 22, x1 ], [17, 3, x5, 8, x4, 13, x3, 17, 1, 23, x1 ], [18, 4, x5, 9, x4, 14, x3, 18, 1, 24, x1 ], [19, 5, x5, 10, x4, 15, x3, 19, 1, 25, x1 ], [20, 20, 1, 26, 1, 1, 0, 1, 0, 1, 0 ], [21, 2, x5, 7, x4, 12, x3, 17, x2, 21, 1 ], [22, 3, x5, 8, x4, 13, x3, 18, x2, 22, 1 ], [23, 4, x5, 9, x4, 14, x3, 19, x2, 23, 1 ], [24, 5, x5, 10, x4, 15, x3, 20, x2, 24, 1 ], [25, 25, 1, 26, 1, 1, 0, 1, 0, 1, 0 ], [26, 1, x5, 6, x4, 11, x3, 16, x2, 21, x1 ] ] m = M.matrix() for i in range(0,26): for j in range(0,5): m[i, (w[i][2*j+1])-1] = w[i][2*j+2] tinit = cputime() qqq = m.determinant() print "M1 =", cputime(tinit), "(SAGE)"; del P, M, w, m, qqq --------------- This takes 0.001 seconds on my notebook, Magma is in the same ballpark, i.e. the example is way too small for a comparison. M2 (again, over QQ) takes 2.2 seconds in Sage 3.1.2.rc2 and 2.02 seconds in Magma (over ZZ). Cheers, Martin Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _www: http://www.informatik.uni-bremen.de/~malb _jab: [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---