GATE | GATE CS 2012 | Question 38
Consider the directed graph shown in the figure below. There are multiple shortest paths between vertices S and T. Which one will be reported by Dijstra?s shortest path algorithm? Assume that, in any iteration, the shortest path to a vertex v is updated only when a strictly shorter path to v is discovered.

(A) SDT
(B) SBDT
(C) SACDT
(D) SACET
Answer: (D)
Explanation:
Background Required – Dijkstra’s Single Source Shortest Path Algorithm
Explanation – Applying Dijkstra’s algorithm to compute the shortest distances from S and finally generating the Tree as given below in the diagram.
This solution is contributed by Pranjul Ahuja.
Recommended Posts:
- GATE | GATE CS 2012 | Question 65
- GATE | GATE CS 2012 | Question 51
- GATE | GATE CS 2012 | Question 50
- GATE | GATE CS 2012 | Question 49
- GATE | GATE CS 2012 | Question 48
- GATE | GATE CS 2012 | Question 47
- GATE | GATE CS 2012 | Question 46
- GATE | GATE CS 2012 | Question 45
- GATE | GATE CS 2012 | Question 65
- GATE | GATE CS 2012 | Question 65
- GATE | GATE CS 2012 | Question 42
- GATE | GATE CS 2012 | Question 41
- GATE | GATE CS 2012 | Question 40
- GATE | GATE CS 2012 | Question 39
- GATE | GATE CS 2012 | Question 65





