Combinatorial species


In combinatorial mathematics, the theory of combinatorial species is an abstract, systematic method for analysing discrete structures in terms of generating functions. Examples of discrete structures are graphs, permutations, trees, and so on; each of these has an associated generating function which counts how many structures there are of a certain size. One goal of species theory is to be able to analyse complicated structures by describing them in terms of transformations and combinations of simpler structures. These operations correspond to equivalent manipulations of generating functions, so producing such functions for complicated structures is much easier than with other methods. The theory was introduced, carefully elaborated and applied by the Canadian group of people around André Joyal.
The power of the theory comes from its level of abstraction. The "description format" of a structure is irrelevant, because species are purely algebraic. Category theory provides a useful language for the concepts that arise here, but it is not necessary to understand categories before being able to work with species.
The category of species is equivalent to the category of symmetric sequences in finite sets.

Definition of species

Any structure — an instance of a particular species — is associated with some set, and there are often many possible structures for the same set. For example, it is possible to construct several different graphs whose node labels are drawn from the same given set. At the same time, any set could be used to build the structures. The difference between one species and another is that they build a different set of structures out of the same base set.
This leads to the formal definition of a combinatorial species. Let be the category of finite sets, with the morphisms of the category being the bijections between these sets. A species is a functor
For each finite set A in, the finite set F is called the set of F-structures on A, or the set of structures of species F on A. Further, by the definition of a functor, if φ is a bijection between sets A and B, then F is a bijection between the sets of F-structures F and F, called transport of F-structures along φ.
For example, the "species of permutations" maps each finite set A to the set of all permutations of A, and each bijection from A to another set B naturally induces a bijection from the set of all permutations of A to the set of all permutations of B. Similarly, the "species of partitions" can be defined by assigning to each finite set the set of all its partitions, and the "power set species" assigns to each finite set its power set. The adjacent diagram shows a structure on a set of five elements: arcs connect the structure to the elements from which it is built.
Because a bijection exists between two finite sets if and only if the two sets have the same cardinality, for each finite set A, the cardinality of, which is finite, depends only on the cardinality of A. In particular, the exponential generating series F of a species F can be defined:
where is the cardinality of for any set A having n elements; e.g.,.
Some examples: writing,
Arithmetic on generating functions corresponds to certain "natural" operations on species. The basic operations are addition, multiplication, composition, and differentiation; it is also necessary to define equality on species. Category theory already has a way of describing when two functors are equivalent: a natural isomorphism. In this context, it just means that for each A there is a bijection between F-structures on A and G-structures on A, which is "well-behaved" in its interaction with transport. Species with the same generating function might not be isomorphic, but isomorphic species do always have the same generating function.

Addition

Addition of species is defined by the disjoint union of sets, and corresponds to a choice between structures. For species F and G, define to be the disjoint union of F and G. It follows that = F + G. As a demonstration, take E+ to be the species of non-empty sets, whose generating function is E+ = ex − 1, and 1 the species of the empty set, whose generating function is 1 = 1. It follows that E = 1 + E+: in words, "a set is either empty or non-empty". Equations like this can be read as referring to a single structure, as well as to the entire collection of structures.
The original definition of the species inspired three directions of investigation.
- On the categorical side, ones needs a larger frame to content both the product and coproduct. The price is the loss of the cycle index.
- Another approach brings in the Burnside rings or rigs. The Burnside summation of representations is a formal notation used in the elaboration of marks tables theory.
- Finally, the usual definition does not take into account the functoriality and the fact that a species, even seen as a rule, is unique. For a rule F there isn't the second rule F to produce a disjoint sum F+F. In this approach the definition of summing is actually a definition by example. The advantage is the natural insertion of the cycle index as the power tool.

Multiplication

Multiplying species is slightly more complicated. It is possible to just take the Cartesian product of sets as the definition, but the combinatorial interpretation of this is not quite right. Rather than putting together two unrelated structures on the same set, the multiplication operator uses the idea of splitting the set into two components, constructing an F-structure on one and a G-structure on the other.
This is a disjoint union over all possible binary partitions of A. It is straightforward to show that multiplication is associative and commutative, and distributive over addition. As for the generating series, = FG.
The diagram below shows one possible -structure on a set with five elements. The F-structure picks up three elements of the base set, and the G-structure takes the rest. Other structures will have F and G splitting the set in a different way. The set , where A is the base set, is the disjoint union of all such structures.
The addition and multiplication of species are the most comprehensive expression of the sum and product rules of counting.

