4. Multivariate Generating Functions

4.1Mixed Generating Functions

在这一章中, 我们主要考虑更为自由一些的生成函数. 准确来说, 我们可能会考虑, 在两个变量的情况下, 一个变量的计数需要考虑置换群的作用, 而另一个则不需要.

Definition 4.1.1. Let be a species, a weight function is a rule that assigns to every -structure a weight such that if are isomorphic -structures then .

Remark 4.1.2.

1.

Weight functions on species are not functions from set theory because is not a set. Nonetheless, its restriction to is a indeed a weight function from .

2.

Thus, it is not hard to see, a weight function is the same as specifying a weight function .

3.

We will no longer require to be finite.

Example 4.1.3.

1.

For species of graphs, we can define a weight as the number of edges.

2.

For trees, a weight is the number of leaves.

3.

For endofunctions, a weight is the number of fixed points.

4.

For permutations, a weight is the number of cycles.

5.

For any species, a weight is the order itself.

6.

For any species, a weight is the constant weight.

Definition 4.1.4. A weighted species is a species with one or more weight functions .

Remark 4.1.5. For any finite set , we can form OGF for as

If then and hence we will just write for .

Definition 4.1.6. Let be a weighted species, then the mixed generating function (MGF) of is

Example 4.1.7. Let be the species of graphs and weight functions to be the number of edges. Then we see and hence

Definition 4.1.8. Let be weighted species with weight functions and . Let be a natural transformation. We say is weight preserving if for any -structure . If is a weight preserving equivalence then .

Remark 4.1.9. We can also extend species operations to weighted species using the principle: The weight of a composite object shoulded be the sum of the weight of its components.

Example 4.1.10. For example:

1.

Consider . Then the structures are and hence the natural weight function on should be .

2.

Consider . The structures are tuples . Thus the weight should be .

3.

For rooting , the structure is where is a -structure and is the root. Thus the weight function on is .

Theorem 4.1.11 (Main Theorem). The main theorem is true for MGFs/weighted species.

Remark 4.1.12. A few things to note:

1.

Composition is in variable. In other word, the composition should be .

2.

Derivatives are now become partial derivatives.

3.

no longer require to be connected. Provided the mixed generating function is defined. On the other hand, still requires connected.

Example 4.1.13. Compute the average number of cycles in a permutations of . Take with weight as the number of cycles, with constant weight function , and with constant weight function .

With these weight functions, we see becomes a weighted equivalent. Then we haveIn particular, we see the average number of cycles is then

Remark 4.1.14. In future, if the weight on a species was not specified, then it was assumed to be .

Example 4.1.15. Compute the average number of -cycles among all permutations of . Take with weight function equal the number of -cycles and with weight if the order is and otherwise.

Again, we have is a weighted equivalence. This time, we haveIt is not hard to see this is the same asand we can continue as before, and get the final answer to be .

Example 4.1.16. If is an endofunction, we say is a recurrent element, if where we composed times for some .

Let be endofunctions with weight equal the number of recurrent elements. We want to compute . Take with weight as the order, then . Then is a weighted equivalence and soSince and hence use LIFT, we get

Example 4.1.17. Consider with weight as the number of terminals. Consider with weight function if order is and otherwise. Then and becomes weighted equivalent. Thus we haveand use LIFT from here to obtain the solution.

Example 4.1.18. Consider rooted trees with weight function the degree of the root. In this example, we write a species with weight function and the same species with non-trivial weight.

In this example, we will consider and with weight as the degree of the root. On the other hand, we put a non-trivial weight on as with weight as the order.

We know and . Thus andUse LIFT, we get

4.2Multi-Exponential Generating Functions

Definition 4.2.1. Let be a set and be a commutative ring. Then we define generalized weight function . We define .

Example 4.2.2. If as a normal weight function, then let and . Then is just the OGF of with weight .

Remark 4.2.3. Under operations, our principle for the generalized weight of a composite object is that the weight should be the product of weights.

Example 4.2.4. Let , consider weight . Then .

Definition 4.2.5. Let be a species and a ring, we can define generalized weight function to be a rule that assigns for every -structure . We want if is isomorphic to . Thus we will write for any set of size .

Definition 4.2.6. Given species and generalized weight function . Then we can define the generalized EGF to beor

Definition 4.2.7. We define multisort species, it is like species, but input is a tuple of finite sets. We will focus on -sort species (or -species).

A -species is a rule which assigns:

1.

To every ordered pair of finite sets, we get a finite set the -structures on .

2.

To every pair of bijections , a bijection called the transportation of structures such that.

Remark 4.2.8. We can also define isomorphisms, natural transformations and equivalence. The first big difference between -species and species is when we look at EGF.

