Sophie wrote:

> Jonathan, I like how you make explicit the connection to group theory. Is this connection a result of this particular example (maybe the fact that \\(G\\) has only one node and one edge) or a more general phenomenon?

In the modern understanding of things, a **group** is a category with one object where every morphism has an inverse. I cleverly chose the categories in Puzzles 112 and 113 to be groups, because I like groups. As I'm sure you've noticed, the category in Puzzle 112 is the group \\(\mathbb{Z}/2\\), while that in Puzzle 113 is \\(\mathbb{Z}/3\\).

If the category \\(\mathcal{C}\\) is a group, a functor \\(F : \mathcal{C} \to \mathbf{Set}\\) is called an **[action](** of that group. If the one object of \\(\mathcal{C}\\) is \\(x\\), then \\(S = F(x)\\) is a set and we say we have an action of our group **on the set \\(S\\)**.

There's a lot of fun to be had studying actions of groups on sets. This is how group theory originated in the first place! There are nice connections to number theory. Here's a generalization of Puzzles 112 and 113, that can be solved the same way:

**Puzzle.** If \\(p\\) is prime, how many actions of the group \\(\mathbb{Z}/p\\) are there on a set with \\(n\\) elements?

I'm making \\(p\\) prime to make the problem easy, not to make it hard! But the formula is a bit complicated. It gets a tiny bit simpler when \\(n\\) is a multiple of \\(p\\).