Recent content by Bata

  1. B

    I Ways to put n balls in m boxes such that exactly k boxes are empty?

    I know it's not important, but for completeness I'd like to point out the flaw in this. (I skipped this post the first time since I stopped reading once I noticed the mistaken assumption of equal probabilities.) Not only do you not want to put any more balls in the k boxes, but you want to...
  2. B

    I Ways to put n balls in m boxes such that exactly k boxes are empty?

    Anyway, I have concluded that my formula is indeed correct, as it matches with all the cases listed out by @pbuk. Here is my code: from math import factorial, comb def NoneHaveL(m, n, L): upperbound = min(m, n//L) if L != 0 else m def expression(i): if n-i*L < 0: # I don't...
  3. B

    I Ways to put n balls in m boxes such that exactly k boxes are empty?

    Perhaps it is because I'm new to programming (I had to research the language and functions) but tracing the logic of your code took some mental effort. (It didn't help that I didn't at first notice that you swapped the meaning of n and m.) I do understand the meaning/flow of each piece now...
  4. B

    I Ways to put n balls in m boxes such that exactly k boxes are empty?

    It may not mean much, but you have earned my respect. It unfortunately seems far too rare that people willingly admit to a mistake. I value integrity more than clear thinking. Much respect. I have not, but I have just added that to my to do list; thanks. I’m taking my first class on...
  5. B

    I Ways to put n balls in m boxes such that exactly k boxes are empty?

    Lol sure let me cite some references for my opinions in the future. Look, I’m sorry if I seem to have offended you. I am an undergraduate student giving my obviously limited perspective. How you feel about me saying “for the most part” is exactly how I felt about your use of the word...
  6. B

    I Ways to put n balls in m boxes such that exactly k boxes are empty?

    I randomly realized the solution is actually not as messy as I originally thought. (This is because I was trying to simplify it via probabilities instead of using direct counting.) I will now explain the solution. Let me re-state the generalized problem: Find the number of ways that n balls...
  7. B

    I Ways to put n balls in m boxes such that exactly k boxes are empty?

    If one wants to know how many different ways identical balls can be distributed in some boxes, then “stars and bars” is an elegant counting trick. A few similar (but contrived) problems can be reduced to parts involving that trick. For the most part though, there are many questions one could...
  8. B

    I Ways to put n balls in m boxes such that exactly k boxes are empty?

    I am content that the general problem is effectively solved but that the solution is messy. I explained in more detail but accidentally deleted it. The point is that it doesn’t simplify cleanly unless ##\ell = 0##. Thank you @PeroK for your time and insight.
  9. B

    I Ways to put n balls in m boxes such that exactly k boxes are empty?

    I suppose we can try to solve it the same way I solved it in the ##\ell=0## case, that is: $$N_{\ell}(n,m,0) = m^n(1-P(1_{\ell} \text{ or } 2_{\ell} \text{ or } \dots \text{ or } m_{\ell}))$$ Where ##i_{\ell}## is the proposition that the ##i ^{th}## box has exactly ##\ell## balls. Of course...
  10. B

    I Ways to put n balls in m boxes such that exactly k boxes are empty?

    @PeroK What about the more general question, “how many ways to put n balls in m boxes so that exactly k boxes contain exactly ##\ell## balls?” Define ##N_{\ell}(n, m, 0)## as the number of ways to distribute n balls in m boxes so that none of the boxes have exactly ##\ell## balls. Just as in...
  11. B

    I Ways to put n balls in m boxes such that exactly k boxes are empty?

    It’s no worries you didn’t have time to read my post but I did essentially calculate that theorem in my OP: I neglected to mention the fact that ##P(E_0)= 1-P(L_1)## which gives the theorem 5.2 divided by (# boxes)^(# of balls) I see. This is basically my third attempt (it is very brief if...
  12. B

    I Ways to put n balls in m boxes such that exactly k boxes are empty?

    Good! That’s exactly what I first thought. It was a (pretty famous) author who made that assumption in a problem which led me down this rabbit hole of trying to solve for ##P(E_k)## to see if their assumption was valid and the dependencies somehow canceled out. They did not even mention the...
  13. B

    I Ways to put n balls in m boxes such that exactly k boxes are empty?

    Secondary question: Are we guaranteed to have the expected number of empty boxes be the same as m times the probability that any particular box is empty? That is, will we find the following to be true? $$ \sum _0^m kP(E_k) = m(1-1/m)^n $$ It seems reasonable, but how can we properly justify it?
  14. B

    I Ways to put n balls in m boxes such that exactly k boxes are empty?

    I made this question up so I have no guarantee that there is a clean answer. It seems like there should be a simple approach though, I’m just not seeing it. First attempt: Find the chance that only the first k boxes are left empty. Then we can multiply by ##{n \choose k}## to get the total...
Back
Top