[Math] Graph theory from a category theory perspective

ct.category-theorygraph theoryreference-request

Are there any textbooks on graph theory written for a category theorist?

It would probably have to be on directed graph theory, but if there's some trick we can use to talk about undirected graphs as well that would be interesting.

A little more specifically, I'm looking for a text that begins by defining directed graphs and paths, then defines the obvious category out of a given directed graph with paths as arrows, then proceeds to derive results about directed graphs using these categories.

Most connections I see made between category theory and graph theory are in the other direction, taking the underlying graph of a category and saying something about it to derive a result about the category, but as someone comfortable with categories and not comfortable with graphs this approach isn't particularly illuminating.

Further, unless I'm mistaken, these constructions amount to an equivalence (maybe even an isomorphism?) between the category of directed graphs and the category of categories, so it feels like we should be able to say something about directed graphs from this perspective.

Any references are appreciated.

Best Answer

A few points:

  1. The category of graphs is certainly not equivalent to the category of categories. But they are related (for more on that see (3)).

  2. As you allude to, there are multiple categories of graphs to be interested in. I've had a go at naming some of them here, including directed/undirected, multi/simple, and various conditions on loops, trying to view them from a common framework as being certain categories of presheaves.

  3. Let $Gph$ be the category of directed multigraphs (as usual for category theorists), and let $U: Cat \to Gph$ be the forgetful functor. As you point out, $U$ has a left adjoint $F: Gph \to Cat$, which sends a graph $\Gamma$ to the category of "paths" in $\Gamma$. This adjunction is even monadic, exhibiting $Cat$ as a category of algebras over $Gph$. In this way, it's reasonable to regard a category as a graph with extra structure. I'd hazard a guess that dually the functor $F: Gph \to Cat$ is maybe comonadic? (EDIT: Yes, I'm pretty sure that $F$ preserves all equalizers. It is clearly a conservative left adjoint between complete categories, so it's comonadic by the dual of the crude monadicity theorem.) In this way, it should be reasonable to regard a graph as a category with extra structure associated to being a free category. This would give some more justification for your approach of viewing a graph as a category with extra structure.