I would like to do the following:
Suppose there is a list {a, b, c, d}
. I would like to get all distinct exhaustive combinations of its sublists of a certain length, so for this specific list I would like to get
{ {a, b}{c, d} , {a, c}{b, d} , {a, d}{b, c} }.
Now suppose I have multiple such lists, and I would like to do this operation on each of them. How should we do this?
The result does not have to be a list object of sublists; as long as it is clear how elements are paired anything is fine.
DeleteDuplicates[Sort[#] & /@ Permutations[{a, b, c, d}, {2}]]
. $\endgroup$ – JimB Jul 13 '17 at 18:26