MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Listing the partitions of a set


Is there a simple way to list the partitions of a set?  For example, there
are 15 partitions on a set of 4 elements.  {{{1, 2, 3, 4}}, {1, {2, 3, 4}},
{{1, 3, 4}, 2}, {{1, 2, 4}, 3}, {{1, 2, 3},    4}, {{1, 2}, {3, 4}}, {{1,
3}, {2, 4}}, {{1, 4}, {2, 3}}, {1, 2, {3, 4}}, {1, 3, {2, 4}}, {1, 4, {2,
3}}, {2, 3, {1, 4}}, {2,    4, {1, 3}}, {3, 4, {1, 2}}, {1, 2, 3, 4}} .  



  • Prev by Date: Re: How to get the value of a counter
  • Next by Date: Plot equations and inequalities together
  • Previous by thread: Re: Problem with Infinite products
  • Next by thread: Re: Listing the partitions of a set