edited by
918 views
0 votes
0 votes

When using Dijkstra’s algorithm to find shortest path in a graph, which of the following statement is not true?

  1. It can find shortest path within the same graph data structure
  2. Every time a new node is visited, we choose the node with smallest known distance/ cost (weight) to visit first
  3. Shortest path always passes through least number of vertices
  4. The graph needs to have a non-negative weight on every edge
edited by

1 Answer

0 votes
0 votes

Option A- It is true.

Option B- This is talking about Krushkal algorithm.

Option C- Dijkstra Algorithm does not works on number of vertices, it works on weight or the distance between the nodes.

Option D- Since for this types of case Floyd-Worshall algorithm is used. 

 

so, option c is the correct answer.

Related questions

1 votes
1 votes
2 answers
1
4 votes
4 votes
6 answers
3
soujanyareddy13 asked May 12, 2021
1,923 views
The Boolean expression $AB+A \overline{B}+\overline{A}C+AC$ is unaffected by the value of the Boolean variable _________.$A$$B$$C$$A, B$ and $C$