Question

Problem 3 (15 points). Let G (V,E) be the following directed graph. a. 1. Draw the reverse graph G of G. 2. Run DFS on G to o
0 0
Add a comment Improve this question Transcribed image text
Answer #1

3.

The reverse of the graph G is pre: 3 post4 pre: 2 1)G 2) re 0 postl pre: 6 d post7 pre: 5 post8 pre: 10 post11 Running DFS on

Add a comment
Know the answer?
Add Answer to:
Problem 3 (15 points). Let G (V,E) be the following directed graph. a. 1. Draw the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Let G (V, E) be a directed graph with n vertices and m edges. It is known that in dfsTrace of G t...

    Let G (V, E) be a directed graph with n vertices and m edges. It is known that in dfsTrace of G the function dfs is called n times, once for each vertex It is also seen that dfs contains a loop whose body gets executed while visiting v once for each vertex w adjacent to v; that is the body gets executed once for each edge (v, w). In the worst case there are n adjacent vertices. What do...

  • Problem 3 (15 points) Consider the graph shown on the right. Find the strongly connected componen...

    Problem 3 (15 points) Consider the graph shown on the right. Find the strongly connected components of the graph. For full credit, a) (6 points) Run DFS on the reverse graph, showing the discovery and finish times of each 10 vertex. b) (6 points) Run DFS again, to discover the strongly connected components. What is the 15 order the components are discovered? 12 c) (3 points) Draw the DAG of the components. What is the minimum number of edges that...

  • (Problem R-14.16, page 678 of the text) Let G be a graph whose vertices are the...

    (Problem R-14.16, page 678 of the text) Let G be a graph whose vertices are the integers 1 through 8, and let the adjacent vertices of each vertex be given by the table below: Vertex                             adjacent vertices      1                                         (2,3,4)      2                                         (1,3,4)      3                                         (1,2,4)      4                                         (1,2,3,6)      5                                         (6,7,8)      6                                         (4,5,7)      7                                         (5,6,8)      8                                         (5,7) Assume that, in a traversal of G, the adjacent vertices...

  • Exercise 3 (35 points) Depth-First Search Consider the following graph G=(V,E): a) Complete V= {z, ....)...

    Exercise 3 (35 points) Depth-First Search Consider the following graph G=(V,E): a) Complete V= {z, ....) (Fill in the blanks. Sort V alphabetically in reverse z–a) b) Complete E = {(zz), ...} c) Complete the adjacency list as a table {sort Adiſul alphabetically in reverse zna} Vertices u Adj[u] {z, } y d) Execute Depth-First Search (DFS(G)) on Graph G. Respect the order of the adjacency list as completed in the previous question. Show all figures (a) through (p) just...

  • Let G -(V, E) be a graph. The complementary graph G of G has vertex set V. Two vertices are adjacent in G if and only if they are not adjacent in G. (a) For each of the following graphs, describe its...

    Let G -(V, E) be a graph. The complementary graph G of G has vertex set V. Two vertices are adjacent in G if and only if they are not adjacent in G. (a) For each of the following graphs, describe its complementary graph: (i) Km,.ni (i) W Are the resulting graphs connected? Justify your answers. (b) Describe the graph GUG. (c) If G is a simple graph with 15 edges and G has 13 edges, how many vertices does...

  • Help with Q3 please! 3 (9 pts) For the graph G (VE) in question 2 (above),...

    Help with Q3 please! 3 (9 pts) For the graph G (VE) in question 2 (above), construct the adjacency lists for G (using alphabetical ordering) and the corresponding reverse graph GR Adjacency list for G (alphabetical ordering): Adjacency list for G. V = {A, B, C, D, G, H, S) V - {A, B, C, D, G, H, S) E A = { EB = EC) - E[D] = {C,G) E[G] - [ ECH - E[S { EA = {...

  • Problem 1: Dynamic Programming in DAG Let G(V,E), |V| = n, be a directed acyclic graph...

    Problem 1: Dynamic Programming in DAG Let G(V,E), |V| = n, be a directed acyclic graph presented in adjacency list representation, where the vertices are labelled with numbers in the set {1, . . . , n}, and where (i, j) is and edge inplies i < j. Suppose also that each vertex has a positive value vi, 1 ≤ i ≤ n. Define the value of a path as the sum of the values of the vertices belonging to...

  • Problem #1 Let a "path" on a weighted graph G = (V,E,W) be defined as a...

    Problem #1 Let a "path" on a weighted graph G = (V,E,W) be defined as a sequence of distinct vertices V-(vi,v2, ,%)-V connected by a sequence of edges {(vi, t), (Ug, ta), , (4-1,Un)) : We say that (V, E) is a path from tovn. Sketch a graph with 10 vertices and a path consisting of 5 vertices and four edges. Formulate a binary integer program that could be used to find the path of least total weight from one...

  • (a) Given a graph G = (V, E) and a number k (1 ≤ k ≤...

    (a) Given a graph G = (V, E) and a number k (1 ≤ k ≤ n), the CLIQUE problem asks us whether there is a set of k vertices in G that are all connected to one another. That is, each vertex in the ”clique” is connected to the other k − 1 vertices in the clique; this set of vertices is referred to as a ”k-clique.” Show that this problem is in class NP (verifiable in polynomial time)...

  • Reachability. You are given a connected undirected graph G = (V, E ) as an adjacency...

    Reachability. You are given a connected undirected graph G = (V, E ) as an adjacency list. The graph G might not be connected. You want to fill-in a two-dimensional array R[,] so that R[u,v] is 1 if there is a path from vertex u to vertex v. If no such path exists, then R[u,v] is 0. From this two-dimensional array, you can determine whether vertex u is reachable from vertex v in O(1) time for any pair of vertices...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT