How many ways are there to distribute N distinguishable balls into k distinguishable boxes?

When distributing things to other things, one has to consider the distinguishability of the objects (i.e. if they're distinguishable or not). If the things are distinguishable, one also has to consider if duplicates are allowed (i.e. if we can repeat). For these problems, it is best to think about it first.

Distinguishable to distinguishable, with duplicates

For each of the things, there are choices, for a total of

How many ways are there to distribute N distinguishable balls into k distinguishable boxes?
ways.

Distinguishable to distinguishable, without duplicates

For each of the things, there are choices, for a total of

How many ways are there to distribute N distinguishable balls into k distinguishable boxes?
ways.

Distinguishable to indistinguishable, with duplicates

This is "reverse" Balls and Urns, or essentially distributing indistinguishable objects to distinguishable objects. Refer to 6; this case has

How many ways are there to distribute N distinguishable balls into k distinguishable boxes?
ways. Now we can just switch the and the , so there are
How many ways are there to distribute N distinguishable balls into k distinguishable boxes?
ways.

Distinguishable to indistinguishable, without duplicates

This is probably the most tedious case, as it involves the most casework. One way is to first find all the partitions (refer to 5) of with addends, (i.e. all solutions to

How many ways are there to distribute N distinguishable balls into k distinguishable boxes?
in which the addends are indistinguishable). Then, for each partition, separately calculate the number of ways, and finally, add these results together.

For example, if

How many ways are there to distribute N distinguishable balls into k distinguishable boxes?
, then our partitions are:
How many ways are there to distribute N distinguishable balls into k distinguishable boxes?
--this case has way.
How many ways are there to distribute N distinguishable balls into k distinguishable boxes?
--we choose one of to be the "", so there are ways.
How many ways are there to distribute N distinguishable balls into k distinguishable boxes?
--we choose three objects to be the "'s" (the rest are determined after this), so there are
How many ways are there to distribute N distinguishable balls into k distinguishable boxes?
ways for this.
How many ways are there to distribute N distinguishable balls into k distinguishable boxes?
--again, we choose three objects to be the "'s" (the rest are determined after this), so there are
How many ways are there to distribute N distinguishable balls into k distinguishable boxes?
ways for this.
How many ways are there to distribute N distinguishable balls into k distinguishable boxes?
--first, we choose one object to be the "", which has ways. Then, we can choose any two of the remaining four to be one of the "'s", and there are
How many ways are there to distribute N distinguishable balls into k distinguishable boxes?
ways for this. However, we must divide this by , since the two "'s" are interchangeable, and the total for this case is
How many ways are there to distribute N distinguishable balls into k distinguishable boxes?
.

Adding up, we get

How many ways are there to distribute N distinguishable balls into k distinguishable boxes?
ways.

All of these problems are similar to this one in that you divide them up into smaller counting problems.

Indistinguishable to indistinguishable

This is part of the partition problem. Imagine that you are finding the number of solutions to

How many ways are there to distribute N distinguishable balls into k distinguishable boxes?
, where
How many ways are there to distribute N distinguishable balls into k distinguishable boxes?
are indistinguishable.

This can be done with casework; the method is best explained with an example: say that

How many ways are there to distribute N distinguishable balls into k distinguishable boxes?
. Our partitions are then
How many ways are there to distribute N distinguishable balls into k distinguishable boxes?
, so there are partitions.

This idea could also be used to solve problems like how many ways can one pay 51 cents with quarters, dimes, and pennies?

You can solve the problem as below using casework where your cases are the amounts of quarters. For each case, the amount of ways is equivalent to the amount of dimes you can use as the rest of the money can be paid by pennies.

Case 1: 2 quarters

In this case, you cannot use any dimes, leaving only 1 case.

Case 2: 1 quarter

In this case, you can have either 0, 1, or 2 dimes, leaving 3 cases.

Case 3: No quarters

In this case, you can use up to 5 dimes, leaving 6 cases.

In total we have

How many ways are there to distribute N distinguishable balls into k distinguishable boxes?
cases. Note that the best way this solution can be illustrated is by a chart.

Indistinguishable to distinguishable (Balls and Urns/Sticks and Stones/Stars and Bars)

This is the "Balls and Urns" technique. In general, if one has indistinguishable objects that one wants to distribute to distinguishable containers, then there are

How many ways are there to distribute N distinguishable balls into k distinguishable boxes?
ways to do so.

Imagine that there are

How many ways are there to distribute N distinguishable balls into k distinguishable boxes?
dividers, denoted by , and objects, denoted by , so we have
How many ways are there to distribute N distinguishable balls into k distinguishable boxes?
and
How many ways are there to distribute N distinguishable balls into k distinguishable boxes?
. Then, label the regions formed by the dividers, so we get
How many ways are there to distribute N distinguishable balls into k distinguishable boxes?
(since there are
How many ways are there to distribute N distinguishable balls into k distinguishable boxes?
dividers) and our objects
How many ways are there to distribute N distinguishable balls into k distinguishable boxes?
. We can now see that there are distinct regions (corresponding to the distinguishable objects) in which we can place our identical objects (corresponding to the indistinguishable objects that one is distributing), which is analogous to the original problem. Finally, there are
How many ways are there to distribute N distinguishable balls into k distinguishable boxes?
arrangements of the stars and the
How many ways are there to distribute N distinguishable balls into k distinguishable boxes?
by basic permutations with repeated items. Note: the number of stars that appears in each of the regions
How many ways are there to distribute N distinguishable balls into k distinguishable boxes?
represents the number of indistinguishable objects (the stars) given to a particular distinguishable object (of the dividers). For example, if we're distributing stars to kids, then one arrangement is
How many ways are there to distribute N distinguishable balls into k distinguishable boxes?
corresponding to star to the first kid, to the second, to the third, to the fourth, and to the fifth.

One problem that can be solved by this is finding the number of solutions to

How many ways are there to distribute N distinguishable balls into k distinguishable boxes?
, where
How many ways are there to distribute N distinguishable balls into k distinguishable boxes?
, which has
How many ways are there to distribute N distinguishable balls into k distinguishable boxes?
solutions.