Question
Let be an undirected complete graph on vertices, where . Then, the number of different Hamiltonian cycles in is equal to
Official answer and solution
- Accepted answers
- C, or D
- From
- Official GATE 2019 answer key
Official answer key accepted both C and D. The standard theoretical formula for undirected Hamiltonian cycles in K_n is (n - 1)! / 2 (Option D), which equals 1 for n = 3 (Option C).
Solution
Calculate the number of undirected Hamiltonian cycles in a complete graph K_n.
In a complete undirected graph with vertices:
- A Hamiltonian cycle visits every vertex exactly once and returns to the start vertex.
- Starting at an arbitrary fixed vertex, the remaining vertices can be visited in cyclic orders.
- Because the graph is undirected, traversing the cycle in the clockwise direction and the counter-clockwise direction traverses the exact same set of edges.
- Dividing by 2 for the direction of traversal gives:
For , .
Due to ambiguous wording in the question (whether a general formula or a specific minimum case was sought), the official GATE answer key accepted both Option C (1) and Option D ().
C
Forgetting to divide by 2 for undirected cycles, which yields directed cycles (n - 1)!.
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2019 Computer Science and Information Technology (CS)
- Question
- 22 of 65, printed as CS Q.12
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.