It is an extension of this problem - Super set in a list:
Getting all possible combinations from a list of numbers
This helps, but returns all sub-sets: http://rosettacode.org/wiki/Power_set#C.23
But what I need is to retrieve only the sub-sets that have a fixed number. I.e. say my list is a collection of numbers:
1 2 3 4 5 6
I only want the different combinations for an exact 4 numbers, i.e. 1,2,3,4 1,2,3,5 1,2,3,6 1,3,4,5 1,3,4,6 1,4,5,6 2,3,4,5 2,3,4,6 2,4,5,6 3,4,5,6
I am using numbers as an example, but in my solution I am dealing with other types of objects.