Definition Let $G$ and $G'$ be directed graphs (in the sense of Definition A morphism from $G$ to $G'$ is a function $f: \operatorname{Vert}( G ) \amalg \operatorname{Edge}(G) \rightarrow \operatorname{Vert}(G') \amalg \operatorname{Edge}(G')$ which satisfies the following conditions:


For each vertex $v \in \operatorname{Vert}(G)$, the image $f(v)$ belongs to $\operatorname{Vert}(G')$.


Let $e \in \operatorname{Edge}(G)$ be an edge of $G$ with source $v = s(e)$ and target $w = t(e)$. Then exactly one of the following conditions holds:

  • The image $f(e)$ is an edge of $G'$ having source $s( f(e) ) = f(v)$ and target $t( f(e) ) = f(w)$.

  • The image $f(e)$ is a vertex of $G'$ satisfying $f(v) = f(e) = f(w)$.

We let $\operatorname{Graph}$ denote the category whose objects are directed graphs and whose morphisms are morphisms of directed graphs (with composition defined in the evident way).