Unformatted text preview: will necessarily compute an incorrect result for some δ (s, v ).
Solution: False. The negativeweight cycle has to be reachable from s. (k) T F [2 points] In a weighted directed graph G = (V, E, w) containing no zero or
positiveweight cycles, BellmanFord can ﬁnd a longest (maximumweight) path
from vertex s to vertex t.
Solution:
(l) T F True. Negate the weights. [2 points] In a weighted directed graph G = (V, E, w) containing a negativeweight cycle, running the BellmanFord algorithm from s will ﬁnd a shortest
acyclic path from s to a given destination vertex t.
Solution: False. BellmanFord will terminate, and can detect the presence of
that negativeweight cycle, but it can’t “route around it.” (You could always
remove an edge to break the cycle and try again, though.) (m) T F [2 points] The bidirectional Dijkstra algorithm runs asymptotically faster than
the Dijkstra algorithm. 2 6.006 Quiz 2 Solutions Name Solution: False. The constant factor behind bidirectional Dijkstra is better, but
the worstcase running time is the same.
(n) T F [2 points] Given a weighted directed graph G = (V, E, w) and a shortest path p
from s to t, if we doubled the weight of eve...
View
Full
Document
This document was uploaded on 03/17/2014 for the course ELECTRICAL 6.006 at MIT.
 Fall '11
 ErikDemaine

Click to edit the document details