Let G = (V, E) be a weighted, directed graph with no negative-weight edges. Let s
Question:
Let G = (V, E) be a weighted, directed graph with no negative-weight edges. Let s ∈ V be the source vertex, and suppose that we allow v.π to be the predecessor of ν on any shortest path to ν from source s if ν ∈ V – {s} is reachable from s, and NIL otherwise. Give an example of such a graph G and an assignment of π values that produces a cycle in Gπ. (By Lemma 24.16, such an assignment cannot be produced by a sequence of relaxation steps.)
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Introduction to Algorithms
ISBN: 978-0262033848
3rd edition
Authors: Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest
Question Posted: