Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Combinations - multiplied sum of doubles, triples, quadruples.....

Hi. I need to find the multiplied sum of double, triple, quadruple...
combinations in a row, both separately and combined.

e.g.
1 2 3 4
2 5 4 6

doubles (2*5)+(2*4)+(2*6)+(5*4)+(5*6)+(4*6)
triples (2*5*4)+(2*5*6)+(2*4*6)+(5*4*6)
....and so on...

Is there a way to do this in excel?
many thanks


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 690
Default Combinations - multiplied sum of doubles, triples, quadruples.....

e.g.
1 2 3 4


Hi. Others have posted "Permutation" type programs here, and especially
over in the Excel Programming group.
As a side note, if your numbers were consecutive, as in your first
example, then maybe the following...
If you had 1,2,...20, and you wanted to use a Subset size of 2, then
perhaps: (A1 = 20)

=((A1-1)*A1*(1 + A1)*(2 + 3*A1))/24
Returns:
20,615

Other sizes than 2 require different equation.
I know this is not what you want, but your question got me thinking of a
old recurrence problem. I went back and totally rewrote it based on
some new programming ideas.
Given the numbers 1,2,...5000, take all the subsets of size 4. Multiply
each group of numbers, and add them up.
We note that there are Combin(5000,4) = 26,010,428,123,750 such subsets.
I got the time down to 0.0039 seconds. Yeah! :)

Sub TestIt()
Dim t, m, n
m = 5000
n = 4
t = Timer
Debug.Print StirlingFirst(m + 1, m + 1 - n)
Debug.Print FormatNumber(Timer - t, 6)
End Sub

Returns a very large number:

1,016,438,775,060,761,172,309,114,625

0.003906

= = = =
Dana DeLouis

"To understand recurrence, one must first understand recurrence."
= = = =



gotthejazz wrote:
Hi. I need to find the multiplied sum of double, triple, quadruple...
combinations in a row, both separately and combined.

e.g.
1 2 3 4
2 5 4 6

doubles (2*5)+(2*4)+(2*6)+(5*4)+(5*6)+(4*6)
triples (2*5*4)+(2*5*6)+(2*4*6)+(5*4*6)
....and so on...

Is there a way to do this in excel?
many thanks

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
Summarizing doubles Sippan Excel Worksheet Functions 1 June 17th 08 09:05 AM
Sorting doubles rbrunz Excel Discussion (Misc queries) 1 June 13th 08 04:20 PM
Complex Formula to Find Doubles Spike9458 Excel Worksheet Functions 7 January 31st 06 12:53 AM
Cell height doubles after paste PBlake Excel Discussion (Misc queries) 1 October 29th 05 07:57 PM
How do I set up a Doubles Tennis roster for 12 players? AliJax New Users to Excel 3 September 17th 05 12:31 AM


All times are GMT +1. The time now is 04:15 AM.

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"