Small ball and box problem summary
1. Put n different balls into m different boxes, allow empty boxes, how many kinds of methods are there?
M^n
2. Put n different balls into the same box of M, no empty boxes are allowed, how many kinds of methods are there?
S2 (n,m) where S2 represents the second class of Stirling numbers
3. Put n different balls into m different boxes, no empty boxes are allowed, how many kinds of methods are there?
M!*S2 (N,M)
4. Put n different balls into M-identical boxes, allow empty boxes, how many methods are there?
Bell number
5. Put n the same ball into m different boxes, allow empty boxes, how many kinds of methods are there?
C (n+m-1,m-1)
6. Put n the same ball into m different boxes, no empty boxes are allowed, how many kinds of methods are there?
C (n-1,m-1)
7. Put n the same ball into m the same box, not allowed empty box, how many kinds of method?
Dynamic planning
P (N,M)
which
P (n,m) =sigma (K=1~m,p (n-m,k))
P (k,1) =p (k,k) = 1;
8. Put n same ball into m same box, allow empty box, how many kinds of methods are there?
P (n+m,m) p represents the same as the meaning
Proof See:
Http://www.docin.com/p-507599602.html
Small ball and box problem summary