Counting with Categories (Part 1)
Posted by John Baez
These are some lecture notes for a 3-hour minicourse I’m teaching at the Summer School on Algebra at the Zografou campus of the National Technical University of Athens. To save time, I am omitting the pictures I’ll draw on the whiteboard, along with various jokes and profoundly insightful remarks. This is just the structure of the talk, with all the notation and calculations.
Long-time readers of the -Category Café may find little new in this post. I’ve been meaning to write a sprawling book on combinatorics using categories, but here I’m trying to explain the use of species and illustrate them with a nontrivial example in less than an hour. That leaves two hours to go deeper.
Combinatorics, or at least part of it, is the art of counting. For example: how many derangements does a set with elements have? A derangement is a bijection
with no fixed points. We’ll count them in a while.
But what does counting have to do with category theory? The category of finite sets, , has
- finite sets as objects
- functions between these as morphisms
What we count, ultimately, are finite sets. Any object has a cardinality so counting a finite set simplifies it to natural number, and the key feature of this process is that
We’ll count structures on finite sets. A ‘species’ is roughly a type of structure we can put on finite sets.
Example 1. There is a species of derangements, called . A -structure on a finite set is simply a derangement We write for the set of all derangements of We would like to know for all
Example 2. There is a species of permutations, called . A -structure on is a bijection . We know
We often use interchangeably for a natural number and a standard finite set with that many elements:
With this notation
But what exactly is a species?
Definition. Let be the category where
- an object is a finite set
- a morphism is a bijection between finite sets
Definition. A species is a functor A tame species is a functor
Any tame species has a generating function, which is actually a formal power series given by
Example 3. We can compute the generating function of the species of permutations:
Example 4. Given two species and there is a species defined as follows. To put an -structure on a finite set is to choose a subset and put an -structure on and a -structure on . We thus have
Example 5. There is a species where an -structure on a finite set is no extra structure at all. That is, every finite set has a unique -structure! We thus have
for all , so
That’s why we call this boring structure an -structure.
Example 6. Recall that a -structure on a finite set is a derangement of that finite set. To choose a permutation of a finite set is the same as to choose a subset , which will be the set of fixed points of , and to choose a derangement of . Thus by Example 4 we have
and also
so by Example 3 and Example 5 we have
so
or
so we see that
But we can go further with this… and I’ll ask you to go further in this homework:
- Homework: Let’s get deranged!
Also, you’ll notice that I wrote
without ever defining an isomorphism of species! So you can try to figure out what that should mean, and I’ll say more about it next time.