[SciPy-user] combinatorics - all set partitions

Marek Wojciechowski mwojc@p.lodz...
Tue Oct 28 05:38:32 CDT 2008


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



More information about the SciPy-user mailing list