Question
Figures (i) and (ii) represent intercity highway systems. The black dots represent cities and the line segments between them represent intercity highways.
A salesperson needs to make a trip. She needs to start from a city, visit each of the remaining cities exactly once, and finally return to the same city from which she started.
Which one of the following options is then true?
Official answer and solution
- Official answer
- A
- From
- Official GATE 2026 answer key
Solution
Determine whether each graph contains a Hamiltonian cycle.
A trip that starts at a city, visits every other city exactly once, and returns to the starting city is a Hamiltonian cycle.
- Figure (i) is a grid graph (). Any grid graph with at least one even dimension has a Hamiltonian cycle (for instance, snaking across the rows and returning along the left boundary column).
- Figure (ii) is the complete bipartite graph with parts of sizes and . Since a bipartite graph can only have cycles of even length and is odd (or equivalently, the 3 vertices of degree 2 must all use both edges incident to the same 2 hub vertices, requiring edges at the hubs in a 5-cycle), Figure (ii) has no Hamiltonian cycle.
Thus, such a trip is possible for (i), but not for (ii).
Option (A)
Confusing an Eulerian circuit with a Hamiltonian cycle.
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2026 Computer Science and Information Technology - Session 2 (CS2)
- Question
- 8 of 65
- Section
- General Aptitude
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.