Greedy-approach
October 26, 2023
Functional-Dependency
October 26, 2023
Greedy-approach
October 26, 2023
Functional-Dependency
October 26, 2023

Greedy-approach

Question 5
When using Dijkstra’s algorithm to find shortest path in a graph, which of the following statement is not true?
A
It can find shortest path within the same graph data structure
B
Every time a new node is visited, we choose the node with smallest known distance/cost (weight) to visit first
C
Shortest path always passes through least number of vertices
D
The graph needs to have a non-negative weight on every edge
Question 5 Explanation: 
TRUE: Dijkstra’s algorithm always find shortest path with in the same graph data structure. It uses a greedy technique to identify shortest path.
TRUE: Every time a new node is visited, we choose the node with the smallest known distance/cost (weight) to visit first
FALSE: It is false because this algorithm applicable any number of vertices.
TRUE: Dijkstra’s algorithm will support only positive weight edges.
Correct Answer: C
Question 5 Explanation: 
TRUE: Dijkstra’s algorithm always find shortest path with in the same graph data structure. It uses a greedy technique to identify shortest path.
TRUE: Every time a new node is visited, we choose the node with the smallest known distance/cost (weight) to visit first
FALSE: It is false because this algorithm applicable any number of vertices.
TRUE: Dijkstra’s algorithm will support only positive weight edges.
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!