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?


1 Answer 1


The structure of the argument is good, as are most of the details. However, there are $2^n$ ways to distribute $n$ distinct coloured balls among the last two cells. (Your calculations used $n^2$.)

Remark: If this is a homework question, it might be worthwhile to get clarification. One could interpret the wording as meaning that each of the first $n-2$ cells has at least one white and at least one coloured. I think your interpretation is the most reasonable one, but the "each" interpretation is possible.

  • $\begingroup$ Nicolas: Sir, do you have a minute to check one of my answers? You could deny if you are busy. I am not in the academic circle to discuss this and hence the reliance on you. $\endgroup$ Jul 3, 2016 at 15:05
  • $\begingroup$ @satishramanathan: I can have a look at it, if you provide a link, or a clear description in a comment. However, comments can be unsuitable for typing symbol-heavy material. $\endgroup$ Jul 3, 2016 at 15:15
  • $\begingroup$ @Nicolas, Here is the solution that I posted that needs a check. math.stackexchange.com/questions/1837120/…. The OP's question is not all that clear. Especially when he say in "each" jar. Barring that, the comments have been in different direction. Also, the question stem makes some one think if the OP is meaning it to be two different distinguishable balls to be in there in at least one jar. Please take a look at it and see if my solution fits the bill. Although none of the answer choices equate to mine. Hence not sure!! $\endgroup$ Jul 3, 2016 at 15:21
  • $\begingroup$ @satishramanathan: I have taken a preliminary look. My interpretation would be "at least $2$ balls, and you have chosen a different one. Also, the possibilities counted by Stars and Bars are not equally likely. To solve the problem, one should probably use one of the standard approximations to the birthday problem, likely the Poisson approximation. I think the Wikipedia article has a partial discussion. This is only a preliminary response, I should check whether one can expect your approach to give a ballpark approximation. $\endgroup$ Jul 3, 2016 at 15:42
  • $\begingroup$ So, I must accept the OP indeed meant a different version of birthday problem. Secondly, I knew that stars and bars possibilities are not equally likely. But for a problem like this with $10^6$ jars, you could use an approximation like the one I have done. Thanks for answering, I shall go back and read up on the poisson approximation in Wikepedia to answer this question. Thanks for your time. Really appreciate. I reserve my requests to you often times. Only at times when I am unsure about a solution to a complex problem, do I tend to "disturb"!! you. Thanks Sir $\endgroup$ Jul 3, 2016 at 15:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.