Construction of left adjoint to free $Set \to Cat$? In Awodey's "Category theory" it is mentioned (beginning of 9.6) that free functor $F \colon Set \to Cat$ has a left adjoint $V \colon Cat \to Set$. What is a canonical construction of this?
 A: The functor $V$ sends each small category $C$ to the set of connected components of $C$. The connected components are the equivalence classes for the equivalence relation $\sim$ where $X \sim Y$ if and only if there is a zig-zag of morphisms starting at $X$ and ending at $Y$. A zig-zag consists of objects $X_1,X_2,...,X_n$, and morphisms from each even-numbered object to the preceding and, except for $X_n$ if $n$ is even, following objects, or alternatively, to each even-numbered object from the preceding and following objects. The arrows alternate direction in a zig-zag.
The unit functor from a small category $C$ to $F(V(C))$ sends each object $X$ to the corresponding equivalence class $[X]$. On the other hand, for a set $S$, the counit map from $V(F(S))$ to $S$ sends each connected component of the discrete category on $S$ to its single member.
A: Given any set $X$ the free category $F(X)$ has objects $X$ and only identity morphisms. So when $\mathcal C$ is any category, what are the possible functors $\psi\colon \mathcal C\to F(X)$? Since $F(X)$ has only identity morphisms, $\psi$ is determined by the map on objects $\psi\colon \operatorname{Ob}(\mathcal C)\to X$. A morphism $f\colon A\to B$ in $\mathcal C$ must be sent to an identity morphism $\psi(A)\to\psi(B)$, which is only possible when $\psi(A)=\psi(B)$. Hence all objects in one connected component of $\mathcal C$ (connected by a finite sequence of arrows in either direction) have to get mapped to the same element of $X$.
Thus, $\operatorname{Hom}_{\mathbf{Cat}}(\mathcal C, F(X))$ is in natural bijection with $\operatorname{Hom}_{\mathbf{Set}}(V(\mathcal C), X)$, where $V(\mathcal C)$ is the set of connected components of $\mathcal C$.
