I was double checking a problem from my combinatorics class (we are doing 
Pólya enumeration) and I came across what I think is a bug in the 
necklaces.py code.

I'll open a ticket, but I want to double check in case someone knows more 
about this code than I do.

sage: Necklaces([0,2,1]).list()
[[1, 2, 2], [1, 2, 3], [1, 3, 2]]
sage: Necklaces([0,2,1]).cardinality()
1

I think that while the second answer is correct, the first one should 
return [[2, 3, 3]].

The only problem that I can see is that code seems to not be written to 
handle input vectors that have 0 entries.  The documentation needs to be 
modernized a bit.

-Mike

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-combinat-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to