Consider the recursive algorithm in Figure 10.80 for finding the shortest weighted path in an acyclic graph,

Question:

Consider the recursive algorithm in Figure 10.80 for finding the shortest weighted path in an acyclic graph, from s to t.
Distance shortest( s,t ) Distance di, tmp; if( s == t ) return 0; de 00; for each Vertex v adjacent to s { tmp = shortes

a. Why does this algorithm not work for general graphs?
b. Prove that this algorithm terminates for acyclic graphs.
c. What is the worst-case running time of the algorithm?

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: