Question: Question 3 . ( 1 5 marks ) We are given a directed graph G = ( V , E ) , nodes s ,

Question 3.(15 marks) We are given a directed graph G=(V,E), nodes s,tinV, and an edge weight
function wt such that wt(e)0 for every einE. In addition, we are given a set E' of potential edges,
i.e., pairs of nodes that are not edges in E; and for each e'inE' we are given a non-negative weight wt(e').
We want to choose a single potential edge in E' that, if added to the graph, reduces as much as possible
the weight of a shortest st path. (If there is no potential edge whose addition to G reduces the weight
of the shortest st path, we can choose any potential edge.)
Describe an algorithm that solves this problem in O(k+(m+n)logn) time, where n=|V|,m=|E|,
and k=|E'|. Assume that the graph is given in adjacency list form, and the set of potential edges (and
their associated weights) is given as a list. Your algorithm must be by reduction of the given problem to
the shortest-path problem, and using Dijkstra's algorithm to solve that. ?1 Justify the correctness of your
algorithm and analyze its running time.
Question 3 . ( 1 5 marks ) We are given a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!