Question: Why does Johnsons algorithm add vertex s to V in its first step? Why not just use any existing vertex in the input graph? Explain,

Why does Johnson’s algorithm add vertex s to V in its first step? Why not just use any existing vertex in the input graph? Explain, and give an example of a directed graph for which Johnson’s algorithm would not work without adding a vertex s to V in the initial step.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Ans Johnsons algorithm is used for finding the shortest paths between all pairs of vertices in a wei... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Algorithms Questions!