Number of possible sequences

How many ways can two sets of objects, *n*_{r}
of one type and *n*_{l} of another, be placed in *N*
available spaces? The assumption is that each of the two types are separately indistinguishable.
I.e. all *n*_{r }items look like one another as do the *n*_{l}
objects. In the case of tossed coins, all heads are considered indistinguishable
from each other as are all tails.

Suppose in a kindergarten there are *N*
cubby holes where the children can place an orange or an apple. There are *n*_{r}
oranges and *n*_{l} apples for a total *n*_{r}
+ *n*_{l} = *N* total objects. The first cubby
can hold any one of the *N* pieces of fruit, the second any of the
remaining *N - 1* pieces, the third any of *N - 2*, and so on until
the last piece has only one place for it. The total number of possible
arrangements is then *N*(N-1)*(N-2)*...*1= N! ways. *Of these ways however,
many lead to the same result because the apples are undistinguishable, as are
the oranges. The *n*_{r} oranges can be arranged in *n*_{r }!
different (but undistinguishable) ways and similarly *n*_{l
}! ways
for the oranges, so a total of *n*_{r
}! **n*_{l }!
possible but identical
combinations must be divided out. The total remaining is then