Updates:
        Cc: wdjoy...@gmail.com amake...@college.harvard.edu 
mario.pe...@gmail.com
        Labels: Combinatorics

Comment #1 on issue 3323 by asmeu...@gmail.com: perm_groups alt_or_sym failure
http://code.google.com/p/sympy/issues/detail?id=3323

This is caused by a failure of the random algorithm is_alt_sym() to determine that the group is symmetric. Some issues here:

- The correct return value should be None, not False. (that's unrelated to this failure, though)

- Apparently we need to print the random seed at the top of the doctests as well.

- The docstring of this function states that it should be called only after is_alt_sym() returns True. One possible fix would be to remove this check from alt_or_sym(), and simply state (clearly!) in the docstring that if the group is not known to be alternating or symmetric, then you will get meaningless output. This would have two advantages: one, there would be no unnecessary repeat call of is_alt_sym(), which the user is told to call before alt_or_sym() anyway. Two, it would fix this doctest, because AlternatingGroup(20) *is* alternating, so it will always return 'A', regardless of the random seed.

The downside of course is that if someone does not read the docs and calls alt_or_sym() on a group that is neither, they will get an essentially wrong result.

- Whatever we do, the docstring should be updated accordingly.

Aleksandar, David, Mario, and any other interested parties, what do you think? I didn't look to see how this might apply to the other randomized algorithms in the combinatorics module.

By the way, David and Aleksandar, I've added your emails here on Google code so I could CC you. Let me know if you want me to use a different email.

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to sympy-issues@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to