GateAI
Graph Theory

GATE CSE 2026 Set 2 · Q8

MCQ2 marksMedium

Time

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?

GATE CSE 2026 Set 2 Q8 diagram

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: A) Such a trip is possible for (i), but not for (ii).

Graph Theory

The problem asks whether a Hamiltonian cycle (a closed loop visiting every vertex exactly once) exists in graphs (i) and (ii).

  1. Graph (i) is a 4×44 \times 4 grid graph with 1616 vertices.

    • A grid graph Pm×PnP_m \times P_n has a Hamiltonian cycle if and only if m,n≥2m, n \ge 2 and the total number of vertices m×nm \times n is even.

    • Since 4×4=164 \times 4 = 16 is even, a Hamiltonian cycle exists (for example, traversing the perimeter and snaking through the inner rows). Thus, such a trip is possible for (i).

  2. Graph (ii) has 55 vertices:

    • Let the outer four vertices be Top-Left (TLTL), Top-Right (TRTR), Bottom (BB), and Bottom-Left (BLBL), and the inner vertex be II.

    • Notice that vertex BLBL has degree 22, connected only to TLTL and BB.

    • Similarly, vertex II has degree 22, connected only to TLTL and BB.

    • In any Hamiltonian cycle, all vertices must have exactly degree 22 within the cycle. Therefore, the cycle must include both incident edges of BLBL (edges (TL,BL)(TL, BL) and (BL,B)(BL, B)) and both incident edges of II (edges (TL,I)(TL, I) and (I,B)(I, B)).

    • This forces a smaller cycle TL−BL−B−I−TLTL - BL - B - I - TL of length 44, which visits only 44 vertices and prematurely closes without visiting TRTR.

    • Alternatively, vertex TLTL would require degree 44 in the cycle to connect to TRTR as well, which is impossible. Hence, no Hamiltonian cycle exists, and such a trip is not possible for (ii).

Therefore, the correct statement is that such a trip is possible for (i), but not for (ii) (Option A).

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Graph Theory previous year question is Q8 of the GATE CSE 2026 Set 2 paper. Find more GATE CSE PYQs on Graph Theory in Engineering Mathematics, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Graph Theory PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Graph Theory in GATE CSE

Graph Theory has 21 GATE CSE PYQs across 14 papers from 2012 to 2026. 6 of them are 2-mark MCQs like this one, and GATE CSE 2026 Set 2 has 2.

How GATE tests Graph Theory

More from GATE CSE 2026 Set 2

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2026 Set 2 · Q8 · MCQ

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?

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.