Re: Re: Listing the partitions of a set

• To: mathgroup at smc.vnet.net
• Subject: [mg65306] Re: Re: [mg65282] Listing the partitions of a set
• From: cneagle2 at verizon.net
• Date: Sat, 25 Mar 2006 05:17:42 -0500 (EST)
• Sender: owner-wri-mathgroup at wolfram.com

```Thanks a lot Sseziwa!

Richard

>From: Sseziwa Mukasa <mukasa at jeol.com>
To: mathgroup at smc.vnet.net
>Subject: [mg65306] Re: [mg65282] Listing the partitions of a set

>
>On Mar 24, 2006, at 12:59 AM, Richard Palmer wrote:
>
>>
>> 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}} .
>
><<DiscreteMath`Combinatorica`
>SetPartitions[Range[4]]
>Out[2]=
>{{{1,2,3,4}},{{1},{2,3,4}},{{1,2},{3,4}},{{1,3,4},{2}},{{1,2,3},{4}},
>{{1,
>       4},{2,3}},{{1,2,4},{3}},{{1,3},{2,4}},{{1},{2},{3,4}},{{1},{2,
>       3},{4}},{{1},{2,4},{3}},{{1,2},{3},{4}},{{1,3},{2},{4}},{{1,
>       4},{2},{3}},{{1},{2},{3},{4}}}
>
>Regards,
>
>Ssezi

```

• Prev by Date: Re: Listing the partitions of a set
• Next by Date: Re: Listing the partitions of a set
• Previous by thread: Re: Listing the partitions of a set
• Next by thread: Re: Listing the partitions of a set