Prove that a graph with the same number of edges and vertices contains one cycle 
We have a connected graph $G(V,E)$ that has $|E|= n$ edges and $n$ vertices. 
  Prove that the graph has one cycle in it.

I'm little bit confused here. I tried some ways but failed. Can you direct me?
 A: $G$ is connected so it has a spanning tree $T$. This uses up $n-1$ edges and has no cycles. There is one edge $e$ not used in the tree, say $e=(u,v)$. So any cycle in $G$ would have to use $e$. 
Now in $T$ there is a unique path between vertices $u$ and $v$ and so in $T\cup e$ that path plus $e$ is one cycle, say $C_1$. Can there be any others? Suppose $C_2$ is another cycle, and so we know that it must use $e$ but $C_2\neq C_1$. Then $C_2\setminus e$ and $C_1\setminus e$ are two different paths in $T$ from $u$ to $v$, a contradiction.
A: Prove it by induction on the number of vertices. If it does not have a cycle, take a longest path. The last vertex must be a leaf. Remove it and apply the induction hypothesis.
Then if the graph has a cycle, remove one edge of the cycle, and apply the tree equivalence ($n$ vertices and $n-1$ edges and connected means it has no cycle).
(I had a better way before, and will update this answer if I remember it.)
A: If $G$ has no cycles then it is a forest. Each tree in the forest has one edge less than vertices.
A: Euler formula says $|V|-|E|+f=2$ where $f$ is the number of face.
If it has no cycle, by Euler formula the number of edges would be $|E|=n-1$. Contradiction !
If it has $2$ cycles or more, $|E|>n$. Contradiction !
Therefore $G$ has exactly one cycle.
A: We first prove the necessary condition. Let e be any edge in the unique cycle
in G. Note that deleting e still leaves the graph connected. Now, G −e is a connected
graph with no cycles. Hence, G −e is a tree that has n vertices and n −1 edges. Hence G
has n edges.
We now prove the sufficiency condition. Let G have exactly n edges. If G has no cycles
then since G is connected, it must be a tree and hence must have exactly n−1 edges. Hence,
G must have at least one cycle. Let’s assume that G has more than one cycle. In that case,
let e1 and e2 be two edges such that each belongs to a cycle that does not contain the other.
Hence G−e1 −e2 is connected and has at most n−2 edges. This is a contradiction as any
connected graph with n vertices must have at least n −1 edges. Hence, our assumption
that G has more than one cycle is incorrect. Therefore G must have exactly one cycle.
