GATE CS 2003 · Graph Traversals (BFS & DFS)

MCQ · 1 mark · Problem PROG-GRPH-0119

Let G = (V,E) be an undirected graph with a sub-graph G1 = (V1,E1), Weight are assigned to edges of G as follows\[w(e)=\left\{\begin{matrix} 0 &if \; e \in E1, \\ 1& otherwise \end{matrix}\right.\]A single-source shortest path algorithm is executed on the weighted graph (V,E,w) with an arbitrary vertex v1 of V1 as the source. Which of the following can always be inferred from the path costs computed?
  1. A
    The number of edges in the shortest paths from v1 to all vertices of G
  2. B
    G1 is connected
  3. C
    V1 forms a clique in G
  4. D
    G1 is a tree

Solve it on GATE DA practice →More Graph Theory & Algorithms problems

Show the worked solutionOfficial GATE Answer Key: Option B.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/954/gate2003-67

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com