GATE CS 2018 · Graph Traversals (BFS & DFS)

MCQ · 2 marks · Problem PROG-GRPH-0059

Let G be a simple undirected graph. Let TD be a depth first search tree of G. Let TB be a breadth first search tree of G. Consider the following statements. (I) No edge of G is a cross edge with respect to TD. (A cross edge in G is between two nodes neither of which is an ancestor of the other in TD.) (II) For every edge (u,v) of G, if u is at depth i and v is at depth j in TB, then |i-j|=1.Which of the statements above must necessarily be true?
  1. A
    I only
  2. B
    II only
  3. C
    Both I and II
  4. D
    Neither I nor II

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

Show the worked solutionOfficial GATE Answer Key: Option A.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/204104/gate2018-30

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