Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 9 (3 points): Let G = (V, E) be a simple directed graph in which every vertex u has a real weight wu). For
Question 9 (3 points): Let G = (V, E) be a simple directed graph in which every vertex u has a real weight wu). For each vertex u, let Min Weight(u) = min{W(): reach(u), where reach() is the set of vertices v E V reachable by a path in G from vertex u (that is, such that G has a (u, v)-path). (i) Show that if two vertices I, Y EV are in the same strongly connected component in G, then Min Weight() = Min Weight(y). (ii) Design an O(n+m)-time algorithm that for any directed acyclic graph G determines the minimum-weight vertex reachable from each vertex in G (that is, computes Min Weight(u) for all vertices u EV). Explain your answer, prove correctness of your algorithm and give arguments about its running time. (iii) Use (i) and (ii) to design an O(n+ m)-time algorithm that for any simple directed graph G in which every vertex u has a real weight wu) determines the minimum-weight vertex reachable from each vertex in G that is, computes Min Weight(u) for each vertex u EV). Explain your answer, prove correctness of your algorithm and give arguments about its running time. Question 9 (3 points): Let G = (V, E) be a simple directed graph in which every vertex u has a real weight wu). For each vertex u, let Min Weight(u) = min{W(): reach(u), where reach() is the set of vertices v E V reachable by a path in G from vertex u (that is, such that G has a (u, v)-path). (i) Show that if two vertices I, Y EV are in the same strongly connected component in G, then Min Weight() = Min Weight(y). (ii) Design an O(n+m)-time algorithm that for any directed acyclic graph G determines the minimum-weight vertex reachable from each vertex in G (that is, computes Min Weight(u) for all vertices u EV). Explain your answer, prove correctness of your algorithm and give arguments about its running time. (iii) Use (i) and (ii) to design an O(n+ m)-time algorithm that for any simple directed graph G in which every vertex u has a real weight wu) determines the minimum-weight vertex reachable from each vertex in G that is, computes Min Weight(u) for each vertex u EV). Explain your answer, prove correctness of your algorithm and give arguments about its running time
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started