You could also check equality for all vertices with

sage: ans, isom = G1.is_isomorphic(G2, certificate=True)
sage: all(G1.spanning_trees_count(u) ==
G2.spanning_trees_count(isom[u]) for u in G1.vertices(sort=False))
True

On Sun, 18 Jun 2023 at 10:09, Dima Pasechnik <[email protected]> wrote:
>
> It could be an integer overflow somewhere in the determinant
> computation, as the numbers are very, very big.
>
> By default, determinants are computed by flint, so it can be a bug there.
> You can modify the code of spanning_trees_count() to allow passing of
> the algorithm to compute determinant, and see if you can get it right.
>
> HTH
> Dima
>
> On Sun, Jun 18, 2023 at 8:49 AM Georgi Guninski <[email protected]> wrote:
> >
> > On Sun, Jun 18, 2023 at 10:16 AM Emmanuel Briand
> > <[email protected]> wrote:
> > >
> > > Have you taken into account the following?
> > >
> > > ignature:      G1.spanning_trees_count(root_vertex=None)
> > > Docstring:
> > >    Return the number of spanning trees in a graph.
> > >
> > >    In the case of a digraph, counts the number of spanning out-trees
> > >    rooted in "root_vertex".  Default is to set first vertex as root.
> > >
> > >
> >
> > Thanks, I should have RTFM.
> >
> > This still doesn't work for me:
> >
> > sage: 
> > G1.spanning_trees_count(root_vertex=None),G2.spanning_trees_count(root_ver
> > ....: tex=None)
> > (27202601182632270746156805986464038912000,
> >  40803901773948406119235208979696058368000)
> >
> >
> > Is it rigorous to set c1=G1.spanning_trees_count()
> > and then do:
> >
> > sage: c1=G1.spanning_trees_count()
> > sage: for i in range(G1.order()):
> > ....:     c2=G2.spanning_trees_count(i)
> > ....:     if c2==c1:  print(i)
> > ....:
> > 6
> >
> > I expect for isomorphic multi digraphs the loop to find equal c1,c2?
> >
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "sage-devel" group.
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to [email protected].
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msgid/sage-devel/CAGUWgD_Zkf7g2py2PxWkYA4PqBOW6Ws%2BW31JtsQF2nmO6JE9tg%40mail.gmail.com.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-devel/CAAWYfq2%2B_eejUwRr9M5%3DB%3Ddn36XMvU1hRbEQ_wwGu2obdWf2Kw%40mail.gmail.com.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAGEwAAmK1t%3DHrcRG4QeeitLsU88XMuuRsY_w0sMG-iC6zQFC3g%40mail.gmail.com.

Reply via email to