1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How many ways can you arrange 5 identical balls into 4 boxes?

  1. Sep 23, 2011 #1
    1. The problem statement, all variables and given/known data
    Say you have 5 identical balls. You want to put them into 4 different boxes. What is the total number of ways the balls can be arranged?

    For example, you could have all 5 balls in one box. You could have 3 balls in one box and 2 balls in another, etc.


    2. Relevant equations



    3. The attempt at a solution
    Since the balls are identical, order doesn't matter and this is a combination. So I drew it out, and figured out the correct number of ways - basically by doing a tree diagram.

    But what I'm actually trying to figure out is what the equation looks like. I want to generalize it so that it works for m boxes and n balls, so I thought I'd make up a more concrete example to help me.
     
  2. jcsd
  3. Sep 24, 2011 #2
    In questions like these, it's good to consider one ball at a time:

    Take one ball, how many possible options are there? Four, since there are four boxes in which it could be placed.

    Take the second ball, how many possible options are there? Four again. So in total, for the two balls, I have 4 x 4 = 16 different combinations.

    If you keep going, what do you end up with?
     
  4. Sep 24, 2011 #3

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    That is, of course, for "distinguishable boxes". If the boxes were NOT distinguishable, that is if "3 balls in boxe A and 2 balls in box B" were counted as only one way, divide by 5!.
     
  5. Sep 24, 2011 #4

    Hurkyl

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    The wrong answer -- your method would work for distinguishable balls (and distinguishable boxes). However, the following two sequence of choices are the same outcome in the problem:

    • 11234
    • 43211

    In problems like these, once you think you have a way to model the actual problem with descriptions you can count, it's usually a good idea to actually check the two sets are bijective: every actual outcome corresponds to some description, every description corresponds to some outcome, and that the two correspondences are actually inverses.

    For your method, if you thought about how to turn an outcome into a description, you probably would have noticed the problem.

    But now that I've thought about it, it gives me an idea... (@ the opening poster) the answer is 56, right?

    (... process the idea ... remove a redundant part ...)

    Lay the five balls out in a row:
    * * * * *​
    Now, the first box begins on the left. Put a mark '|' in the space where the first box ends and the second box begins, and so forth. 3 marks in all.

    Edit: Oh, hrm, it might have been even better to invert that: put the box edges in:
    | | |​
    and now add 5 '*' marks in the spaces where the balls go.
     
    Last edited: Sep 24, 2011
  6. Sep 24, 2011 #5

    ehild

    User Avatar
    Homework Helper
    Gold Member

    This is exactly the way as "combination with repetitions" is explained in books. :smile: And the result is indeed 56.


    ehild
     
  7. Sep 24, 2011 #6

    uart

    User Avatar
    Science Advisor

    I'm not sure from some of what the OP said that the boxes are even distinguishable? (jumbogala you need to clarify this).

    So the answer may be 56, but then again it might be just 6.
     
  8. Sep 24, 2011 #7

    phinds

    User Avatar
    Gold Member
    2016 Award

    I'm going with 6 based on the wording of the problem.
     
  9. Sep 25, 2011 #8
    Sorry everyone, the boxes are distinguishable.

    I believe the result is 56 then.
     
  10. Sep 25, 2011 #9

    ehild

    User Avatar
    Homework Helper
    Gold Member

    You are right. You can imagine that the boxes are ordered in a row, box 1 first, then box 2, and so on along with the balls, but the walls of the boxes can be placed at different positions, and the walls are indistinguishable, as Hurkyl explained in post 4. There has to be one wall at the front and one wall at the end, so you can set tree walls. You have then arrangements of 3 indistinguishable walls and 5 indistinguishable balls, these are permutations of 8 elements, from which 3 is one kind and 5 is an other kind.

    ehild
     
  11. Sep 25, 2011 #10
    Thanks everyone! This makes a lot of sense. I understand now =)

    A general formula would then be (n + m -1 )! / (n!)(m-1)!

    Where n = number of indistinguishable balls, and m = number of distinguishable boxes.
     
  12. Sep 25, 2011 #11

    ehild

    User Avatar
    Homework Helper
    Gold Member

    Very good! You are :cool:! I needed very long time to understand these problems first, and after a couple of years, I have to think very hard to understand it again.

    ehild
     
  13. Sep 27, 2011 #12
    I can come up with 96 distinct combinations!
     
  14. Sep 27, 2011 #13
    Scratch that ... make it 126 distinct combinations!

    (That is, assuming the boxes can be individually identified)
     
    Last edited: Sep 27, 2011
  15. Sep 27, 2011 #14
    Pardon me, I incorrectly red "5 boxes!"
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook