Chris,

Some flakiness with Google Groups.  Here's the rest of what I wanted
to say.

Sage is *very* fast over ZZ, and I know you said that was irrelevant.
Use the command in the previous message to scale out the fractions, do
your computation, and then move the scalar back in to the result.  Not
sure what you are up to exactly, but with determinants and
polynomials, perhaps the scaling has a predictable effect.  I like the
looks of Mike's suggestion very much, and if this helps you get there,
then I think thousands of 30x30's are achievable.

Rob

On Mar 19, 9:29 pm, Rob Beezer <[email protected]> wrote:
> Chris,
>
> I'm having trouble posting a reply here.  Here's the essence of what I
> wanted to show you.  Perhaps more in just a minute.
>
> sage: m=matrix(QQ, [[3/2, 4/3], [1/7, 5/11])
> sage: m._clear_denoms()
>
> ([693 616]
> [ 66 210], 462)
>
> Rob
>
> On Mar 19, 8:13 pm, Mike Hansen <[email protected]> wrote:
>
> > 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to