# Right adjoint to forgetful functor $\mathbf{Cat} \to \mathbf{Graph}$

There is a forgetful functor $U:\mathbf{Cat} \to \mathbf{Graph}$, which assigns a (small) category to its underlying (small) graph. Also, it has a left adjoint $F:\mathbf{Graph} \to \mathbf{Cat}$, called free functor, which assigns a graph to the freely-generated category.

My question is: is there a right adjoint (cofree) to $U$? If exists, how to construct? if not, why not?

I guess this is not as easy as the case $\mathbf{Top} \to \mathbf{Set}$ or $\mathbf{Cat} \to \mathbf{Set}$ because $U$ preserves coproducts and because a graph has edges and vertices.

Thanks.

Assume that $R$ is right adjoint to $U$, i.e. $\hom_{\mathsf{Graph}}(U(\mathcal{C}),\Gamma) \cong \hom_{\mathsf{Cat}}(\mathcal{C},R(\Gamma))$ for categories $\mathcal{C}$ and graphs $\Gamma$. For $\mathcal{C} = \{\bullet\}$ we see that the objects of $R(\Gamma)$ are the vertices of $\Gamma$. For $\mathcal{C} = \{\bullet \to \bullet\}$ we see that the morphisms of $R(\Gamma)$ are the edges of $\Gamma$. Naturality with respect to the two inclusions of $\{\bullet\}$ into $\{\bullet \to \bullet\}$ shows that the identification is compatible with start and end vertex. But this cannot work, since a graph doesn't always have an edge $u \to w$ when there are edges $u \to v$ and $v \to w$. Also, it doesn't always have an edge $u \to u$.
$U$ does not preserve colimits so it cannot have a right adjoint. For example the span $1 \leftarrow 1 \sqcup 1 \to 2$ (where $1$ is the terminal category and $2$ is the arrow) has pushout $B\mathbb{N}$ (the category with a single object and endomorphism monoid $\mathbb{N}$) in categories, but just a single loop in graphs.