185k views
3 votes
Professor Gaedel has written a program that he claims implements Dijkstra’s algorithm. The program produces v.d and v.Π for each vertex v  V . Give O(V+E)- time algorithm to check the output of the professor’s program. It should determine whether the d and Π attributes match those of some shortest-paths tree. You may assume that all edge weights are nonnegative.

User Athap
by
5.6k points

1 Answer

4 votes

Answer:D

Step-by-step explanation:

because it is

User Nowayz
by
6.1k points