# Ball selection combinatorics problem

Say I have 9 uniquely colored balls. I want to select them into 3 different groups. Each grouping must contain at least 1 ball, and all the balls must be selected. The first 2 groupings are interchangeable and not distinct from each other, but are distinct from the 3rd group. The order within each group is also important.

E.g. using numbers for the balls: 12-34-56789 and 34-12-56789 are indistinguishable selections, but 56789-12-34 is distinct from those. 21-34-56789 is also different from 12-34-56789

How many different ways to do this are there?

One can attack the problem by breaking it up into a lot of cases. The distinguished group may have $7$ elements, or $6$, and so on down to $1$.
$7$: These can be chosen in $\binom{9}{7}$ ways. The rest of the splitting is determined.
$6$: These can be chosen in $\binom{9}{6}$ ways. Now we need to choose $2$ from the remaining $3$, for a total of $\binom{9}{6}\binom{3}{2}$.
$5$: After choosing the $5$ objects, there is a wrinkle. Either we choose $3$ from the remaining $4$, or we split the remaining $4$ into two groups of $2$. Here it is possible to make a mistake: The splitting can be done in $\frac{1}{2}\binom{4}{2}$ ways. Now multiply $\binom{4}{3}+\frac{1}{2}\binom{4}{2}$ by $\binom{9}{5}$.
$4$: Here after we choose the $4$, there remain an odd number of balls, so things are easier: We get $\binom{5}{4}+\binom{5}{3}$. Multiply by $\binom{9}{4}$.