Composition

Composition, also called substitution, is more complicated again. The basic idea is to replace components of F with G-structures, forming. As with multiplication, this is done by splitting the input set A; the disjoint subsets are given to G to make G-structures, and the set of subsets is given to F, to make the F-structure linking the G-structures. It is required for G to map the empty set to itself, in order for composition to work. The formal definition is:
Here, P is the species of partitions, so P is the set of all partitions of A. This definition says that an element of is made up of an F-structure on some partition of A, and a G-structure on each component of the partition. The generating series is.
One such structure is shown below. Three G-structures divide up the five-element base set between them; then, an F-structure is built to connect the G-structures.
These last two operations may be illustrated by the example of trees. First, define X to be the species "singleton" whose generating series is X = x. Then the species Ar of rooted trees is defined recursively by Ar = X · E. This equation says that a tree consists of a single root and a set of trees. The recursion does not need an explicit base case: it only generates trees in the context of being applied to some finite set. One way to think about this is that the Ar functor is being applied repeatedly to a "supply" of elements from the set — each time, one element is taken by X, and the others distributed by E among the Ar subtrees, until there are no more elements to give to E. This shows that algebraic descriptions of species are quite different from type specifications in programming languages like Haskell.
Likewise, the species P can be characterised as P = E: "a partition is a pairwise disjoint set of nonempty sets ". The exponential generating series for P is, which is the series for the Bell numbers.

Differentiation

Differentiation of species intuitively corresponds to building "structures with a hole", as shown in the illustration below.
Formally,
where is some distinguished new element not present in.
To differentiate the associated exponential series, the sequence of coefficients needs to be shifted one place to the "left". This suggests a definition for species: F' = F, where is a singleton set and "+" is disjoint union. The more advanced parts of the theory of species use differentiation extensively, to construct and solve differential equations on species and series. The idea of adding a single part of a structure is a powerful one: it can be used to establish relationships between seemingly unconnected species.
For example, consider a structure of the species L of linear orders—lists of elements of the ground set. Removing an element of a list splits it into two parts ; in symbols, this is L = L·L. The exponential generating function of L is L = 1/, and indeed:
The species
C of cyclic permutations takes a set A to the set of all cycles on A. Removing a single element from a cycle reduces it to a list: C
= L. We can integrate the generating function of L to produce that for C.
A nice example of integration of a species is the completion of a line with the infinite point and obtaining a projective line.

Further operations

There are a variety of other manipulations which may be performed on species. These are necessary to express more complicated structures, such as directed graphs or bigraphs.
Pointing selects a single element in a structure. Given a species F, the corresponding pointed species F is defined by F = A × F. Thus each F-structure is an F-structure with one element distinguished. Pointing is related to differentiation by the relation F = X·F' , so F = x F' . The species of pointed sets, E, is particularly important as a building block for many of the more complex constructions.
The Cartesian product of two species is a species which can build two structures on the same set at the same time. It is different from the ordinary multiplication operator in that all elements of the base set are shared between the two structures. An -structure can be seen as a superposition of an F-structure and a G-structure. Bigraphs could be described as the superposition of a graph and a set of trees: each node of the bigraph is part of a graph, and at the same time part of some tree that describes how nodes are nested. The generating function is the Hadamard or coefficient-wise product of F and G.
The species E × E can be seen as making two independent selections from the base set. The two points might coincide, unlike in X·X·E, where they are forced to be different.
As functors, species F and G may be combined by functorial composition: . This constructs an F-structure on the set of all G-structures on the set A. For example, if F is the functor taking a set to its power set, a structure of the composed species is some subset of the G-structures on A. If we now take G to be E × E from above, we obtain the species of directed graphs, with self-loops permitted. Other families of graphs, as well as many other structures, can be defined in this way.

Software

Operations with species are supported by SageMath and, using a special package, also by Haskell.

Variants

If “finite sets with bijections” is replaced with “finite vector spaces with linear transformations”, then one gets the notion of polynomial functor.