Solution false the negative weight cycle has to be

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: will necessarily compute an incorrect result for some δ (s, v ). Solution: False. The negative-weight 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 positive-weight cycles, Bellman-Ford can find a longest (maximum-weight) 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 Bellman-Ford algorithm from s will find a shortest acyclic path from s to a given destination vertex t. Solution: False. Bellman-Ford will terminate, and can detect the presence of that negative-weight 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 worst-case 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.

Ask a homework question - tutors are online