kcrisman wrote:
> Using Sage 2.8.12 (attempted on the notebook servers with current
> version, but the one my account is one is sagenb.org and never gave an
> output at all), the following behavior happens:
> 
> sage: L = list(graphs(3, lambda H: H.size() <=3))
> sage: len(L)
> 8
> 
> Yet,
> 
> sage: L = list(graphs(3, lambda H: H.size() ==3))
> sage: len(L)
> 0
> 
> even though
> 
> sage: for G in L: print G.size()
> 0
> 0
> 0
> 0
> 1
> 2
> 1
> 3
> 
> But, interestingly,
> 
> sage: L = list(graphs(3, lambda H: H.size() !=3))
> sage: len(L)
> 7
> 
> 
> I assume this is a bug, but because I don't understand
> canaug_traverse, I am not certain. Thanks for any clarification!
> Apologies in advance if this was already fixed and I didn't get it due
> to lackadaisical upgrades.

Under Sage 2.9.3:
sage: L = list(graphs(3, lambda H: H.size() <=3))
sage: len(L)
4
sage: L = list(graphs(3, lambda H: H.size() ==3))
sage: len(L)
0
sage: for G in L: print G.size()
....:
sage: L = list(graphs(3, lambda H: H.size() !=3))
sage: len(L)
3


This seems to match the documentation, which says that with the default 
options, if the test function has the property that if a graph passes 
the test, then every subgraph obtained by deleting edges also passes the 
test, then you will get a complete listing of all graphs which satisfy 
the test function.

Thus the results in Sage 2.9.3 correctly indicate that there are 4 
graphs with size <=3.  Because the maximum number of edges is 3 on 
3-vertex graphs, the last example also correctly calculates that there 
are 3 graphs with size < 3.  However, the generating method does not 
guarantee that the second example (size==3) will produce all graphs with 
exactly 3 edges.

It is interesting that you get different numbers (8, 0, and 7 compared 
to 4, 0, and 3).

Jason


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
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