Online Course Discussion Forum

Combinatorics question

 
 
WangJialin的头像
Combinatorics question
WangJialin - 2022年11月7日 Monday 21:51
 

If you have 5 numbered balls and 5 numbered boxes, then there are 5^5=3125 ways of putting them in the boxes. However, if you first do stars and bars and then determine what the balls' numbers are, the answer is (5+5-1)C5*5!  = 15120, which is not 3125. Where did the overcounting happen?

 
WangDr. Kevin的头像
Re: Combinatorics question
WangDr. Kevin - 2022年11月8日 Tuesday 09:45
 

If a few balls are in the same box, their order does not matter.  That's why it is not simply $5!$ in each case, and that is also why stars and bars cannot apply when the balls are distinguishable.