Question
Download Solution PDFWhen using Dijkstra’s algorithm to find shortest path in a graph, which of the following statement is not true?
Answer (Detailed Solution Below)
Detailed Solution
Download Solution PDFConcept:
Dijkstra’s algorithm is used to find single source shortest path i.e path between any two vertices in a graph. All edges must have non-negative weights and graph must be connected.
Explanation:
V |
a |
b |
c |
d |
e |
f |
g |
a |
0a |
3a |
5a |
6a |
Inf |
Inf |
Inf |
b |
0a |
3a |
5a |
5b |
Inf |
Inf |
Inf |
C |
0a |
3a |
5a |
5b |
11c |
8c |
12c |
d |
0a |
3a |
5a |
5b |
11c |
8c |
12c |
f |
0a |
3a |
5a |
5b |
11c |
8c |
9f |
So, we get the shortest distance from a to g . (a -> b -> c -> d -> f -> g).
Last updated on Jul 7, 2025
-> The UGC NET Answer Key 2025 June was released on the official website ugcnet.nta.ac.in on 06th July 2025.
-> The UGC NET June 2025 exam will be conducted from 25th to 29th June 2025.
-> The UGC-NET exam takes place for 85 subjects, to determine the eligibility for 'Junior Research Fellowship’ and ‘Assistant Professor’ posts, as well as for PhD. admissions.
-> The exam is conducted bi-annually - in June and December cycles.
-> The exam comprises two papers - Paper I and Paper II. Paper I consists of 50 questions and Paper II consists of 100 questions.
-> The candidates who are preparing for the exam can check the UGC NET Previous Year Papers and UGC NET Test Series to boost their preparations.