On Mar 19, 6:54 pm, Chris Godsil <[email protected]> wrote: > What algorithm(s) does sage use to compute determinants over QQ[t] or > QQ[t,u]?
For both of these, it is computing them using minors, which is awful when the matrices are not tiny. > Does they work over the ring of definition, or over the field of > fractions? These work over the ring of definition. If you work over the field of fractions, then you can get some speedup since you can put then matrix in Hessenberg form and read the determinant off from the characteristic polynomial. For the CycleGraph(9): sage: m.change_ring(R.fraction_field()).det() t^9 - 9*t^7 + 27*t^5 - 30*t^3 + 9*t - 2 CPU time: 0.54 s, Wall time: 0.57 s > over QQ[t] is not polynomial time. As the Reference Manual suggests, I > entered > M.determinant? to see what algorithm was being used, but did not get > any useful information. In this case, doing M.determinant?? to see the actual source code gives you everything it's doing. --Mike --~--~---------~--~----~------------~-------~--~----~ 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 URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
