# Distinguishable objects into distinguishable boxes where number of balls in each box varies

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?

• What is the question?
– Marc
Sep 6 '16 at 17:24
• Reframed the question 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$.