Consider the tree arcs of a BFS traversal from a source node W in an unweighted, connected, undirected graph. The tree T formed by the tree arcs is a data structure for computing
Topic-wise GATE CS PYQs with verified steps
GATE CSE 2014 Set 2 · Q14
Time
Select one answerSingle correct
Solution
Official answer: B) the shortest path from W to every vertex in the graph.
Graph TraversalsBreadth-First Search (BFS) explores vertices level by level in increasing order of their distance from the source vertex .
In an unweighted graph, the tree arcs of a BFS traversal from form a BFS tree , which contains the shortest path (in terms of minimum number of edges) from the root to every reachable vertex in the graph.
Hence, the BFS tree serves as a data structure to compute the shortest path from to every vertex in the graph, making (B) the correct option.
Try the question first, then check your work.
Examiner trap
Recall that BFS on an unweighted graph finds the minimum number of edges from the source to every other reachable vertex.
This Graph Traversals previous year question is Q14 of the GATE CSE 2014 Set 2 paper. Find more GATE CSE PYQs on Graph Traversals in Algorithms, or browse all GATE CSE PYQs.
Free diagnostic
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.
An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.
Graph Traversals has 16 GATE CSE PYQs across 12 papers from 2014 to 2026. 5 of them are 1-mark MCQs like this one, and it is the only one in GATE CSE 2014 Set 2.
How GATE tests Graph TraversalsIndependent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.