Given a list of elements I need all possible pairings of elements with a leading factor that describes the number of permutations. A (ugly but) working version would be:
list = {a, b, c, d};
res = DeleteDuplicates[
Map[Sort, Map[Partition[#, 2] &, Permutations[list]], 2]]
factor = Map[Signature, Map[Flatten, res]]
that gives the desired
res = {{{a, b}, {c, d}}, {{a, c}, {b, d}}, {{a, d}, {b, c}}}
with factors of
factor = {1, -1, 1}.
As this solution scales catastrophically for larger lists, I am looking for ways to speed computation up.