[SciPy-user] combinatorics - all set partitions

Reckoner reckoner@gmail....
Tue Oct 28 11:37:35 CDT 2008


see chooser.py

http://code.activestate.com/recipes/302478/
http://mail.python.org/pipermail/python-list/2006-May/383412.html

and more at

http://www.diigo.com/user/reckoner/combinatorics?tab=250



On 10/28/08, Marek Wojciechowski <mwojc@p.lodz.pl> wrote:
> Hi!
>  I'm trying to find an algorithm (and possibly the python code) implementing
>  the problem of finding all possible partitions of the set.
>
>  Example of all partitions for the set { 1, 2, 3 } is:
>  { {1}, {2}, {3} }
>  { {1, 2}, {3} }
>  { {1, 3}, {2} }
>  { {1}, {2, 3} }
>  { {1, 2, 3} }
>  but i need general partitioning tool.
>
>  I thought maybe someone from the group knows the solution...
>
>  Greetings,
>
> --
>  Marek Wojciechowski
>
>  _______________________________________________
>  SciPy-user mailing list
>  SciPy-user@scipy.org
>  http://projects.scipy.org/mailman/listinfo/scipy-user
>


More information about the SciPy-user mailing list