What are the free categories generated from a graph with a single object and no edge and a single object with one directed edge

category-theory

I've seen the following proposed solutions:

  1. A graph with one node and no edges

    Solution: Add an identity arrow.

  2. A graph with one node and one (directed) edge (hint: this edge can be composed with itself)

    Solution: Add infinite arrows to represent every number of applications of the directed edge.

ref1
ref2

To my understanding, the solution to 2 doesn't quite make sense – I feel like due to idempotence of the composition of identity with itself (and it seems to me that "one (directed) edge" would qualify as identity in this case), the free categories for (1) and (2) should be the same.

Best Answer

The free category generated from a (directed) graph is defined as follows: objects are vertices of a graph, while morphisms are paths in that graph. Not arrows. To complete the definition we need to artificially add the identity for each object, i.e. the "empty" path. With this setup we can very easily define morphism composition: it is concatenation of (compatible) paths.

And so as you can see, a single object with a single arrow has to generate a category with infinitely many morphisms, because such graph has infinitely many paths. You just keep concatenating the single arrow with itself. The same applies to any graph containing a loop.

And similarly a single object without arrows generates category with single object and single morphism: the identity. Which always has to be.

and it seems to me that "one (directed) edge" would qualify as identity in this case

No, it is not the identity. Such approach would be problematic. For example how would you choose the identity given a single object and multiple auto-arrows? And how would you define composition of such morphisms in a simple and consistent way? What would be morphisms anyway with this approach?

Related Question