Suppose a graph $G$ is connected with $n$ vertices and $e$ edges. If $n \geq 3$ and $G$ has exactly one cycle, prove that $e=n$.

291 Views Asked by At

Suppose a graph $G$ is connected with $n$ vertices and $e$ edges. If $n \ge 3$ and $G$ has exactly one cycle, prove that $e = n$.

2

There are 2 best solutions below

0
On

Let $C$ be the only cycle in $G$. Consider any two adjacent vertices $u$ & $v$ that belong to $C$. Even if I remove the edge between $u$ & $v$, $G$ will remain connected. Let $G'$ be the new graph after removing the edge $uv$. $G'$ is connected, and has no cycle (bcoz we removed the $uv$ edge), hence $G'$ is a tree. $G'$ has $n-1$ edges $\implies$ $G$ has $n$ edges.

0
On

Consider the spanning tree of the graph $G$, The number of edges in the spanning tree is $n-1$. As $G$ has only one cycle, we can add only one more edge to the spanning tree to get the cycle(as any edges added to the spanning tree create a cycle), so $G$ has $n$ edges.