The twelve fold way
Placement of balls in boxes.
Unrestricted
- labeled, labeled:
- unlabeled, labeled:
- labeled, unlabeled: .
- unlabeled, unlabeled: . where is the number of ways to split into parts. No closed for .
Generating function for :
Generating function for (unlabeled, labeled): .
Injective
- labeled, labeled:
- unlabeled, labeled :
- labeled, unlabeled: 0 or 1
- unlabeled, unlabeled: 0 or 1
Surjective
- labeled, labeled:
- unlabeled, labeled:
- labeled, unlabeled:
- unlabeled, unlabeled: .
Linear Recurrence relations and generating functions
A few notes:
- For linear recurrence relations, if we can find any solutions, we can take linear combinations of them to generate new solutions. For example, If and satisfy a recurrence relation, also satisfies it.
Number of subsets
Let number of subsets of .
for all .
.
Let . This is called a generating function.
so,
Observe that has a radius of convergence of , so our manipulations are justified by analysis. This does not always need to be the case.
The Fibonacci sequence
Let be the Fibonacci sequence. There are several methods to solve for the explicit formula for .
Method 1: Exponential ansatz
Try a solution of the form . This gives us the characteristic equation , the roots of which are . Thus, a general solution would be of the form
Use the initial conditions of and to solve for and .
Method 2: Matrix diagonalization
https://austinrochford.com/posts/2014-04-23-diagonalization-fibonacci.html
Express the recurrence as a matrix product:
Let be the coefficient matrix of the recurrence. Then,
It would be beneficial to diagonalize , since powers of a diagonal matrix are easy to compute. The characteristic polynomial of is the same as the characteristic equation we obtained in the previous method, so are the eigenvalues of . We can find and normalize the eigenvectors corresponding to these eigenvalues to obtain the change of basis matrix
and since is an orthogonal matrix, . This gives us
Method 3: Generating functions
Let .
So, .
Let
where and .
We know and .
We can solve for and : , .
Thus, we have .
Info
Once we have found the power series above, we can use the theory of power series to show that converges for , so our manipulations are justified analytically. But, there exists a theory of formal power series, according to which it is legitimate to do such manipulations without any regard to questions of convergence. If the sequence specified by a recurrence relation grows no faster than exponentially, its generating function will have non-zero radius of convergence, and analytical techniques can be used on it. However, if the growth is faster than exponential, the series must be treated formally.
Derangements
is the number of derangements of size .
, , ,
Note that .
Thus, , .
Thus,