Skip to content
Official PYQ · 2019

GATE CS 2019 Q12 — Graphs: Connectivity, Matching, Colouring

Explain with AI

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

Select all correct options
View worked solution

Answer: C;D

To find the number of different Hamiltonian cycles in an undirected complete graph G=KnG = K_n on nn vertices (where n>2n > 2):

1. General Formula Derivation

  • A Hamiltonian cycle visits every vertex of the graph exactly once and returns to the starting vertex.
  • Since the graph is complete (KnK_n), every vertex is connected to every other vertex.
  • Fixing a starting vertex to avoid cyclic shifts, there are (n−1)!(n-1)! ways to arrange the remaining n−1n-1 vertices in a sequence.
  • Because the graph is undirected, a cycle traversed in the clockwise direction is identical to the same cycle traversed in the counter-clockwise direction (e.g., v1→v2→v3→v1v_1 \to v_2 \to v_3 \to v_1 is the same as v1→v3→v2→v1v_1 \to v_3 \to v_2 \to v_1).
  • Therefore, we divide the total permutations by 22 to account for this reversal symmetry: Number of Hamiltonian cycles=(n−1)!2\text{Number of Hamiltonian cycles} = \frac{(n-1)!}{2}

This matches Option D.

2. Special Case (n=3n = 3)

  • The problem states n>2n > 2. If we consider the case where n=3n = 3: (3−1)!2=2!2=1\frac{(3-1)!}{2} = \frac{2!}{2} = 1
  • Thus, for n=3n = 3, the number of different Hamiltonian cycles is exactly 11.

This matches Option C.

Since both interpretations are valid, both Option C and Option D are correct.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Graphs: Connectivity, Matching, Colouring questions