Question: Consider the two standard representations of directed graphs: the adjacency-list representation and the adjacency-matrix representation. Find a problem that can be solved more efficiently in

Consider the two standard representations of directed graphs: the adjacency-list representation and the adjacency-matrix representation. Find a problem that can be solved more efficiently in the adjacency-list representation than in the adjacency-matrix representation, and another problem that can be solved more efficiently in the adjacency-matrix representation than in the adjacency-list representation. [4 marks]

(b) Prove or disprove (by giving a counter-example) the following claim: If a directed graph G contains a path from a vertex u to a vertex v, then any depth-first search must result in v.d ? u.f, where .d is the discovery time and .f the finishing time. [4 marks]

(c) We are given an undirected, connected graph G = (V, E) with edge-weights w : E ? R + and a minimum spanning tree T of G. How would you update your minimum spanning tree T in each of the following three cases? Specify the runtime of your algorithm and give a proof that the returned tree is indeed a minimum spanning tree.

(i) We increase the weight of an edge e which is not in T. [3 marks]

(ii) We decrease the weight of an edge e which is in T. [3 marks]

(iii) We add a new edge e with weight w(e) to G. The weight w(e) is arbitrary, but for simplicity you may assume that after adding the edge e no two edges in G have the same weight. [6 marks]

Step by Step Solution

3.40 Rating (150 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The detailed answer for the above question is provided below a One problem that can be solved more efficiently in the adjacencylist representation is ... View full answer

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 Algorithms Questions!