GATE Assistant

Past questions › Computer Science and Information Technology › GATE 2025 set2

GATE 2025 set2 · CS · MSQ · 1 mark · Algorithms › Graph Algorithms

GATE 2025 set2 Computer Science and Information Technology question: Which of the following statements regarding Breadth First Search (BFS) and Depth First…

Which of the following statements regarding Breadth First Search (BFS) and Depth First Search (DFS) on an undirected simple graph is/are TRUE?

  1. (A)

    A DFS tree of is a Shortest Path tree of .

  2. (B)

    Every non-tree edge of with respect to a DFS tree is a forward/back edge.

  3. (C)

    If is a non-tree edge of with respect to a BFS tree, then the distances from the source vertex to and in the BFS tree are within of each other.

  4. (D)

    Both BFS and DFS can be used to find the connected components of .

Show answer

Official answer: B,C,D

Practise this question with exam-style marking

Discussion

No discussion yet.

Join the discussion