GateAI
Graph Traversals

GATE CSE 2026 Set 1 · Q55

MSQ2 marksEasy

Time

An undirected, unweighted, simple graph G(V,E)G(V, E) is said to be 2-colorable if there exists a function c:V→{0,1}c: V \rightarrow \{0, 1\} such that for every (u,v)∈E(u, v) \in E, c(u)≠c(v)c(u) \neq c(v). Which of the following statements about 2-colorable graphs is/are true?

Select all that applyOne or more correct

Pick every correct option

Solution

Step-by-step verified solution

Official answer: B) If G is 2-colorable, then G may contain cycles of even length; C) An optimal algorithm for testing whether G is 2-colorable runs in time (|V| + |E|), if G is represented as an adjacency list

Graph Traversals

A graph GG is 2-colorable if and only if it is bipartite.

  • Odd Cycles: A fundamental property of bipartite (2-colorable) graphs is that they contain no odd cycles. Therefore, statement (A) is false.

  • Even Cycles: Bipartite graphs may contain cycles of even length (for example, a 4-cycle C4C_4 is 2-colorable). Thus, statement (B) is true.

  • Algorithm Complexity: Testing whether a graph is bipartite (2-colorable) can be done using standard graph traversal (BFS or DFS) by assigning alternating colors level by level. With an adjacency list representation, this traversal visits every vertex and explores every edge, running in Θ(∣V∣+∣E∣)\Theta(|V| + |E|) time, which is optimal. Therefore, statement (C) is true and statement (D) is false.

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 Traversals previous year question is Q55 of the GATE CSE 2026 Set 1 paper. Find more GATE CSE PYQs on Graph Traversals in Algorithms, 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 Traversals 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 Traversals in GATE CSE

Graph Traversals has 16 GATE CSE PYQs across 12 papers from 2014 to 2026. 5 of them are 2-mark MSQs like this one, and GATE CSE 2026 Set 1 has 2.

How GATE tests Graph Traversals

More from GATE CSE 2026 Set 1

Share this solution

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

GateAI solution cardGATE CSE 2026 Set 1 · Q55 · MSQ

An undirected, unweighted, simple graph G(V, E) is said to be 2-colorable if there exists a function c: V → {0, 1} such that for every (u, v) ∈ E, c(u) ≠ c(v). Which of the following statements about 2-colorable graphs is/are 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.