[Math] Number of way $5$ people can be divided into $3$ groups

combinationscombinatoricspermutations

The question asks the number of ways to divide $5$ people into $3$ groups with no conditions attached. (In case people think this is a duplicate).
I have studied both grouping and distribution in combinatorics but I often get confused where to apply what. Anyway, I digress.
My First Approach:
The first thing I did was to assign variables. Let the first, second and third groups be $x_a, x_b $ and $x_c$. Now $$x_a + x_b + x_c = 5$$
I solved this by partitioning $5$ in $3$ ways, that is $\binom {n+r-1}{r-1} $ where $n = 5, r=3$ giving us,
$$\binom{7}{2}= 21$$
The answer, however, is given as $25$.

Please tell me where I'm going wrong and also could someone advise me on when to use partitioning and when to make groups if the group size is not given.

Best Answer

Assume that the groups are interchangeable, so that the division $(A,B),(C,D),(E)$ is the same as the division $(C,D),(A,B),(E)$ and assume that you don't allow empty groups.

The maximal group has to have either $2$ or $3$ members.

Case I: (maximal group has $3$ members). Then the counts must be $\{3,1,1\}$ and the division is determined by the members in the group of $3$. Hence there are $$\binom 53=10$$ divisions of this type.

Case II: (maximal group has $2$ members). Then the counts must be $\{2,2,1\}$. Then there are $\binom 52=10$ ways to populate one group of two, and then $\binom 32=3$ to populate the other. As switching the two groups of two does not change the division we see that there are $$\frac {10\times 3}2=15$$ divisions of this type.

Combining we see that there are $$10+15=25$$ possible divisions.