Graph Algorithms

Answer & solution
Answer: B (no official key was published)
Single-source Bellman-Ford detects a negative cycle reachable from that source by checking for a further relaxable edge after n−1 passes. A negative cycle in an unreachable component remains at infinite distance and need not be found. Therefore Q is true but P is not, giving B.
Bellman–Ford initializes only the source distance as finite. Vertices unreachable from it remain at infinity, so a disconnected negative cycle does not cause a finite relaxation. After |V|−1 passes, an additional successful relaxation among reachable vertices detects a reachable negative cycle. Therefore Q is true and P, which omits reachability, is false. Connecting a new super-source to every vertex would change the setup and allow global detection.