Question: Question 3 . ( 1 5 marks ) We are given a directed graph G = ( V , E ) , nodes s ,
Question marks We are given a directed graph nodes tinV, and an edge weight
function wt such that for every einE. In addition, we are given a set of potential edges,
ie pairs of nodes that are not edges in ; and for each we are given a nonnegative weight
We want to choose a single potential edge in that, if added to the graph, reduces as much as possible
the weight of a shortest path. If there is no potential edge whose addition to reduces the weight
of the shortest path, we can choose any potential edge.
Describe an algorithm that solves this problem in time, where
and 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 shortestpath problem, and using Dijkstra's algorithm to solve that. Justify the correctness of your
algorithm and analyze its running time.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
