GATE CS 2015, set 1 · Question 51 · Algorithms · Multiple choice (MCQ) · 2 marks · −2/3 for a wrong answer

Let G = (V, E) be a simple undirected graph, and s be a particular vertex in it called the source. For x ∈ V, let d(x) denote the shortest distance in G from s to x. A breadth first search (BFS) is performed starting at s. Let T be the resultant BFS tree. If (u,v) is an edge of G that is not in T, then which one of the following CANNOT be the value of d(u) - d(v)?

  1. (A) -1
  2. (B) 0
  3. (C) 1
  4. (D) 2
Answer

Answer (D)

Answer from the official GATE CS 2015 answer key.

The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes