Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Counting balls in boxes

  1. Feb 15, 2010 #1
    1. The problem statement, all variables and given/known data


    How many ways can you divide up 20 distinct balls into 5 distinct boxes so that no box contains more than 10 balls?

    2. Relevant equations
    This is similar to another problem in which we have to find the number of ways to divide up r balls into k boxes.

    [tex]x_1+x_2+x_3+\ldots+x_k = r[/tex] where each [tex]x_i \geq 0[/tex]

    This is equal to [tex]\binom{r+k-1}{k-1}[/tex]

    If, we set a lower-bound on the number of balls in boxes, say, each box must contain at least [tex]s[/tex] balls, then the answer is: [tex]\binom{r-s+k-1}{k-1}[/tex].

    My question is: How do I go about setting an upper-bound for the number of balls in each box?

    3. The attempt at a solution

    In my problem, I have to find the solutions for:
    [tex]x_1+x_2+x_3+x_4+x_5 = 20[/tex] such that each [tex]x_i \leq 10[/tex]

    I am unsure how to start or approach this problem. Any help would be greatly appreciated.
  2. jcsd
  3. Feb 16, 2010 #2
    bump, can anybody help?
  4. Feb 24, 2010 #3
    I'm not sure what this notation means:


    Firstly work out how many ways there are to put 20 different balls in 5 different boxes, this is a nice easy bit of stats you can look up on wiki (combinations/permutations). Once you have this number you need to take away all the permutations where there are more than 10 balls in a box, slightly more challenging :)
  5. Feb 24, 2010 #4

    It's another way of writing [tex]


  6. Feb 24, 2010 #5

    Makes sense!
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook