Number of ways to divide $n$ people into $2$ distinct groups, with at least $1$ member in each

combinatorics

This question was inspired by this programming problem.

The question is:
Find the number of ways to divide $n$ people into $2$ groups $A$ and $B$ such that each group has at least one member.

The accepted answer is:
$2^n -2$

I think the answer to this problem should have been:
$2 * {n \choose 2} * {2}^{n-2}$

Please correct me if i am wrong.

Best Answer

It sounds like the reasoning behind your argument is as follows: since each group needs at least one person, use ${n\choose 2}$ to choose those two people, sort them into groups in one of $2$ ways, and then use $2^{n-2}$ to decide where the rest of the people should go. Here's the problem with that argument: the two people you chose at the beginning are not special, but are made special by your count. My faulty argument said to "choose those two people", but those two people chosen did not have to be anyone in particular, as long as we they were put into different groups.

For example, say $n=4$. One way to sort the groups would be to put $A$ and $B$ in group $1$, and $C$ and $D$ in group $2$. Your counting method would count this arrangement $4$ times. Your ${n\choose 2}$ could pick $A$ and $C$, then your method would put them in groups $1$ and $2$ respectively and distribute the rest of the people. However, it could also pick $A$ and $D$ and do the same, as well as for $B$ and $C$, and $B$ and $D$. This counts the same group multiple times because it treats the two people you chose at the beginning as being special, when they're not. That said, your argument does solve a similar, but different counting problem: given $n$ people, count the number of ways to divide them into two distinct groups, where each group has a leader.

To get the correct answer, ask yourself the following: how many ways are there to divide $n$ people into two groups? How many ways of doing that fail to satisfy the condition that each group is nonempty?