I am struggling to phrase this as much as I am in calculating it.
Alice
Bob
Carol
Dan
All the combinations of their groups, are 15, since I have 4 singles, 6 doubles, 4 triples and 1 quad. I care about the order (in my unique way), so my total is actually 32, since I have 4 singles, 12 doubles, 12 triples and 4 quads.
The math for this part, I have so far is (before optimizing):
${4\choose 1}*1+{4\choose 2}*2+{4\choose 3}*3+{4\choose 4}+4=32$
I am looking for how to generate a pair of pairs, i.e.:
(Alice + Bob) with (Carol + Dan)
(Alice + Carol) with (Bob + Dan)
(Alice + Dan) with (Bob + Carol)
Note that if Alice dances with Bob, she cannot also dance with Carol at the same time.
In these, the order does not matter. The total should be 3 new combinations, but since each has a permutation, each has a result of 4 permutations, so another 12 total.
The total here for a case of 4 people, are 44 potential groups, which include double pairs.
How to I get the total for 5 people / X people?
EDIT: Within my search for the "all possible combinations of all possible groups with leaders in each group" note that for 5 people, we also have:
"two pairs"
(A + B) with (C + D) and E
and
"a pair and a triple"
(A + B + C) with (D + E)
Given $X\ge 2$ people, we can form $x=\lfloor X/2\rfloor$ pairs, so there are $x$ pair leaders. There are ${X\choose x}$ feasible sets of leaders. For each of these sets there are $(X-x)!$ feasible sets or pairs with given leaders. Indeed, let $l_1,\dots, l_x$ be the leaders. Then there is a bijective correspondence between permutations of non-leaders and feasible sets or pairs with given leaders. Namely, to a permutation $(n_1,\dots,n_{X-x})$ corresponds a set $(l_1,n_1),\dots, (l_x,n_x)$ of pairs.