What is the total number of ways to distribute n distinguishable balls into n distinguishable boxes such that the total number of balls in each box can vary?

This is a really easy problem if specified that there are certain number of balls in a particular box.

One way to do this is assuming the number of balls in each box and then adding all such possibilities.

But what if both the number of balls and number of boxes is large?

  • $\begingroup$ What is the question? $\endgroup$
    – Marc
    Sep 6 '16 at 17:24
  • $\begingroup$ Reframed the question $\endgroup$
    – kgkmeekg
    Sep 6 '16 at 17:29

Each ball can be placed in one of $n$ boxes and thus gives $n$ possibilities. Since we have $n$ balls in total, the total amount of ways to distribute them is $n^n$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.