Counting with Categories (Part 3)
Posted by John Baez
Here’s my third and final set of lecture notes for a 4-hour minicourse at the Summer School on Algebra at the Zografou campus of the National Technical University of Athens.
Part 1 was here, and Part 2 was here.
Last time I began explaining how a chunk of combinatorics is categorified ring theory. Every structure you can put on finite sets is a species, and the category of species is the free symmetric 2-rig on one object, just as the polynomial ring is the free commutative ring on one generator.
In fact it’s almost true that every species gives an element of ! You should think of mathematics as wanting this to be true. But it’s not quite true: in fact every tame species has a generating function, which is an element of , a ring that’s a kind of ‘completion’ of . There’s a lot to be said about the slippage here, and why it’s happening, but there’s not time for such abstract issues now. Instead, let’s see what we can do with this analogy:
Just as is the free commutative ring on one generator, the category of species is the free symmetric 2-rig on one generator.
Substitution of species
is the free commutative ring on one generator, namely . Thus for any element , there’s a unique ring homomorphism
sending to :
What is this homomorphism ? It sends to , so it must send to , and it must send to , and so on. Indeed it sends any polynomial to , or in other words :
So, we’re seeing that we can compose elements of , or substitute one in another.
The same thing works for species! Since the category of species, , is the free symmetric 2-rig on one generator , for any species there’s a unique map of symmetric 2-rigs
sending to :
And following the pattern we saw for polynomials, we can say
But this time we are defining the operation by this formula, since we didn’t already know a way to compose species, or substitute one in another. But it’s very nice:
Theorem. If and are species, to put a -structure on a finite set is to choose an unordered partition of into nonempty sets :
and put a -structure on and a -structure on each set . Moreover
if the constant term of vanishes.
Let’s illustrate this with an easy example and then try some a more interesting example.
Example 7. Remember from Example 5 that is our name for the species is being a finite set—every finite set has this structure in exactly one way. We call it because its generating function is the power series for the exponential function:
Let be the species being a 2-element set: every set with 2 elements has this structure in exactly one way, while a set with any other number of elements cannot have this structure. We give it this funny name because
where
so
Now let’s compose these species, and let
By the theorem, to put an -structure on is to partition into nonempty parts, put an -structure on the set of parts, and put an -structure on each part. But there’s just one way to put an -structure on the set of parts. So, putting an -structure on is the same as partitioning into parts of cardinality .
How many ways are there to do that? We could figure it out, but let’s use the theorem, which says
and thus
so
So, we see that if is even,
So this is the number of -structures on an -element set. We can check our work if we know a bit about symmetries and counting. The group acts transitively on the set of ways to partition an -element set into 2-element parts. The subgroup that fixes any such partition is , since we can permute the parts or permute the 2 elements in each part. Thus,
The generating function method is nice because we can just turn the crank. And as we’ll see, we can use it to solve harder problems.
Example 8. How many ways can we partition an -element set into nonempty parts? This is called the th Bell number, . Let’s see if we can calculate it!
Let be the species of partitions. I claim there are species and such that
is our old friend ‘being a finite set’. is the species being a nonempty finite set. To partition a finite set into nonempty finite sets is to partition it into sets, put a -structure on the set of parts, and put an -structure on each part. That gives the isomorphism above!
We know that
and similarly
Thus by the theorem,
So by the definition of the Bell numbers,
This is not quite an explicit formula for the Bell numbers, but it’s almost as good! Let’s use it to calculate the first few Bell numbers. We’ll work out the power series for only up to order :
This gives
which we can easily confirm. So it works!
There is a lot more one can do with species. Luckily there are some free books that will take you further:
François Bergeron, Gilbert Labelle, and Pierre Leroux, Introduction to the Theory of Species of Structures.
Phillipe Flajolet and Robert Sedgewick, Analytic Combinatorics.
Herbert S. Wilf, Generatingfunctionology.
Linear species
Finally, let me just conclude by mentioning a variant. We can define the category of linear species to be where is the category of complex vector spaces and linear maps. So, it’s just like the category of species but with replaced by .
It turns out that like the category of species, the category of linear species is a 2-rig. We call the addition because now, given two linear species , we define
).
But it’s still just the coproduct. The Cauchy product of linear species is defined by
We can also compose linear species! Everything is very similar. But now it’s connected to the representation theory of the symmetric group, because the category is equivalent to the coproduct of all the 1-object categories corresponding to the symmetric groups, and a functor from to is the same as a representation of . And because representations of the symmetric group are classified by Young diagrams, so are linear species.
I won’t go into this more now, but my friends Joe and Todd and I have studied this subject in great detail, and it connects many areas of mathematics in a delightful way:
John Baez, Joe Moeller and Todd Trimble, Schur functors and categorified plethysm.
John Baez, Joe Moeller and Todd Trimble, 2-Rig extensions and the splitting principle.
For example, the second paper here relates linear species to the ring of symmetric functions, another popular and fundamental topic in combinatorics.