This post is about two very different areas of mathematics that I’m pretty interested in (although I know a lot more about one of them…) and the relationships between them. It’s well-known that category theory grew out of investigations in algebra and topology, and that its insights are today still most useful in those and closely related subjects. (Algebraic geometry, I’m looking at you.) In particular, the famous “slum of topology” epithet notwithstanding, combinatorics is pretty far-removed from both the above areas, and indeed, I don’t know of an introductory textbook in combinatorics that gives category theory a second (or first!) glance.

And why should it? Doubtless many have tried, but no one’s (as far as I know) managed to give combinatorics a Grothendieck- or MacLane-type makeover. On one level, this makes sense; combinatorics is a huge area that encompasses problems that look completely different. It can almost be described as the trash-heap of mathematics; combinatorics is the study of problems that don’t really fit in anywhere else. To abstract from such a huge generality would seem sort of… onanistic, “abstraction for abstraction’s sake.” But of course this doesn’t mean that category theory has no place in combinatorics!

In this post, I plan to discuss two (and a half) different applications of category theory to combinatorics. One is reasonably well-known; one is silly and (as far as I know) original, but hopefully gives some insight into something else that’s interested me ever since Qiaochu mentioned it.

**Combinatorial species**

The theory of combinatorial species is a far-reaching application of the language of category theory to enumerative combinatorics, and in particular generatingfunctionology. The starting point for the theory is the following: Let’s consider structures of some sort on a finite set — say, labeled trees. Then, in most cases of interest, the number of these structures depends only on the size of , and on *nothing else at all.* (In the example of labeled trees, it’s a classic theorem of Cayley that there are labeled trees on vertices.) Furthermore, given a labeled tree on with vertices, and a bijection , it is a simple matter to construct an isomorphic labeled tree on . Since two sets are isomorphic iff they have the same number of elements, we have a description of the structure as a functor

from the category of finite sets with bijections as morphisms to itself. This functor is called a *species of structures*.

The functor evaluated at a bijection between sets is called the *transport of -structures along . *We can also define isomorphism of structures in the natural way; i.e., two structures on respectively are isomorphic iff there is a morphism between them of the form for some isomorphism .

Much of the power of this approach lies in its great generality; any algorithm to construct the structures on a set can be considered as a species. Furthermore, it is possible to write functional (functorial?) equations for species in a succinct way. Let’s see how.

We want to define addition, multiplication, and composition of -structures in a manner analogous to those operations on generating functions. Fortunately, it’s been known how to do this for a while! Addition of two species, and , corresponds to the set-theoretical disjoint union. The product of two species is defined as an ordered pair where

- is an -structure on ;
- is a -structure on ;
- is a disjoint partition of .

The reason that this is well-known is that this is exactly how multiplication and addition act on generating functions. With this in mind, we can also immediately see that addition and multiplication are associative, commutative, and multiplication distributes over addition — in other words, species can be given the structure of a commutative semiring. We can also consider the operations of substitution, or . and differentiation, — and these have natural definitions as well.

So now we can start writing functional equations for species. Let’s consider the species of rooted trees: we can describe it recursively, by choosing a single point as the root and describing the tree as that distinguished point plus a set of smaller rooted trees. Denoting the species of rooted trees by (from the French *arborescence*), it turns out that we can write this recursion functionally. Let’s also denote by the *singleton species*, which takes a singleton set to and any other set to the null set, and by the *species of sets*, which takes any set to the singleton set . Then we can write the above recursive definition of rooted trees in the form

.

So you probably have enough information on the theory to get through Todd and Vishal’s post dealing with species, in which the connection with generating functions is explained more clearly and some good references are given. This section of the post is already way longer than I intended, so let me just briefly say a couple things about the notion of virtual species.

I mentioned earlier that the class of species can be given the structure of a commutative semiring. It turns out that, just as in the case of the most famous commutative semiring , we can extend this to a commutative ring by way of *virtual species*. One of the most interesting things about virtual species is that they turn out to have all sorts of unexpected useful properties. For example, letting be the species of sets as above, it turns out that in the ring of virtual species there is a unique satisfying

for any with .

**Category theory and graph theory**

Since graph theory is the area of mathematics that, despite my best efforts, I keep getting pulled back into, I thought I’d talk briefly about the few applications of category theory to it. First we need to define morphisms for graphs; fortunately, the notion of a graph homomorphism works just fine. So let be the category of graphs with graph homomorphisms as morphisms. There are a couple of nice things about this category; first, any graph is colorable if and only if there’s a morphism . Morphisms also preserve connectedness of graphs, and never increase odd girth. But probably the most interesting thing is the tensor product in this category.

A famous conjecture of Hedetniemi asserts that, letting be the tensor product of graphs,

