[sage-devel] Isomorphic multi digraphs have distinct number of spanning trees, bug?

2023-06-18 Thread Georgi Guninski
I need this for an algorithm, so even pointers to papers will be appreciated. The smallest bug I have is of order 36. The attached file has two multi digraphs which are isomorphic, but have distinct number of spanning trees. print("isomorphic? ",G1.is_isomorphic(G2)) #True print("equal trees?",

Re: [sage-devel] Isomorphic multi digraphs have distinct number of spanning trees, bug?

2023-06-18 Thread Emmanuel Briand
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

Re: [sage-devel] Isomorphic multi digraphs have distinct number of spanning trees, bug?

2023-06-18 Thread Georgi Guninski
On Sun, Jun 18, 2023 at 10:16 AM Emmanuel Briand 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-t

Re: [sage-devel] Isomorphic multi digraphs have distinct number of spanning trees, bug?

2023-06-18 Thread Dima Pasechnik
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

Re: [sage-devel] Isomorphic multi digraphs have distinct number of spanning trees, bug?

2023-06-18 Thread Vincent Delecroix
sage: G1.spanning_trees_count(root_vertex=0) 27202601182632270746156805986464038912000 sage: G2.spanning_trees_count(root_vertex=6) 27202601182632270746156805986464038912000 On Sun, 18 Jun 2023 at 09:49, Georgi Guninski wrote: > > On Sun, Jun 18, 2023 at 10:16 AM Emmanuel Briand > wrote: > > > >

Re: [sage-devel] Isomorphic multi digraphs have distinct number of spanning trees, bug?

2023-06-18 Thread Vincent Delecroix
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 wrote: > > It could be an inte

Re: [sage-devel] Isomorphic multi digraphs have distinct number of spanning trees, bug?

2023-06-18 Thread Dima Pasechnik
On Sun, Jun 18, 2023 at 9:09 AM Vincent Delecroix <20100.delecr...@gmail.com> wrote: > > sage: G1.spanning_trees_count(root_vertex=0) > 27202601182632270746156805986464038912000 > sage: G2.spanning_trees_count(root_vertex=6) > 27202601182632270746156805986464038912000 indeed, and for all other ver

Re: [sage-devel] Isomorphic multi digraphs have distinct number of spanning trees, bug?

2023-06-18 Thread Georgi Guninski
On Sun, Jun 18, 2023 at 11:19 AM Dima Pasechnik wrote: > > On Sun, Jun 18, 2023 at 9:09 AM Vincent Delecroix > <20100.delecr...@gmail.com> wrote: > > > > sage: G1.spanning_trees_count(root_vertex=0) > > 27202601182632270746156805986464038912000 > > sage: G2.spanning_trees_count(root_vertex=6) > >

Re: [sage-devel] Isomorphic multi digraphs have distinct number of spanning trees, bug?

2023-06-18 Thread Dima Pasechnik
On Sun, 18 Jun 2023, 10:56 Georgi Guninski, wrote: > On Sun, Jun 18, 2023 at 11:19 AM Dima Pasechnik wrote: > > > > On Sun, Jun 18, 2023 at 9:09 AM Vincent Delecroix > > <20100.delecr...@gmail.com> wrote: > > > > > > sage: G1.spanning_trees_count(root_vertex=0) > > > 2720260118263227074615680598

Re: [sage-devel] Modularization project: I. The goals

2023-06-18 Thread Matthias Koeppe
On Friday, June 16, 2023 at 12:08:29 AM UTC-7 Michael Orlitzky wrote: [...] without resolving any of the other ongoing massive complicated projects. One such project that has been ongoing (or rather started and then forgotten) since at least 2012

Re: [sage-devel] Modularization project: III. The hooks

2023-06-18 Thread Matthias Koeppe
On Wednesday, June 14, 2023 at 8:32:17 AM UTC-7 William Stein wrote: On Tue, Jun 13, 2023 at 12:05 PM Matthias Koeppe wrote: let's first *take a look at the portions of Sage with an eye on their potential to find many new users* if we make them usable separately. *sage.plot* provides funct