Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Partition + Grouping

Hi All,

I'd like to have a program that calculates all the partitions of a
string as follows:

The partitions of (1, 2, 3) should be:

((1, 2, 3))
((1, 2), (3))
((1, 3), (2))
((1), (2, 3))
((1), (2), (3))

Thanks in advance,

Ram.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 947
Default Partition + Grouping

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


"Longshot" wrote in message
oups.com...
Hi All,

I'd like to have a program that calculates all the partitions of a
string as follows:

The partitions of (1, 2, 3) should be:

((1, 2, 3))
((1, 2), (3))
((1, 3), (2))
((1), (2, 3))
((1), (2), (3))

Thanks in advance,

Ram.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Partition + Grouping

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.

  #4   Report Post  
Posted to microsoft.public.excel.programming
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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
grouping with vba Excel_Newb Excel Discussion (Misc queries) 1 July 20th 09 09:41 PM
To sum by grouping Dan Excel Discussion (Misc queries) 1 January 15th 09 01:51 AM
Grouping Adrian Excel Worksheet Functions 2 April 2nd 08 01:41 PM
access partition function [email protected] Excel Worksheet Functions 3 February 5th 07 01:38 PM
how to format ntfs partition Zubair Alam Charts and Charting in Excel 0 April 29th 05 10:12 PM


All times are GMT +1. The time now is 03:39 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"