This preview shows page 1. Sign up to view the full content.
Unformatted text preview: d, π values that satisfy Carrie’s checker but for which d[v ] �= δ (s, v ) for some v . (Hint: cyclic π values; unreachable vertices.) 2. How would you augment Carrie’s checker to ﬁx the problem you identiﬁed in (a)? 6 Handout 9: Quiz 2 Practice Problems 3. You are given a connected weighted undirected graph G = (V, E , w) with no negative weight cycles. The diameter of the graph is deﬁned to be the maximumweight shortest path in the graph, i.e. for every pair of nodes (u, v ) there is some shortest path weight δ (u, v ), and the diameter is deﬁned to be max{δ (u, v )}.
(u,v ) Give a polynomialtime algorithm to ﬁnd the diameter of G. What is its running time? (Your algorithm only needs to have a running time polynomial in E  and V  to receive full credit; don’t worry about optimizing your algorithm.) 4. You are given a weighted directed graph G = (V, E , w) and the shortest path distances δ (s, u) from a source vertex s to every other vertex in G. However, you are not given π (u) (the predecessor pointers). With this information, give an algorithm to ﬁnd a shortest path from s to a given vertex t in O(V + E ) time....
View
Full
Document
 Spring '08
 ErikDemaine
 Algorithms

Click to edit the document details