问题 Although there are numerous articles about generating permutations, I have an algorithmic need for permutation that's just a bit different. Given a set of elements (a, b, c, .. n) I construct pairs: (ab), (cd), (ef), ... in any combination of elements. Pairs (ab) and (ba) are identical. Also the needed permutations should not be different only in sequence: (ab), (ef), (cd) is identical to (ef), (cd), (ab) As an example, I'll show the exhaustive list of permutations for 6 elements a, b, c, d,