retagged by
440 views
0 votes
0 votes

Regarding the point 1 , please correct me if I am wrong - I knew Djisktra fails only if there is negative weight cycle. So , it is correct , right ?

Also , under the same condition , the algorithm might fall into a infinite loop .

retagged by

1 Answer

0 votes
0 votes

Dijkstra fails when there are negative weights and it will not go into infinite loop because Relaxation only happens E times. Bellman ford fails when there is a negative weight cycle.

Related questions

1 votes
1 votes
1 answer
1
Souvik33 asked Dec 19, 2022
708 views
If a -ve weight cycle is reachable from source, the Dijkstra's algorithm gets into an infinite loop TRUEFALSE
2 votes
2 votes
1 answer
2
6 votes
6 votes
1 answer
3
vaishali jhalani asked Nov 5, 2016
3,040 views
What is the time complexity of Dijkstra’s algorithm if it is implemented using AVL Tree instead of Priority Queue over a graph G = (V, E)?
7 votes
7 votes
7 answers
4
Aspi R Osa asked Jan 11, 2016
1,982 views
Acc. to dijkstra's algorithm:What will be the shortest path from A to B ?1) When the edge of length 15 is present.2) when the edge of length 15 is removed.