[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?",G1.spanning_trees_count()==G2.spanning_trees_count())
#False
iso,map=G1.is_isomorphic(G2,certificate=True)
G3=G1.copy()
G3.relabel(lambda x:  map[x])
print("verify iso",G3==G2) #True

-- 
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 sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAGUWgD8LfAhfpRvgafWiL8cSX8-MrEhNbcOu0nKUt%2BGHnKLp3g%40mail.gmail.com.
G1=loads(b'x\x9cU\x98uXV\xf7\x1f\x86_\x11\x03PJ\x10AD\x01\x03\x8b\xcd\xd9\xb5\xd9u&\xb6\xb2p\x0e\xe5\x1d2Q\xe0\x80\xd3\x85\x9b\xae\xd4uw\xfc\x9e\xfb<\xe7wy\xed\x1f\xef\x1b./\xbf\xcfy>\x9f\xefy\xdf\xcb\x8d)+Zj\xea\x92\x95uaM\xd3\xca\x96\xca\xda\xfaH\xd2\xa7\xd4O\x8f\xd8\x9c\xe8\xbf\xa9\xb9\xcd\x86\xe6\x94\x8a\xea\x8cD"\xb1\xac\xa1\xa65\xb9~YcSkKs\xdb\xaa\xea\x8e\xfcjy\xcd\x8aU\xc95\xb5\xcd\xa9\xff\xf9\x87\x96\xd7\xb4\xc4\xfe\xff\xbf\xd0\x92\xbevMS\xfd\x8aU\r\xc9e\xff\xf9}zs\xbb\x8a-K\x9b\xdbW\x04\x89\xa0M\x90\x12\xb4\rR\x83vA\xfb\xa0C\xd01H\x0b\xd2\x83\x8c\xa0S\xd09\xc8\x0c\xb2\x82\xec \'\xc8\r\xba\x04yA~\xd05(\x08\xba\x05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xe7[I\xb6\xc0J\xb2\x85V\xc6\xbd\xc8\xca\x8c\x17[I\xb6\xc4\xca%\xab\xb6R\xdf.V6uW+M\xeef%\xd9\xeeV\x06\xbb\xd4\xca\xcd\xda\xc3J\x93\xcb\xac\xe4\xdd\x13\xcd\x8bB\xd6Xir\xb9\x95\xbc+\xac\x

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.


El dom, 18 jun 2023 a las 9:00, Georgi Guninski ()
escribió:

> 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?",G1.spanning_trees_count()==G2.spanning_trees_count())
> #False
> iso,map=G1.is_isomorphic(G2,certificate=True)
> G3=G1.copy()
> G3.relabel(lambda x:  map[x])
> print("verify iso",G3==G2) #True
>
> --
> 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 sage-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-devel/CAGUWgD8LfAhfpRvgafWiL8cSX8-MrEhNbcOu0nKUt%2BGHnKLp3g%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 sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAC2RnLqOK3T1OZwR0qbsJVc8Dv7zjALBcJ%3DEy9CtSG7EV9nbyw%40mail.gmail.com.


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-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 sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAGUWgD_Zkf7g2py2PxWkYA4PqBOW6Ws%2BW31JtsQF2nmO6JE9tg%40mail.gmail.com.


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 if you can get it right.

HTH
Dima

On Sun, Jun 18, 2023 at 8:49 AM Georgi Guninski  wrote:
>
> 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-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 sage-devel+unsubscr...@googlegroups.com.
> 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 sage-devel+unsubscr...@googlegroups.com.
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.


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:
> >
> > 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 sage-devel+unsubscr...@googlegroups.com.
> 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 sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAGEwAAntJP%3DXemn%2BAmnYt6BfRfq8GujWQYZSpAjPyA81oOHxEw%40mail.gmail.com.


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 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  wrote:
> >
> > 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-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 sage-devel+unsubscr...@googlegroups.com.
> > 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 sage-devel+unsubscr...@googlegroups.com.
> 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 sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAGEwAAmK1t%3DHrcRG4QeeitLsU88XMuuRsY_w0sMG-iC6zQFC3g%40mail.gmail.com.


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 vertices I get
40803901773948406119235208979696058368000

so this is OK on my machine, at least.

>
> On Sun, 18 Jun 2023 at 09:49, Georgi Guninski  wrote:
> >
> > 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-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 sage-devel+unsubscr...@googlegroups.com.
> > 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 sage-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-devel/CAGEwAAntJP%3DXemn%2BAmnYt6BfRfq8GujWQYZSpAjPyA81oOHxEw%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 sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAAWYfq1xeemQ8LQyz5NTXQfSCGj5NRiyK1K1hpo6j7yWpny8%2BQ%40mail.gmail.com.


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)
> > 27202601182632270746156805986464038912000
>
> indeed, and for all other vertices I get
> 40803901773948406119235208979696058368000
>


Many thanks to all :)

