GATE | GATE CS 2019 | Question 19

Let G be an undirected complete graph on n vertices, where n > 2. Then, the number of different Hamiltonian cycles in G is equal to

(A) n!
(B) n – 1!
(C) 1
(D) (n-1)! / 2

Answer: (D)

Explanation: A simple circuit in a graph G that passes through every vertex exactly once is called a Hamiltonian circuit.

In an undirected complete graph on n vertices, there are n permutations are possible to visit every node. But from these permutations, there are:

  1. n different places (i.e., nodes) you can start;
  2. 2 (clockwise or anticlockwise) different directions you can travel.

So any one of these n! cycles is in a set of 2n cycles which all contain the same set of edges. So there are,

= (n)! / (2n)
= (n−1)! / 2 distinct Hamilton cycles. 

Option (D) is correct.

Quiz of this Question

My Personal Notes arrow_drop_up
Article Tags :


Please write to us at to report any issue with the above content.