Home |
Search |
Today's Posts |
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I didn't conclude that he wanted the most frequent total. I thought he
wanted to be able to vary all 3 parameters -- number range, size of set, and desired total. But you may be correct. "Dana DeLouis" wrote in message ... I don't have an answer, just an observation... With the range of numbers 1-10 (Instead of 1-49), and you take all combinations of 6: The smallest combination total is 21 (1,2,3,4,5,6), and occurs only once. The Largest combination total 45 {5, 6, 7, 8, 9, 10}, and also occurs once. The average of these two numbers (21+45)/2 is the number that occurs the most often. The answer here is 33. In a range of 10 numbers taken 6 at a time, a total of 33 occurs the most. If the Range is 1-49, taken 6 at a time, the total that occurs the most often is: (21 + 279)/2 150 It appears the op is asking about the total count of the sum that occurs the most often. The brute force method generates many combinations. Instead, I looked at the total of combinations from a smaller range of numbers. First, Range 1-6, and made permutations of 6 (basically just one solution) then Range 1-7, Range 1-8, etc I did this quickly for the range 1-(6-20) The number that occurs the most (when grouped as 6 numbers) generated the following sequence. {1, 1, 4, 8, 18, 32, 58, 94, 151, 227, 338, 480, 676, 920, 1242, 1636} Apparently, this is a know integer sequence (A001977). The bad news is that it does not give the generating function directly. It is listed as a form of "Restricted partitions." http://www.research.att.com/cgi-bin/...i?Anum=A001977 Maybe someone with more knowledge can shed some light on this. I have never seen a result listed like this before, so this would be new to me. Harlan? Tushar? The program Mathematica has the function PartitionsP, which I am sure your Maple program does also: Information[PartitionsP] "PartitionsP[n] gives the number p(n) of unrestricted partitions of the integer n." Attributes[PartitionsP] = {Listable, Protected} Here are the first few terms... Table[PartitionsP[n], {n, 0, 15}] {1, 1, 2, 3, 5, 7, 11, 15, 22, 30, 42, 56, 77, 101, 135, 176} It looks like this function fits in somewhere, but I do not know enough about it. I don't see any pattern. Harlan? Tushar? -- Dana DeLouis Using Windows XP & Office XP = = = = = = = = = = = = = = = = = "TwIsTeEeR" wrote in message able.rogers.com... From a set of integers from 1 to 49, take 6 unique integers, that if we sum them up, this sum is equal to 150. Conditions: 1. The set numbers are integers from 1 to 49 2. subset size is 6 3. sum of the selected subset numbers is 150 My questions: A. How many sets (combinations) of 6 unique numbers exist that their sum is 150? B. Do you know of a function that can calculate that quantity of combinations, for different values of conditions (1), (2), & (3)? Thank you, |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
combinations | Excel Discussion (Misc queries) | |||
Sum of combinations | Excel Discussion (Misc queries) | |||
Possible Combinations | Excel Discussion (Misc queries) | |||
Combinations | Excel Worksheet Functions | |||
count combinations | Excel Discussion (Misc queries) |