Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Let G = (V, E) be a simple directed graph in which every vertex u has a real weight wu). For each vertex u, let

image text in transcribed
Let G = (V, E) be a simple directed graph in which every vertex u has a real weight wu). For each vertex u, let MinWeight(u) = min{w(2): reach()}, where reach() is the set of vertices v EV 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 x, y V are in the same strongly connected component in G, then Min Weight(x) = MinWeight(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 MinWeight(u) for each vertex u EV). Explain your answer, prove correctness of your algorithm and give arguments about its running time. Let G = (V, E) be a simple directed graph in which every vertex u has a real weight wu). For each vertex u, let MinWeight(u) = min{w(2): reach()}, where reach() is the set of vertices v EV 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 x, y V are in the same strongly connected component in G, then Min Weight(x) = MinWeight(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 MinWeight(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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine Ricardo

2nd Edition

1449606008, 978-1449606008

More Books

Students also viewed these Databases questions

Question

=+ Are ballots compulsory?

Answered: 1 week ago