I got stuck with a question stating "let there $n\ge2$ and $n\in N$. in how many ways can you distribute $n$ colorful balls (different) and $n$ white balls (similar) to $n$ cells, such that in the first $n-2$ cells there's at least one white ball and at least one colored ball?"
this is what I did, would appreciate your advice if I did it correctly or not:
- by using the complementary method - let's evaluate in how many ways can we distribute all the balls without any limit - there're $\binom{2n-1}{n-1}$ ways to distribute the white balls and $n^n$ ways to distribute the colored balls. in total $n^n* \binom{2n-1}{n-1}$
- let's evaluate the rest ("bad possibilities") - the bad possibilities would be there isn't a white ball in the first n-2 cells$\lor$there isn't a colored ball in the first n-2 cells =
there isn't a white ball in the first n-2 cells + there isn't a colored ball in the first n-2 cells - neither colored either white ball in the first n-2 cells
=> then accordingly the number of options: $\binom{n+1}{2}n^n$, $n^2 \binom{2n-1}{n-1}$, $n^2 \binom{n+1}{2}$.
- then in total: $n^n \binom{2n-1}{n-1} - [\binom{n+1}{2}n^n + n^2 \binom{2n-1}{n-1} - n^2 \binom{n+1}{2}]$
$$$$ what do you think?