.

This conjecture is still open when the chromatic numbers of are at least 5, but half of it follows immediately from basic category theory; letting be the RHS of the above equation and supposing WLOG that , we have

,

and . While this is not hard to prove directly, without resorting to category theory, it lacks the clarity that the categorical viewpoint provides.

Another application of category theory to graphs is even more interesting, albeit not nearly as rigorous. To correctly describe it, we need to slightly tweak the standard category of groups. Let be the category of groups along with generating sets for the group, where morphisms are the group homomorphisms that induce functions from the first generating set into the second.

Then there is a functor , which is described by the Cayley graph construction. Essentially, this construction says that for any group , there is a graph which the group acts on in the same way that the group acts on itself. Another way of looking at it, which gives a better idea of where the name comes from, is that the graph describes a quotient of , the symmetric group on vertices.

But the functorial properties of the Cayley graph construction are what interest us here, and they seem to have some interesting consequences. In particular, it seems that many important graph products actually correspond to group products. For instance, the Cayley graph of is the cartesian product of the Cayley graphs of and . Even more interesting: Alon-Lubotsky-Wigderson have shown that, for certain sets of generators, the celebrated zig-zag product of Cayley graphs is essentially equivalent to the semidirect product of the underlying groups. Are there other relations between graph products and group products?

Edit: Another application of category theory which I didn’t feel capable of discussing was the homological definition of the Jones polynomial — not strictly graph theory, of course, (or for that matter category theory) but closely related. Lo and behold, as I check the revised cross-listings in the combinatorics section of the Front, I come across this. There are some typos and (from a brief glance) the exposition could be better, but it might be worth checking out.

**Pointed sets and the field with one element**

There’s an interesting philosophy, arising initially from Lie theory and q-analogues, that many combinatorial structures can be viewed as algebraic structures over this nebulous “field with one element.” Developing (for instance) algebraic geometry over this non-existent field seems to be an exciting area of study, and one that’ll hopefully lead to many new insights. In this section, though, I’m going to talk about something more specific — namely, the philosophy that pointed sets are “really” vector spaces over . I want to convince you to the best of my ability that, from a category-theoretic standpoint, this at least is a reasonable thing to be happening; that , the category of pointed sets with basepoint-preserving functions as morphisms, “wants to be” –, the category of vector spaces over a field , for some degenerate .

So the first thing I’ll note to this effect is that has lots of properties characteristic of “algebraic” categories like the category of abelian groups or the category of -modules, but that aren’t shared by most other “combinatorial” categories like ; for example, has zero morphisms and therefore kernels and cokernels. The reason for this is essentially as follows: the categories with zero morphisms are exactly those enriched over . An analogy to can be drawn here, since –, and – are all enriched over . Really, this analogy can be stretched even further by the simple observation that there is a forgetful functor from (that takes 0 to the basepoint).

So why is like – and not ? Well, part of the reason intuitively might be that although both these categories are locally small, the first two have “more” morphisms. (Combinatorially, of course, we can count the sizes of the hom-classes, and get q-analogues over finite fields.) Another reason is that in both and –, we have a notion of dimension (cardinality in the first case), and isomorphisms are exactly those morphisms that preserve dimension. In the end, though, I don’t know enough category theory to fully explain why “should be” –.

Nor can I explain via category theory exactly what it is stopping from being actually equivalent to – for some field . Of course, there are easy discrepancies; for instance, is not even preadditive (unless I’m very hugely mistaken). But none of these seem to get to the heart of why is different. So, readers, can we come up with a more compelling categorical justification, and have some in the process?

Tags: field with one element, graph theory, math.CO, math.CT, q-analogue, species

June 30, 2009 at 06:22 |

The categorical ideas behind the field with one element were discussed in some detail at the n-category cafe.

But cool, I’ve never seen that definition of a coloring before. Does the categorical perspective make it any easier to prove that the chromatic polynomial is a polynomial? Also, you forgot to mention that a graph is a category! Then the definition of a graph homomorphism can be read off from the definition of a functor, if I’m not mistaken.

Anyway, another mysterious application of category theory to combinatorics is Mobius inversion in categories; this is an idea that generalizes Mobius inversion in posets, and it appears to have deep connections to topology via the Euler characteristic as well. Tom Leinster has a series of papers on the subject.

July 9, 2009 at 16:15 |

The category of pointed sets is a somewhat interesting creature. It can be seen as the category of sets where the morphisms are

partialfunctions (consider what basepoint-preserving functions look like when you remove the basepoints!).I think Segal’s famous category , used in the study of infinite loop spaces, is the category opposite to finite pointed sets. But I digress.

In what ways does pSet differ from K-Vect? You observed that pSet isn’t even pre-additive; an intrinsic way of capturing that is that the canonical morphism from a coproduct to a product,

