$m$ balls are thrown at a total of $n$ bins. Each ball will fall into exactly one randomly chosen bin with each throw. What is the probability that each bin is hit at least once (contains at least one ball in the end)?
It's easy to calculate the probability that a single bin is hit at least once, but this disregards the possibility that some bins are never hit. Therefore I'm not sure how to approach this. I've done some enumeration on small problem sizes to get testcases, but I can't figure out how to calculate this algebraically:
3 bins, 3 throws: 6 of 27 (22.2%)
3 bins, 4 throws: 36 of 81 (44.4%)
3 bins, 5 throws: 150 of 243 (61.7%)
3 bins, 6 throws: 540 of 729 (74.1%)
3 bins, 7 throws: 1806 of 2187 (82.6%)
3 bins, 8 throws: 5796 of 6561 (88.3%)
3 bins, 9 throws: 18150 of 19683 (92.2%)
3 bins, 10 throws: 55980 of 59049 (94.8%)
3 bins, 11 throws: 171006 of 177147 (96.5%)
3 bins, 12 throws: 519156 of 531441 (97.7%)
4 bins, 4 throws: 24 of 256 (9.4%)
4 bins, 5 throws: 240 of 1024 (23.4%)
4 bins, 6 throws: 1560 of 4096 (38.1%)
4 bins, 7 throws: 8400 of 16384 (51.3%)
4 bins, 8 throws: 40824 of 65536 (62.3%)
4 bins, 9 throws: 186480 of 262144 (71.1%)
4 bins, 9 throws: 186480 of 262144 (71.1%)
4 bins, 10 throws: 818520 of 1048576 (78.1%)
4 bins, 11 throws: 3498000 of 4194304 (83.4%)
4 bins, 12 throws: 14676024 of 16777216 (87.5%)
Thanks to the hint with the Coupon Collector's problem I was able to figure out how to calculate that. Python code:
Thanks again for your help!