"the above example degree of each vertex is 2, so the graph will have a Hamiltonian cycle."
Having a degree 2 for each vertex is a necessary but not sufficient condition to ensure a graph has a hamiltonian cycle. Accordingly, the example you provide has a hamiltonian cycle, but not all graphs having vertices of degree two necessarily have a hamiltonian cycle.
The paragraph you quoted explains the condition that guarantees the existence of a hamiltonian cycle.
[EDIT 1]
"Can you please give me the example of a graph having degree 2 of each vertex but not having Hamiltonian Cycle please?"
Answer: Draw two independent triangles. Each vertex is if degree two, but you obviously cannot have a hamiltonian cycle.
However, if you have a hamiltonian cycle, that implies that all the vertices are at least of degree 2. Meaning that there is no way you will have a hamiltonian cycle if any of the vertices is of degree 0 or 1.
From a logical point of view, p => q
is not equivalent to q => p
. I walked in the rain without umbrella implies I got wet. I got wet does not mean that it was raining.
Graph has a hamiltonian circuit => each vertex has at least degree 2.
Each vertex has at least degree 2 does not => graph has hamiltonian circuit.
However:
"G = (V,E) has n ≥ 3 vertices and every vertex has degree ≥ n/2 => G has a Hamilton circuit."
Note: =>
is the symbol for implies