GATE Exam  >  GATE Questions  >  Which of the following statements is false?a)... Start Learning for Free
Which of the following statements is false?
  • a)
    The depth of any DFS (Depth First Search) tree rooted at a vertex is at least as much as the depth of any BFS tree rooted at the same vertex.
  • b)
    if all edges in a graph have distinct weight then the shortest path between two vertices is unique
  • c)
    For a directed graph, the absence of back edges in a DFS tree means graph has no cycle
  • d)
    BFS takes O(V2) time in a graph G(V,E) if the graph is represented with an adjacency matrix.
Correct answer is option 'B'. Can you explain this answer?
Verified Answer
Which of the following statements is false?a)The depth of any DFS (Dep...
(a) TRUE. Since BFS finds paths using the fewest number of edges, the BFS depth of any vertex is at least as small as the DFS depth of the same vertex. Thus, the DFS tree has a greater or equal depth.
(b) FALSE. Even if no two edges have the same weight, there could be two paths with the same weight. For example, there could be two paths from s to t with lengths 3 + 5 = 8 and 2 + 6 = 8. These paths have the same length (8) even though the edges (2, 3, 5, 6) are all distinct.
(c) TRUE. It is true that the absence of back edges with respect to a DFS tree implies that the graph is acyclic.
(d) TRUE. With an adjacency matrix representation, visiting each vertex takes O(V ) time, as we must check all N possible outgoing edges in the adjacency matrix. Thus, BFS will take O(V 2 ) time using an adjacency matrix.
View all questions of this test
Most Upvoted Answer
Which of the following statements is false?a)The depth of any DFS (Dep...
False Statement: Option B - if all edges in a graph have distinct weight then the shortest path between two vertices is unique.

Explanation:
- The shortest path between two vertices in a graph is the path with the minimum sum of edge weights.
- In a graph where all edges have distinct weights, there can be multiple paths with the same minimum sum of edge weights.
- Let's consider an example to illustrate this:

Graph:

A --(2)-- B --(3)-- C

\ /

--(4)--

- In this graph, there are two paths from vertex A to vertex C with the same minimum sum of edge weights (2 + 3 = 5):

1. A -> B -> C
2. A -> C

- Both paths have a sum of edge weights equal to 5, which is the minimum in this graph. Therefore, the shortest path between two vertices is not unique.

Conclusion:
- Option B is the false statement because in a graph where all edges have distinct weights, the shortest path between two vertices is not necessarily unique.
Explore Courses for GATE exam
Which of the following statements is false?a)The depth of any DFS (Depth First Search) tree rooted at a vertex is at least as much as the depth of any BFS tree rooted at the same vertex.b)if all edges in a graph have distinct weight then the shortest path between two vertices is uniquec)For a directed graph, the absence of back edges in a DFS tree means graph has no cycled)BFS takes O(V2) time in a graph G(V,E) if the graph is represented with an adjacency matrix.Correct answer is option 'B'. Can you explain this answer?
Question Description
Which of the following statements is false?a)The depth of any DFS (Depth First Search) tree rooted at a vertex is at least as much as the depth of any BFS tree rooted at the same vertex.b)if all edges in a graph have distinct weight then the shortest path between two vertices is uniquec)For a directed graph, the absence of back edges in a DFS tree means graph has no cycled)BFS takes O(V2) time in a graph G(V,E) if the graph is represented with an adjacency matrix.Correct answer is option 'B'. Can you explain this answer? for GATE 2024 is part of GATE preparation. The Question and answers have been prepared according to the GATE exam syllabus. Information about Which of the following statements is false?a)The depth of any DFS (Depth First Search) tree rooted at a vertex is at least as much as the depth of any BFS tree rooted at the same vertex.b)if all edges in a graph have distinct weight then the shortest path between two vertices is uniquec)For a directed graph, the absence of back edges in a DFS tree means graph has no cycled)BFS takes O(V2) time in a graph G(V,E) if the graph is represented with an adjacency matrix.Correct answer is option 'B'. Can you explain this answer? covers all topics & solutions for GATE 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Which of the following statements is false?a)The depth of any DFS (Depth First Search) tree rooted at a vertex is at least as much as the depth of any BFS tree rooted at the same vertex.b)if all edges in a graph have distinct weight then the shortest path between two vertices is uniquec)For a directed graph, the absence of back edges in a DFS tree means graph has no cycled)BFS takes O(V2) time in a graph G(V,E) if the graph is represented with an adjacency matrix.Correct answer is option 'B'. Can you explain this answer?.
Solutions for Which of the following statements is false?a)The depth of any DFS (Depth First Search) tree rooted at a vertex is at least as much as the depth of any BFS tree rooted at the same vertex.b)if all edges in a graph have distinct weight then the shortest path between two vertices is uniquec)For a directed graph, the absence of back edges in a DFS tree means graph has no cycled)BFS takes O(V2) time in a graph G(V,E) if the graph is represented with an adjacency matrix.Correct answer is option 'B'. Can you explain this answer? in English & in Hindi are available as part of our courses for GATE. Download more important topics, notes, lectures and mock test series for GATE Exam by signing up for free.
Here you can find the meaning of Which of the following statements is false?a)The depth of any DFS (Depth First Search) tree rooted at a vertex is at least as much as the depth of any BFS tree rooted at the same vertex.b)if all edges in a graph have distinct weight then the shortest path between two vertices is uniquec)For a directed graph, the absence of back edges in a DFS tree means graph has no cycled)BFS takes O(V2) time in a graph G(V,E) if the graph is represented with an adjacency matrix.Correct answer is option 'B'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Which of the following statements is false?a)The depth of any DFS (Depth First Search) tree rooted at a vertex is at least as much as the depth of any BFS tree rooted at the same vertex.b)if all edges in a graph have distinct weight then the shortest path between two vertices is uniquec)For a directed graph, the absence of back edges in a DFS tree means graph has no cycled)BFS takes O(V2) time in a graph G(V,E) if the graph is represented with an adjacency matrix.Correct answer is option 'B'. Can you explain this answer?, a detailed solution for Which of the following statements is false?a)The depth of any DFS (Depth First Search) tree rooted at a vertex is at least as much as the depth of any BFS tree rooted at the same vertex.b)if all edges in a graph have distinct weight then the shortest path between two vertices is uniquec)For a directed graph, the absence of back edges in a DFS tree means graph has no cycled)BFS takes O(V2) time in a graph G(V,E) if the graph is represented with an adjacency matrix.Correct answer is option 'B'. Can you explain this answer? has been provided alongside types of Which of the following statements is false?a)The depth of any DFS (Depth First Search) tree rooted at a vertex is at least as much as the depth of any BFS tree rooted at the same vertex.b)if all edges in a graph have distinct weight then the shortest path between two vertices is uniquec)For a directed graph, the absence of back edges in a DFS tree means graph has no cycled)BFS takes O(V2) time in a graph G(V,E) if the graph is represented with an adjacency matrix.Correct answer is option 'B'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Which of the following statements is false?a)The depth of any DFS (Depth First Search) tree rooted at a vertex is at least as much as the depth of any BFS tree rooted at the same vertex.b)if all edges in a graph have distinct weight then the shortest path between two vertices is uniquec)For a directed graph, the absence of back edges in a DFS tree means graph has no cycled)BFS takes O(V2) time in a graph G(V,E) if the graph is represented with an adjacency matrix.Correct answer is option 'B'. Can you explain this answer? tests, examples and also practice GATE tests.
Explore Courses for GATE exam
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev