Skip to content
Official PYQ · 2014

GATE CS 2014 Set 1 Q3 — Graphs

Explain with AI

Let G=(V,E)G=(V,E) be a directed graph where VV is the set of vertices and EE the set of edges. Then which one of the following graphs has the same strongly connected components as GG ?

Choose one option
View worked solution

Answer: B

A strongly connected component (SCC) of a directed graph G=(V,E)G = (V, E) is a maximal subgraph where for every pair of vertices u,vu, v, there is a path from uu to vv and a path from vv to uu.

Let us analyze the options:

  • Option B (G2G_2): This is the transpose graph GTG^T, where every edge (u,v)otinE(u, v) otin E is not used, and instead every edge (u,v)extinE(u, v) ext{ in } E is reversed to (v,u)extinE2(v, u) ext{ in } E_2. If there is a path from uu to vv in GG, there is a path from vv to uu in G2G_2. Thus, mutual reachability is perfectly preserved, meaning GG and G2G_2 have the exact same SCCs.
  • Option A: The complement graph completely alters the reachability structure.
  • Option C: Adding edges for paths of length ≤2\leq 2 can merge distinct SCCs. For example, in 1→2→31 \to 2 \to 3, 11 and 33 are in different SCCs, but adding (1,3)(1,3) can change the reachability.
  • Option D: Removing isolated vertices changes the vertex set VV, thereby losing the isolated vertices which are themselves SCCs of size 1.

Therefore, the correct option is B.

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

Published
Report a correction
Keep exploringMore Graphs questions