  We present analytical results for the distribution of the number of cycles in
directed and undirected random 2-regular graphs (2-RRGs) consisting of $N$
nodes. In directed 2-RRGs each node has one inbound link and one outbound link,
while in undirected 2-RRGs each node has two undirected links. Since all the
nodes are of degree $k=2$, the resulting networks consist of cycles. These
cycles exhibit a broad spectrum of lengths, where the average length of the
shortest cycle in a random network instance scales with $\ln N$, while the
length of the longest cycle scales with $N$. The number of cycles varies
between different network instances in the ensemble, where the mean number of
cycles $\langle S \rangle$ scales with $\ln N$. Here we present exact
analytical results for the distribution $P_N(S=s)$ of the number of cycles $s$
in ensembles of directed and undirected 2-RRGs, expressed in terms of the
Stirling numbers of the first kind. In both cases the distributions converge to
a Poisson distribution in the large $N$ limit. The moments and cumulants of
$P_N(S=s)$ are also calculated. The statistical properties of directed 2-RRGs
are equivalent to the combinatorics of cycles in random permutations of $N$
objects. In this context our results recover and extend known results. In
contrast, the statistical properties of cycles in undirected 2-RRGs have not
been studied before.
