June 18, 2010 9:27 AM Subscribe
I have a list of 6 items. I need to make a list of unique combinations where 3 items are taken from the list in any order and the 4th item is also taken from the same list but cannot be one of the 3 items already selected
posted by missmagenta to education (13 answers total)
I hope I'm explaining this ok...
The problem I'm trying to solve is this:
I have 7 slots to fill and a list of 6 items.
The first 3 slots need to be filled with 3 unique items but their order is unimportant (so for the purposes of this A,B,C = B,A,C = C,B,A etc). The remaining 4 slots will be filled with a 4th item and that item cannot be one of the previous 3.
I need to create a list (not just how many) of all the unique combinations of 6 items that meet this criteria. Obviously a computer is going to do the hard work, I just need to tell it how ;)