Let G = (V, E) be a directed graph in which each vertex u V is

Question:

Let G = (V, E) be a directed graph in which each vertex u  ¬ V is labeled with a unique integer L(u) from the set {1, 2,..., |V|}. For each vertex u ¬ V, let R(u) = (v ε V : u → v) be the set of vertices that are reachable from u. Define min(u) to be the vertex in R(u) whose label is minimum, i.e., min(u) is the vertex v such that L(v) = min {L(w) : w ¬ R(u)}. Give an O (V + E)-time algorithm that computes min(u) for all vertices u ¬ V.
Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: