Hi - I am trying to figure out if there is a way to set up an excel sheet so that it lists all of the different ways x numbers can be combined in a comprehensive way. I know that's a little unclear so here is an example assuming x = 4.
1 2 3 4
12 3 4
12 34
13 2 4
13 24
14 2 3
14 23
123 4
124 3
134 2
1 234
1234
1 23 4
1 24 3
1 2 34
1 234
12 34
Maybe easier to see with brackets denoting numbers that a paired together:
[1] [2] [3] [4]
[12] [3] [4]
[12] [34]
[13] [2] [4]
[13] [24]
[14] [2] [3]
[14] [23]
[123] [4]
[124] [3]
[134] [2]
[1] [234]
[1234]
[1] [23] [4]
[1] [24] [3]
[1] [2] [34]
[1] [234]
[12] [34]
Each of the above rows includes all of numbers 1,2,3,4, with no duplicates of any number in a row, and different combinations of individual vs. linked numbers are distinct combinations. I think this is a comprehensive list for x=4 but I may have missed some. Doing this manually becomes increasingly onerous for x>4.
Is there a way to produce a list of these combinations in excel? Obviously understand there is likely an upper limit because the # of possible combinations grows exponentially, but is it possible for x=7 for example?
Bookmarks