| 1 | initial version |
Where have you searched!?
sage: for s in SetPartitions([1,2,3,4,5], 3):
....: print(s)
{{1, 4, 5}, {2}, {3}}
{{1, 5}, {2, 4}, {3}}
{{1, 5}, {2}, {3, 4}}
...
{{1, 2, 3}, {4}, {5}}
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.