Question: 3. (12pt pts.) Reverse graph: Let G=(V.E) be an directed graph. The reverse of G is another directed graph, GR = (V.E*). In the vertices

 3. (12pt pts.) Reverse graph: Let G=(V.E) be an directed graph.

3. (12pt pts.) Reverse graph: Let G=(V.E) be an directed graph. The reverse of G is another directed graph, GR = (V.E*). In the vertices are the same as in G, but the edges are reversed. In other words, ER = {(vu): (u,v) E E}. 1 (a) If G is stored in adjacency list format, give an O(VI+ El) time algorithm to create an adjacency list representation of G Argue why the running time is O(VI+EL). (b) If G is stored in adjacency matrix format, given a o(IV) time algorithm to create an adjacency matrix representation of G. Argue why the running time is 0(V1)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Lets address each part of the question a Adjacency List Representation To reverse a graph G G with a... 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 Databases Questions!