First consider a collection of distinct objects selected from a set of distinct objects.
Permutations and combinations
A permutation of such a set is distinguished by another such permutation by the ordering of the objects. The first item of an -permutation of things can be chosen ways, the second in ways, and so forth, so that
These numbers have a recursion relation
If we allow for unrestricted repetition, then the first object can be selected ways, the second selected ways, and so on, so
(this is also called sampling with replacement).
A combination of distinct objects of (selected from objects) can be ordered in ways, therefore
Combinations can be counted by developing a recursion relation. Divide combinations into classes, for example those that contain the the first object, and those that don’t. -combinations of things that do contain the first of the objects are then since selecting one item reduces both and . The number of -combinations that do not contain the first item is then , and we use the rule of sum
Generating or enumerating functions
are functions that let us solve recursion relations. Define
in which is just a formal symbol. Let’s define , and apply the recursion relation
so we deduce that
This is referred to as a generating function since we can get any by expanding it out and reading the coefficient of , or alternatively by calculus operations
(in the integral let be a unit circle, i.e. let ).\\
We have shown that
so is a binomial coefficient. The Persian poet-mathematician Omar Khayyam produced the following calculation of binomial coefficients several hundred years before it was rediscovered by Pascal
Despite the fact that the combinatorial interpretation is preposterous if either or are negative, we can still continue the definition of a symbol such as in the following way;
which actually makes perfect sense. We can extract all of the negative signs
and so
This is very handy for quickly evaluating rational functions.
The binomial coefficients possess a very large number of summation identities that are easy to prove using the generating relation. For example
gives us
from which we pick out the coefficient of from both sides
This is a good starting point from which to derive lots of other useful things, for example in this expression let ;
but giving us
an identity that we make use of more often than you may think in quantum theory.
A useful tool for constructing identities on the binomial coefficients is the fact that
provided that is an integer. The integral is of course one if , and this works because for all integral . \\
A good example of how this is used to select coefficients from the product of generating functions is
Then select the coefficient of with
so that
Compositions
Generating functions provide a way to construct solutions to combinatorics problems, this is illustrated nicely by compositions and partitions.
Compositions of objects into classes can be thought of as dividing ordered identical objects into non-empty connected groups. Create an enumerating function for one of the classes . The exponent of tells how many objects are in the class. Next create an enumerating function for the whole set of classes
so . The most basic composition problem is to take volumes of the same book, place them in a row on a shelf, and now find the number of ways of inserting dividers between them
Here we have books arranged into classes by dividers.