Question: Consider a digraph and a source vertex s with the following properties: edges that leave the source vertex s have arbitrary (possibly negative) edge weights;
Consider a digraph and a source vertex s with the following properties: edges that leave the source vertex s have arbitrary (possibly negative) edge weights; all other edge weigh are nonnegative, and there are no edges from any other vertex to the sources. Does Dijkstra's shortest-path algorithm correctly compute SPT from s in this digraph? Select your answer form the following choices, and briefly explain your answer.
a) Maybe, maybe not (depends on the digraph)
b) Never
c) Always
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
