Number of ways to place n balls into m boxes

  • Context: Undergrad 
  • Thread starter Thread starter KFC
  • Start date Start date
  • Tags Tags
    Balls
Click For Summary

Discussion Overview

The discussion revolves around the combinatorial problem of determining the number of ways to place n indistinguishable balls into m distinguishable boxes, allowing for empty boxes. Participants explore different counting methods and expressions for this scenario, including specific cases and general formulas.

Discussion Character

  • Exploratory
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant initially proposes that the number of ways to place 2 balls into 3 boxes is 9, based on the assumption that each ball can be placed independently in any box.
  • Another participant points out that this approach overcounts the arrangements by treating the balls as distinguishable and suggests a binary sequence method for counting arrangements without order.
  • A third participant introduces the concept of multinomial coefficients and references a formula involving combinations: {m+n-1} choose {n} as the correct expression for the problem.
  • Some participants reiterate the formula (m+n-1)! / (n! * (m-1)!) as the correct answer, emphasizing its derivation from combinatorial principles.
  • There is a discussion about the confusion regarding the application of the formula when empty boxes are allowed versus when they are not, with one participant expressing difficulty in understanding the deduction of the formula for the case with empty boxes.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the initial counting method, with some agreeing on the correct formula while others express confusion about its derivation. Multiple competing views on the counting methods and interpretations remain present throughout the discussion.

Contextual Notes

Some participants' reasoning relies on assumptions about the distinguishability of balls and boxes, which may not align with the problem's requirements. The discussion includes unresolved mathematical steps and varying interpretations of the problem's conditions.

Who May Find This Useful

Individuals interested in combinatorial mathematics, particularly those exploring problems related to partitions and distributions in discrete mathematics.

KFC
Messages
477
Reaction score
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 m^n

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?
 
Physics news on Phys.org
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:
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
 
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
 
answer is (m+n-1)¡ just like somebody sad.
n¡*(m-1)¡
 
answer is (m+n-1)¡ just like somebody sad.
. n¡*(m-1)¡
 
answer is (m+n-1)¡/n¡*(m-1)¡ just like somebody sad.
.
 
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
 

Similar threads

  • · Replies 29 ·
Replies
29
Views
5K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 22 ·
Replies
22
Views
3K
  • · Replies 22 ·
Replies
22
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K