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?(adsbygoogle = window.adsbygoogle || []).push({});

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?

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Number of ways to place n balls into m boxes

**Physics Forums | Science Articles, Homework Help, Discussion**