GATE Exam  >  GATE Questions  >  Dijkstra’s single source shortest path ... Start Learning for Free
Dijkstra’s single source shortest path algorithm when run from vertex a in the above graph, computes the correct shortest path distance to;
  • a)
    only vertex a
  • b)
    only vertices a, e, f, g, h
  • c)
    only vertices a, b, c, d
  • d)
    all the vertices
Correct answer is option 'D'. Can you explain this answer?
Verified Answer
Dijkstra’s single source shortest path algorithm when run from v...
Dijkstra's single source shortest path is not guaranteed to work for graphs with negative weight edges, but it works for the given graph.
Let us see...
Let us run the 1st pass b 1 b is minimum, so shortest distance to b is 1
After 1st pass, distances are c 3. e -2. e is minimum, so shortest distance toe is -2 After 2nd pass, distances are c 3, f 0. f is minimum, so shortest distance t of is 0 After 3rd pass, distances are c 3, g 3. Both are same, let us take g. so shortest distance to g is 3. After 4th pass, distances are c 3, h 5 c is minimum, so shortest distance to c is 3 After 5th pass, distances are h -2 h is minimum, so shortest distance to h is -2.
View all questions of this test
Explore Courses for GATE exam
Dijkstra’s single source shortest path algorithm when run from vertex a in the above graph, computes the correct shortest path distance to;a)only vertex ab)only vertices a, e, f, g, hc)only vertices a, b, c, dd)all the verticesCorrect answer is option 'D'. Can you explain this answer?
Question Description
Dijkstra’s single source shortest path algorithm when run from vertex a in the above graph, computes the correct shortest path distance to;a)only vertex ab)only vertices a, e, f, g, hc)only vertices a, b, c, dd)all the verticesCorrect answer is option 'D'. 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 Dijkstra’s single source shortest path algorithm when run from vertex a in the above graph, computes the correct shortest path distance to;a)only vertex ab)only vertices a, e, f, g, hc)only vertices a, b, c, dd)all the verticesCorrect answer is option 'D'. Can you explain this answer? covers all topics & solutions for GATE 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Dijkstra’s single source shortest path algorithm when run from vertex a in the above graph, computes the correct shortest path distance to;a)only vertex ab)only vertices a, e, f, g, hc)only vertices a, b, c, dd)all the verticesCorrect answer is option 'D'. Can you explain this answer?.
Solutions for Dijkstra’s single source shortest path algorithm when run from vertex a in the above graph, computes the correct shortest path distance to;a)only vertex ab)only vertices a, e, f, g, hc)only vertices a, b, c, dd)all the verticesCorrect answer is option 'D'. 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 Dijkstra’s single source shortest path algorithm when run from vertex a in the above graph, computes the correct shortest path distance to;a)only vertex ab)only vertices a, e, f, g, hc)only vertices a, b, c, dd)all the verticesCorrect answer is option 'D'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Dijkstra’s single source shortest path algorithm when run from vertex a in the above graph, computes the correct shortest path distance to;a)only vertex ab)only vertices a, e, f, g, hc)only vertices a, b, c, dd)all the verticesCorrect answer is option 'D'. Can you explain this answer?, a detailed solution for Dijkstra’s single source shortest path algorithm when run from vertex a in the above graph, computes the correct shortest path distance to;a)only vertex ab)only vertices a, e, f, g, hc)only vertices a, b, c, dd)all the verticesCorrect answer is option 'D'. Can you explain this answer? has been provided alongside types of Dijkstra’s single source shortest path algorithm when run from vertex a in the above graph, computes the correct shortest path distance to;a)only vertex ab)only vertices a, e, f, g, hc)only vertices a, b, c, dd)all the verticesCorrect answer is option 'D'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Dijkstra’s single source shortest path algorithm when run from vertex a in the above graph, computes the correct shortest path distance to;a)only vertex ab)only vertices a, e, f, g, hc)only vertices a, b, c, dd)all the verticesCorrect answer is option 'D'. 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