View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Lori Lori is offline
external usenet poster
 
Posts: 340
Default Partition + Grouping

If you only have a maximum of four elements, it's probably easiest
just to list the possibilities in the top row and enter the other 14
possibilities below, referring to the first line. A pictorial
representation of this case is given in the wikipedia article:

http://en.wikipedia.org/wiki/Partition_of_a_set

Based on the recursion given for Bell's numbers, the following formula
filled down from A2 gives the total number of partitions of n elements
(with A1=1):

=SUMPRODUCT(COMBIN(COUNT($A$1:A1)-1,ROW($A$1:A1)-1),$A$1:A1)



On 2 Apr, 14:03, "Longshot" wrote:
On Mar 31, 11:34 pm, "Dana DeLouis" wrote:

I'd like to have a program that calculates all the partitions


Hi. Do you have a size limit in mind?
The reason I ask is that with just 10 items, the number of "SetPartitions"
are 115,975 and exceeds the number of Rows in Excel 2003. The number of
SetPartitions of 12 items jumps to 4,213,597 and exceeds the number of rows
in Excel 2007.


--
Dana DeLouis
Windows XP & Office 2007


Dear Dana,

Thank you for your reply, I am aware of this limitation

In reality, I will merely use four elements.

Thanks again,

Ram.