Number of ways to place n balls into m boxes

  • Thread starter KFC
  • Start date
  • Tags
    Balls
In summary, the conversation discusses the number of ways to place 2 balls into 3 boxes, with the assumption that all balls are the same and an empty box is allowed. The speaker initially thinks there are 9 ways, but the correct answer is 6. The correct expression for this case is {m+n-1} choose {n}. The conversation also mentions a general formula for calculating the number of possible combinations, which is {m+n-1} choose {n}. However, the speaker is unsure of how to deduce this formula when empty boxes are allowed.
  • #1
KFC
488
4
Let's consider a simple case with 2 balls and 3 boxes. Assuming all balls are the same and empty box is allowed. In addition, each box can take any number of ball. How many ways are there to place the balls into the boxes?

Here is my way to solve the problem. For the first ball, there are 3 ways to do so. For the second ball, still 3 ways. So total 9 ways to place 2 balls into 3 boxes. For the general way, my conclusion is [tex]m^n[/tex]

But the answer is

2 0 0
0 2 0
0 0 2
1 0 1
0 1 1
1 1 0

There are only six ways. So what's wrong with my analysis? And what's the correct expression for this case?
 
Mathematics news on Phys.org
  • #2
You are overcounting. When you say:

For the first ball, there are 3 ways to do so. For the second ball, still 3 ways.

You are distinguishing the balls. The correct way of counting this type of problems, with repetition but without order is like this (the two 0's separate the three boxes):

1100, 0110, 0011, 1010, 1001, 0101

In the general case, this is counting the number of length n binary sequences with exactly k 0's and there is a well-known expression for this.
 
Last edited:
  • #3
Last edited by a moderator:
  • Like
Likes yjjiang
  • #4
we can colocated the first ball at box 1, box 2 or box 3. Then you can put the second ball at box 1 box 2 or box 3, so, for one ball, you have 3 options, and are 2 ball. to generalize, if you have n balls, and m positions for each ball, the posibles combinations are equal to product m.n and you can verify than 2.3=6
 
  • #5
Little ant said:
we can colocated the first ball at box 1, box 2 or box 3. Then you can put the second ball at box 1 box 2 or box 3, so, for one ball, you have 3 options, and are 2 ball. to generalize, if you have n balls, and m positions for each ball, the posibles combinations are equal to product m.n and you can verify than 2.3=6
Thanks for your reply. But base on your reasoning, if I have 3 boxes and 4 balls, there are 3*4 = 12 ways to place the balls? But the answer if 15
 
  • #6
answer is (m+n-1)¡ just like somebody sad.
n¡*(m-1)¡
 
  • #7
answer is (m+n-1)¡ just like somebody sad.
. n¡*(m-1)¡
 
  • #8
answer is (m+n-1)¡/n¡*(m-1)¡ just like somebody sad.
.
 
  • #9
Little ant said:
answer is (m+n-1)¡/n¡*(m-1)¡ just like somebody sad.
.

Yes. I know the answer. Just find it hard to understand how to get this. For the case when there are N boxes and M balls and no empty box is allowed, it is easy to get the result by considering the way to pick up N from M+1. But for the case allowing empty box, I don't know how to deduce that formula
 

1. How do you calculate the number of ways to place n balls into m boxes?

The number of ways to place n balls into m boxes can be calculated using the formula n^m (n raised to the power of m). This formula assumes that each ball can be placed in any of the m boxes, and that order does not matter.

2. What is the significance of the number of ways to place n balls into m boxes?

The number of ways to place n balls into m boxes is important in various fields such as combinatorics, probability, and statistics. It is used to calculate the probability of specific outcomes in a variety of scenarios.

3. How does the number of boxes affect the number of ways to place n balls?

The number of boxes, m, directly affects the number of ways to place n balls. As the number of boxes increases, the number of ways to place n balls also increases exponentially. This is because with more boxes, there are more possible combinations for the balls to be placed in.

4. Can the number of ways to place n balls into m boxes ever be negative?

No, the number of ways to place n balls into m boxes can never be negative. This is because the formula n^m always results in a positive number, regardless of the values of n and m. Negative numbers have no meaning in this context.

5. Are there any restrictions or assumptions when using the formula for the number of ways to place n balls into m boxes?

Yes, there are some restrictions and assumptions when using the formula. It assumes that each ball is identical and can be placed in any of the m boxes. It also assumes that all the boxes are distinguishable. If these assumptions do not hold, the formula may not accurately represent the number of ways to place n balls into m boxes.

Similar threads

Replies
5
Views
1K
  • Precalculus Mathematics Homework Help
Replies
10
Views
952
Replies
2
Views
2K
Replies
8
Views
2K
Replies
22
Views
3K
Replies
3
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
14
Views
1K
  • General Math
Replies
5
Views
2K
  • General Math
Replies
3
Views
3K
Replies
31
Views
3K
Back
Top