isn’t an isomorphism as it is in K-Vect. (By “canonical morphism”, I mean the one whose restriction to the summand A is defined by the pair of maps

and whose restriction to B is defined similarly; here ‘0’ is the zero morphism. In other words, we are taking crucial advantage here of the presence of a zero object.) It’s not too hard to see that if coproducts

arecanonically isomorphic to products in this way, then it’s possible to define an addition law on the hom-sets, in such a way that the hom-sets become commutative monoids, and the category becomes pre-additive in the sense of being enriched in the category of commutative monoids.To say it a bit more nicely: what does coproducts = products buy you? It means that morphisms

can be described as matrices of morphisms, and composed as such.

What’s another way in which pSet differs from K-Vect? First, as you point out, there’s a lot in common. I would add that in pSet,

— Every morphism factors as an epi followed by a mono, in an essentially unique way.

— Every mono in pSet is the kernel of its cokernel.

— Every epi in pSet is the cokernel of its kernel.

— The pullback of an epi along any morphism is an epi.

— The pushout of a mono along any morphism is a mono.

So pSet has some great exactness properties shared with any abelian category. But here’s a weird structural feature of pSet as a symmetric monoidal closed category (where the tensor product is smash product ), and that’s that

— There’s a natural transformation which is coassociative and cocommutative, namely the usual diagonal map.

This could be to keep in mind.

There is however no counit! That is, if the 2-element pointed set plays the role of a 1-dimensional space over , then there is no natural map to play the role of a counit (of a hypothetical coalgebra structure).

In fact, maps are in bijective correspondence with subobjects of X in pSet. Thus is what category theorists call a “subobject classifier”. This would be another significant difference between pSet and K-Vect.

July 9, 2009 at 21:34 |

Not meaning to hijack this, but there are maybe a couple things to add about “coalgebra” naturally appearing in pSet whereas it doesn’t in K-Vect.

As I mentioned above, every object in pSet (every pointed set) naturally carries a comultiplication . The word “naturally” is meant in the technical sense of category category. It means that every morphism of pointed sets preserves the multiplication.

I also said there was no counit , and then clarified there was no

naturalmap to play the role of a counit, and that is again correct under the technical meaning of natural. But there is a counit which is natural in a non-categorical sense, of having a uniform description for all . It is just the map to the 2-element pointed set which takes every non-basepoint of to the non-basepoint of . Thus every pointed set carries a comonoid (or coalgebra) structure, but not all maps of pointed sets preserve the comonoid structure on the nose; they do preserve comultiplication.But there’s an enriched point of view on pointed sets; namely, the set of maps can be given a natural partial ordering. Namely, define to mean that if is

notthe basepoint, then . (This may become more intuitive if you think of the category of pointed sets as equivalent to the category of sets and partial functions, where just means that whenever the left side is defined.) Hence the category of pointed sets is enriched in the category of partially ordered sets. Then, while a morphism of pointed sets may not preserve the counit structure in the sense of an exact equation , we “come close” in the sense that .Another thing that could be observed is that the posets have binary meets (given , sends to wherever agree, and otherwise maps to the basepoint of ).

So there is in fact a kind of goofy commutative and associative addition structure on the hom-sets , given by . This brings pSet just a tad closer to K-Vect, doesn’t it? 🙂 The only thing stopping the hom-sets from being commutative monoids is the general lack of an identity element for this addition operation, at least if has more than two elements.

July 13, 2009 at 18:17 |

For more work exploiting the relationship between categories and graphs, there is the PCMI lecture notes by Kozlov:

http://www.math.umn.edu/~ezra/PCMI2004/kozlov.jcp.pdf

The idea that a k-coloring of G is just a morphism is nice, but at first glance doesn’t seem to yield much new information. One idea is to build structures which tell us whether such morphisms exist or not and which depend functorially on the graphs in question, and this is roughly what Kozlov and his collaborator Babson do.

July 13, 2009 at 18:52 |

Todd: Don’t worry about “hijacking” the thread — if I’m giving you a lot to say and/or think about, it just means that I’m doing my job right :). (I’m still trying to process everything you said, which might mean that I’m doing my job too well!)

Steven: Nice, I haven’t seen that paper. It is a pity that the coloring-homomorphism equivalence hasn’t been as useful as might be hoped, but there are a few nice things that come of it. For instance, it’s probably the quickest way to show that the graph homomorphism problem is NP-complete…

July 16, 2009 at 03:58 |

[…] other news: my post on category theory and combinatorics has gotten a good deal of (what I consider to be) positive feedback, which of course I’m very […]

December 12, 2017 at 15:57 |

You have noted very interesting points! ps nice site.