Small ball and box problem summary

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.