Like before, we will write where and . Then the EGF for -species is given by

Example 4.2.9.

1.

Consider as the -species of functions, where is the set of all functions from to .

2.

The -species of vertex and edges-labelled graphs. This assigns the set of all where is a graph with vertex set and is a bijection from the edges of the graph to .

3.

, the -species of -set partitions. A -set partition of is a set of pairs where and and .

4.

is the -species of singletons of st and nd sort. The definition is:Similarly, we define

Remark 4.2.10 (Diagrammatic perspective of -sort species).

The unlabelled structures have “two sorts” of label receivers. The first sort receives labels from and the second receives labels from .

For example, if we consider as the -species of functions, then the unlabelled structures are two line of dots with some arrow from the first line to second. Then the first line would receive labels from and second line receive labels from .

Remark 4.2.11. Now we talk about operations on -species. Suppose are two -species.

Definition 4.2.12 (Sums/Differences). The sum and difference are more or less the same:Similarly if is a subspecies of then .

Remark 4.2.13. The filter operation is more or less the same and hence ommited.

Definition 4.2.14 (Products).

1.

If is a set, then .

2.

3.

We note that the unlabelled structure is just for . Also, we note the multi-EGF of is just .

Example 4.2.15. Consider as the product of functions. We can think of this as the following: where thre gree means the left and the red means the right. For structures on , we can view it as a single function where each elements of the domain/codomain is coloured red/green and has the same colour as .

Definition 4.2.16 (Sequences). We just define .

Definition 4.2.17 (Derivatives). We have two derivatives .

1.

where .

2.

where .

Some remarks:

1.

We note the rooting operations are and where in the first one we root at elements of the first sort and the second one we root at elements of second sort.

2.

We note we can also consider “mark and change sort” operation. This is just and . The first one is mark and change from st sort to nd sort and the second is mark and change nd to st.

3.

The multi-EGF for is and is .

Definition 4.2.18 (Diagonal). If is -species, then we define the diagonal , which is a -species, as

Example 4.2.19. We have . If then

Remark 4.2.20. We can decompose -species with -tuples of -species to a -species. We will discuss , and .

Definition 4.2.21 (Composition when ). Let be -species and be connected -species, i.e. . Then the unlabelled structures is defined by :

1.

Start with unlabelled -structure .

2.

Replace its label receivers by unlabelled -structures

3.

The label receivers of composite object come from ’s only, which is a -sort species.

The the labelled structure consists of:

1.

2.

.

3.

for .

The multi-EGF of is just .

Example 4.2.22. Let as the -species of vertex and edge labelled graphs and be 2-species of connected graphs with vertex and edge labelled. Then .

Example 4.2.23. We can converting -species into -species: . The definition goes as:

Definition 4.2.24 (Composition when ). Let be -species, be connected -species. Then we can define as a -species.

The unlabelled structure is defined by:

1.

Start with unlabelled -structure .

2.

Replace all label receivers of st sort in by -structures

3.

Replace all label receivers of nd sort in by -structures

4.

The label receivers of composite objects come from ’s and ’s

The -structure on consists of:

1.

, i.e. and .

2.

Then we have .

3.

We have .

4.

And .

The multi-EGF of will be .

Example 4.2.25. We can convert -species into -species, i.e. we have , this forgets that there are two sorts of label receivers and treat all the same.

Formally, we haveIn this case the EGF is just .

Definition 4.2.26 (Composition when ). Let be -species, then we define as a -species as follows.

The unlabelled structures is the same as the case.

The labelled structures is the same as the case but replace by . The multi-EGF in this case is just .

Example 4.2.27. We consider the -species of functions. We have natural equivalenceIndeed, to form a function, for each elements in the codomain, which is , and we need to pair that with a set of elements of the first sort, i.e. . We need to do this to every elements in the codomain, hence we need to put a in front. The EGF of is then

For surjective functions, we see this is just with similar reasoning. On the other hand, the injective functions is .

Example 4.2.28. Let be disjoint finite sets. We want to count the permutations of with the property that every cycle has at least element of and element of .

Form the -species of of cycles, with at least one label receiver of each sort. We getwhere is cycles with labels of either sort, and are cycles without at least one label of each sort.

Thus we get What we want is , which is

Example 4.2.29. Determine the number of bipartite graphs such that:

1.

vertices in the first part.

2.

vertices in the second part.

3.

no vertices of degree .

We let be the -species of bipartite graphs, where is the set of all bipartite graphs with bipartition . Let be the subspecies of with no vertices of degree .

Note we have . From here, we seeand henceThus the answer to the question is just .