Skip to content
Official PYQ · 2026

GATE CS 2026 Set 1 Q45 — Graphs: Connectivity, Matching, Colouring

Explain with AI

An undirected, unweighted, simple graph G(V,E)G(V, E) is said to be 22-colorable if there exists a function c:V→{0,1}c: V \rightarrow\{0,1\} such that for every (u,v)∈E,c(u)≠c(v)(u, v) \in E, c(u) \neq c(v).

Which of the following statements about 22-colorable graphs is/are true?

Select all correct options
View worked solution

Answer: B;C

A graph GG is 22-colorable if and only if it is bipartite. Let us analyze each statement based on the properties of bipartite graphs:

  • Statement A is False: A fundamental theorem in graph theory states that a graph is bipartite (2-colorable) if and only if it contains no odd cycles. Therefore, a 22-colorable graph cannot contain any cycles of odd length.
  • Statement B is True: A bipartite graph can contain cycles of even length. For example, the cycle graph C4C_4 (a square) is 22-colorable and has an even length of 44.
  • Statement C is True & Statement D is False: We can test if a graph G(V,E)G(V, E) is 22-colorable using a standard graph traversal algorithm like Breadth-First Search (BFS) or Depth-First Search (DFS):
    1. Start traversing from an uncolored vertex, coloring it 00.
    2. Color all its neighbors with 11, their neighbors with 00, and so on.
    3. If we ever find an edge connecting two vertices of the same color, the graph is not 22-colorable.
    Since BFS/DFS visits each vertex and each edge a constant number of times, the time complexity using an adjacency list representation is Θ(∣V∣+∣E∣)\Theta(|V| + |E|). This is optimal because any algorithm must examine every vertex and edge in the worst case to determine colorability.

Thus, the true statements are B and C.

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

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