retagged by
582 views
0 votes
0 votes

Which of the following statements is true?

  • Adding a constant to every edge weight in a directed graph can change the set of edges that belongs to minimum cost spanning tree. Assume unique weights.
  • Complete graph with 4 vertices, each edges having same weights can have maximum 28 minimum cost spanning tree.
  • Rerunning Dijkstra’s algorithm on a graph V times will result in the correct shortest paths tree, even if there are negative edges (but no negative cycles).
  • None of these

how is 3rd wrong? If there is no negative cycles dijkstra can work just fine right?

retagged by

1 Answer

0 votes
0 votes
No. Dijkstra may give incorrect result if negative edges are present.

Then we use Bellman-Ford, and it may fail in case of negative edge weight cycles.

Related questions

0 votes
0 votes
1 answer
1