Calculate the number of connected graphs $G=(V,E)$ with V={1,2,.....,n} that contain the cycle {1,2},{2,3},{3,4},{4,1} and $|E|=n$

36 Views Asked by At

I'm trying to calculate the number of such graphs and I'm not sure if I'm doing it correctly. I understand that I basically have to calculate the number of trees with $(n-4)$ vertexes and I think that the answer supposed to be

$$4*2^((n-4) choose 2)$$ The 4 in the equation is because we can connect it to the 4 vertexes 1,2,3,4.

Another approach I thought about is to take the 4 we are given, and calculate like in a line the other possibilities in something like-

$$4*(n-4)!$$

Which way is more correct? Is any of it is correct at all?

1

There are 1 best solutions below

2
On BEST ANSWER

As you noted if we have a graph like the one you said and we contract the $4$ vertices $\{1,2,3,4\}$ we must get a tree with $n-3$ vertices. And for each such tree there are $4$ graphs, depending on which of the vertices $\{1,2,3,4\}$ has an edge going out to the rest (this works for $n\geq 5)$.

Hence the number of such graphs is $4T(n-3)$ where $T(n)$ is the number of labelled trees on $\{1,2,\dots, n\}$. One has $T(n) = n^{n-2}$, this result is sometimes known as Cayley's formula.

It follows that the result we are looking for is $4\cdot n^{n-3-2} = 4\cdot n^{n-3-2}$.