TITLE: $A^A$ in category of graphs
QUESTION [6 upvotes]: (reference is Lawvere/Schanuel, Session 31, Ex. 1)
I'm trying to calculate the exponential object $A^A$ and its evalution map $e \colon A \times A^A \to A$ in the category of graphs, where $A$ is the "arrow graph" (ie. one arrow and two dots).
In the following, $D$ is the graph with one dot and no arrows, $1$ is the terminal object in this category (graph with one dot and one arrow, the loop).
So far I have:

The points of $\mathbf{1}\to A^A$ correspond to the maps $A\to A$ (via two standard isomorphisms), and since $\mathbf{1}$ is the loop, and there is one map of graphs $A \to A$, there is one loop in $A^A$.
The dots $D\to A^A$ correspond to the maps $A \times D \to A$, of which there are four, hence four dots in $A^A$.
The arrows $A \to A^A$ correspond to the maps $A \times A \to A$, of which there are four, hence four arrows in $A^A$.

But I'm stuck on how to put these together to constitute $A^A$ and its evaluation map.

REPLY [6 votes]: You're looking good so far. The only information you're missing is which arrows go with which dots. So let's introduce some notation.
Write $A=0\to 1$, so that $A\times D=\{0,1\}$ and $A\times A$ has vertices $\{(0,0),(0,1),(1,0),(1,1)\}$ and sole edge $\{((0,0),(1,1))\}$. Denote the four maps $D\times A\to A$ by $00,01,10,11$, where for instance $10(0)=1$ and $10(1)=0$. Write $p_x,p_y,m_1,m_0$ for the four maps $A\times A\to A$, sending respectively $(0,1)\mapsto 0$ and $(1,0)\mapsto 1$; $(0,1)\mapsto 1$ and $(1,0)\mapsto 0$; $(0,1),(1,0)\mapsto 1$; $(0,1),(1,0)\mapsto 0$. To determine their associated vertices we should precompose $p_x,p_y,m_1,m_0$ with the two inclusions $0,1:D\to A$. Under transposition, these become the two maps $a,b:D\times A\to A\times A$ with $a(0)=(0,0),a(1)=(0,1),b(0)=(1,0),b(1)=(1,1)$. (If you have unusual conventions for your Cartesian product, you could end up with the two "horizontal" maps, rather than the vertical ones, here.) 
So we want to compose each of $p_x,...,m_0$ with each of $a,b$. This is now a straightforward computation: $p_xa=00,p_xb=11 , p_ya=01,p_yb=01,m_0a=00,m_0b=01,m_1a=01,m_1b=11$. Thus $A^A=(\{00,01,10,11\},\{(01,01),(00,11),(00,01),(01,11)\})$.