Unique combinations of 4 numbers between 1 to " N"

  • Thread starter Thread starter Googler
  • Start date Start date
G

Googler

I need a formula or Excel spreadsheet that will do the following:
Create a list of unique sets of 4 numbers from a super set of numbers
1,2,3,4 etc. to "N". No set of 4 numbers within the subset can
repeat itself. Example of a valid set would be (1,25,42,31). An
invalid set would be (1,51,42,25) since previous set already consisted
of 42 and 25. There is a finite number of unique sets based on "N".
For purposes of this request, I do not envision "N" ever being more
than 100. The practical reason for this is to schedule periodic
dinner groups of 4 couples each so that no two couples will be at the
same dinner until all combinations have been scheduled.
TIA
 
Googler said:
I need a formula or Excel spreadsheet that will do the following:
Create a list of unique sets of 4 numbers from a super set of numbers
1,2,3,4 etc. to "N". No set of 4 numbers within the subset can
repeat itself. Example of a valid set would be (1,25,42,31). An
invalid set would be (1,51,42,25) since previous set already consisted
of 42 and 25. There is a finite number of unique sets based on "N".
For purposes of this request, I do not envision "N" ever being more
than 100. The practical reason for this is to schedule periodic
dinner groups of 4 couples each so that no two couples will be at the
same dinner until all combinations have been scheduled.

There are over 3.9 million comninations of 4 items out of a population of
100. If the typical couple in your population eats only one dinner a day,
and they live normal lifespans of 80 years, of which only 55 years would be
as a couple, so approx. 20,100 dinners as a couple in their lifetime. I
don't think you need all the combinations.

If you want all combinations of 4 items from a larger population, you could
adapt the methodology in

http://groups.google.com/[email protected]
 
Back
Top