On the symmetric labelled structure of 2-regular graphs Let $G$ be the symmetric labelled structure of 2-regular graphs (indexed by the number of vertices) then $G(x)=\frac{e^{-\frac{x}{2}-\frac{x^2}{4}}}{\sqrt{1-x}}$. Could you help me to solve this problem, please?
 A: You need to begin by finding the generating function for the number of connected $2$-regular graphs.
The connected $2$-regular graphs are the undirected cycle graphs. There are $(n-1)!$ labelled directed cycle graphs on $n$ vertices, so there are $\frac12(n-1)!$ labelled undirected cycle graphs on $n$ vertices: each undirected cycle graph can be directed in $2$ ways. Of course a cycle requires at least $3$ vertices, so if $c_n$ is the number of labelled undirected cycle graphs on $n$ vertices, we have $$c_n=\begin{cases}
0,&n=0,1,2\\\\
\frac12(n-1)!,&n\ge 3\;.
\end{cases}$$
This yields the exponential generating function $$\begin{align*}
C(x) &= \sum_{n\ge 0}c_n\frac{x^n}{n!}\\
&=\frac12\sum_{n\ge 3}\frac{(n-1)!}{n!}x^n\\
&=\frac12\sum_{n\ge 3}\frac{x^n}n\\
&=\frac12\left(\sum_{n\ge 1}\frac{x^n}n-x-\frac{x^2}2\right)\;.
\end{align*}$$
You should recognize (or be able easily to discover) the generating function for the series $\sum_{n\ge 1}\frac{x^n}n$, and after that it’s just a matter of plugging it into the exponential formula to get $G(x)=e^{C(x)}$.
A: Here is a brief observation on Brian Scott's excellent answer, which is that you may profit by placing this problem in the context of combinatorial species, which will produce these kinds of generating functions almost automatically.
The species of labelled two-regular graphs has the specification
$$\mathfrak{P}(\mathfrak{D}_{\ge 3}(\mathcal{Z}))$$
where $\mathfrak{P}$ is the set operator and $\mathfrak{D}$ denotes undirected cycles (dihedral symmetry). This simply says that 2-regular graphs are sets of undirected cycles starting with the triangle as the smallest.
Now in the labelled universe the exponential generating functions corresponding to combinatorial operators are constructed with the definition
$$\frac{Q(z)^n}{|G_n|}$$
where $Q(z)$ enumerates the objects that go into the $n$ slots that the group $G_n$ operates on. This is because
$$\sum_n \frac{n!}{|G_n|} \frac{z^n}{n!}$$
is the exponential generating function counting equivalence classes under the action of $G_n.$
The set operator corresponds to the symmetric group which has $n!$ elements, so we get
$$\sum_n \frac{Q(z)^n}{n!} = \exp Q(z).$$
The dihedral operator contains $2n$ permutations so we get
$$\sum_n \frac{Q(z)^n}{2n} = \frac{1}{2} \log\frac{1}{1-Q(z)}.$$
Therefore the generating function of two-regular labelled graphs is (substitute into the nested species equation)
$$G(z) = 
\exp\left(-\frac{1}{2}z -\frac{1}{2} z^2/2 + \frac{1}{2}\log\frac{1}{1-z} \right)$$
where we subtract out the terms for singleton nodes and two nodes connected by an edge, as these are not two-regular and, more importantly, do not exhibit dihedral symmetry. Two-regularity starts with an undirected cycle on three nodes, i.e. a triangle.
The generating function then becomes
$$G(z) = \exp\left(\frac{1}{2}\log\frac{1}{1-z} \right)
\exp\left(-\frac{1}{2}z -\frac{1}{2} z^2/2 \right)$$
or $$G(z) = \frac{\exp\left(-z/2 - z^2/4 \right)}{\sqrt{1-z}}$$
as claimed.
A somewhat more advanced use of this technique can be found at this MSE link.
