0

Find the probability that all $k$ bins are filled, if each of $n≥k$ balls are randomly placed into one of the $k$ slots.

I have solved the above question using PIE where I take the complement ($1$ - $P($bin_1 is empty or bin_2 is empty ... or bin_k is empty$)$) to get $1$ - $\sum_{i=1}^{k}$$\binom{k}{i}$$(-1)^{i+1}$$(\frac{k-i}{k})^{n}$.

But, my initial intuition was to look at the event where $n=k$, in which case the answer to the question is $\frac{k!}{k^{n}}$. But, I am not able to figure out how to use this approach to solve for the scenario where $n>k$. My thought process was to start off the same way as I did for $n=k$, and then each remaining ball can go in any of the $n$ bins, which means there is a $100%$ chance of the remaining balls being matched to the bins. However, I know I am not accounting for some of the counting and arrangements of which balls get placed in which bins for the first time. May someone provide insight on how to solve this question using casework without PIE as I was trying here, as well as any advice on how to know what method to use for these types of questions? I usually am unsure how to approach it and only switch ways if I notice something is taking too long as I am new to PIE. Thanks.

Henry
  • 169,616
as1092
  • 13
  • The is a coupon-collector type problem. There is a solution using Stirling numbers of the second kind, namely $\dfrac{k!, S_2(n,k)}{k^n}$. For example with $n=10$ and $k=5$ you have $S_2(10,5)=42525$ and so a probability all $5$ bins are filled of $\dfrac{120\times 42525}{9765625} =0.5225472$. – Henry Sep 04 '23 at 09:52
  • But note that the standard way to get the formula for those Stirling numbers is to invoke Inclusion-Exclusion. I don't think you can do it any other way, in general. – Gerry Myerson Sep 04 '23 at 11:26
  • 1
    @GerryMyerson Alternatives include a simple positive recursion $S_2(n,k) = k,S_2(n-1,k)+S_2(n-1,k-1)$ and an exponential generating function plus some approximations of varying quality. – Henry Sep 04 '23 at 13:08
  • @GerryMyerson Why can't my initial thought process work? I start off the same way as I did for $n=k$. Then, any of the remaining balls can go in any of the bins and the situation will still be satisfied. Then, all I have left to do is find the number of combinations of choosing $n$ balls into $k$ bins, right? I know this is incorrect, but can someone point to what's wrong with my logic here? – as1092 Sep 05 '23 at 07:04
  • The method you describe is wrong because it over-counts. Here is an explanation for a slightly different problem which also applies to your question: https://math.stackexchange.com/a/4762482/177399 – Mike Earnest Sep 05 '23 at 15:18

0 Answers0