Just to clarify:

1. If I don't equality for all V(G2) then G1,G2 are non-isomorphic
multi digraphs, right?
2. If I get equality for a single vertex (0 -> 6 in the example) then
then all isomorphisms map 0 to 6 (in this case
G1.automorphism_group().order() == 96)?

-- 
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 sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAGUWgD9DqNNy7TKExXz%2BaRkj7xni-STpaE%2BBO8tR3ouOLQzHsw%40mail.gmail.com.


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)
> > > 27202601182632270746156805986464038912000
> > > sage: G2.spanning_trees_count(root_vertex=6)
> > > 27202601182632270746156805986464038912000
> >
> > indeed, and for all other vertices I get
> > 40803901773948406119235208979696058368000
> >
>
>
> Many thanks to all :)
>
> Just to clarify:
>
> 1. If I don't equality for all V(G2) then G1,G2 are non-isomorphic
> multi digraphs, right?
>

yes

2. If I get equality for a single vertex (0 -> 6 in the example) then
> then all isomorphisms map 0 to 6 (in this case
> G1.automorphism_group().order() == 96)?
>

yes.

On the other hand, existence of such a 1-1 correspondence for all vertices
between doesn't imply existence of an isomorphism. This follows from a
general theorem by Cai-Furer-Immerman on 1st order logic with counting
being insufficient for isomorphism recognition.


> --
> 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 sage-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-devel/CAGUWgD9DqNNy7TKExXz%2BaRkj7xni-STpaE%2BBO8tR3ouOLQzHsw%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 sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAAWYfq0%3DrjjwEW-TbQnS5kd3_-nH7z2MbUFwrdqecqrXG9VqLg%40mail.gmail.com.


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 
 is the deprecation and 
removal of is_*SomeClass* functions, in favor of using isinstance.

It would be great if we could finish this; see 
https://github.com/sagemath/sage/issues/32414, which also explains why this 
helps the modularization project.

-- 
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 sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/1279f56b-44b0-423b-ae30-09307f7e8bf2n%40googlegroups.com.


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 functions for plotting that are very similar to the 
Mathematica's plotting functions.  This is analogous to how 
matplotlib's pyplot provides a UI on top of the core matplotlib library 
that is similar to matlab's plotting UI.  In many cases the implementations 
in sage.plot (might be) nontrivial and (last I checked) did not exist 
anywhere else in the Python ecosystem, e.g., at sage days 9 a lot of work 
by grad students went into adaptive refinements algorithms for plotting a 
function f(x).  The approach to plotting using by Mathematica is extremely 
different than Matlab's, and they both have their pros and cons for 
different use cases.There would be significant value and interest in 
sage.plot outside of sage.   


Thanks, William. I have added a bit from what you wrote to the sagemath-plot 
README 
.
 
It doesn't quite read like ad copy yet, but it's a start.

-- 
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 sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/db48022b-2062-4494-b77a-296fe41ee841n%40googlegroups.com.