PDA

View Full Version : Permutations/combinations problem

nelo_supra_ripmax
2011-07-15, 12:00 AM
Hi there,

I have a problem in which I have to list all the possible combinations of a series of numbers starting with 1 and going to 12, or 15, for example. I need to list all the possible combinations using any 2, 3, 4 or 5 of those numbers. Furthermore, a number can only be used once in a combination, so for example, I couldn't have 1,2,3,4,4 as 4 is being used twice.

For example, using 12 different numbers in 3-number combinations:
1,2,3
1,2,4
1,2,5
...
1,2,12
1,3,2
1,3,4
1,3,5
...
1,3,12
...
10,11,12
10,12,11
11,10,12
11,12,10
12,11,10
12,10,11

The ordering of the different combinations isn't important, I just need to all possibilities. I have investigated the permutation function in Excel, but it just lists how many permutations there are - this is of no use to me. - Have I made my problem clear?

Can anyone help me on this? I've been struggling over it for days but am sure there is an easy fix out there somewhere. Possible someone else has even had the same problem in the past...?