Question

(a) (15 pts) Do a DFS starting at E, assuming vertices are to be considered in alphabetical order. List each vertex along wit

0 0
Add a comment Improve this question Transcribed image text
Answer #1

a) Applying DFS at E A - - Note: xly x discovery time 45 6 12 y: finish time -03 All thick lines are tree edges. No back edge

Add a comment
Know the answer?
Add Answer to:
(a) (15 pts) Do a DFS starting at E, assuming vertices are to be considered in...
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
  • Show the operation of depth-first search (DFS) on the graph of Figure 1 starting from vertex...

    Show the operation of depth-first search (DFS) on the graph of Figure 1 starting from vertex q. Always process vertices in alphabetical order. Show the discovery and finish times for each vertex, and the classification of each edge. (b) A depth-first forest classifies the edges of a graph into tree, back, forward, and cross edges. A breadth-first search (BFS) tree can also be used to classify the edges reachable from the source of the search into the same four categories....

  • Q2. Show the execution trace of DFS on the following directed graph. You must show discovery...

    Q2. Show the execution trace of DFS on the following directed graph. You must show discovery time v.d, finish time v.f, and the v.color for each node as the algorithm progresses. Indicate all tree edges, back edges, forward edges, and cross edges when the final DFS forest is constructed. Assume that the edges going out from a vertex are processed in alphabetical order and that each adjacency list is ordered alphabetically.

  • Draw the DFS search tree with starting vertex E and break ties alphabetically. Assuming unit edge...

    Draw the DFS search tree with starting vertex E and break ties alphabetically. Assuming unit edge length (i.e., ignore edge weight), draw the BFS search tree with starting vertex E and break ties alphabetically. Suppose the Dijkstras algorithm is run on the graph with starting vertex E: (i) draw a table showing the intermediate distance values of all vertices at each iteration of the algorithm; (ii) show the final shortest-path tree.

  • 3. (8 points-7+1) Figure 4 shows an undirected graph G. Assume that the adjacency list lists the ...

    3. (8 points-7+1) Figure 4 shows an undirected graph G. Assume that the adjacency list lists the edges in alphabetical order. Figure 3: Graph for P3 (a) Apply depth first search (DFS) to graph G, and show the discovery and finish times of each vertex. In the main-loop of DFS, check the vertices in alphabetical the form dsc/fin, where dsc is the discovery time and fin is the finish time. (b) Draw the DFS tree obtained. 3. (8 points-7+1) Figure...

  • ignore red marks. Thanks 10. (16) You will compute the strongly connected components of this graph...

    ignore red marks. Thanks 10. (16) You will compute the strongly connected components of this graph in three steps. a. STRONGLY-CONNECTED-COMPONENTS (G) (7) Perform a depth-first search on call DFS(G) to compute finishing times w/ for each vertex the following graph. (To make 2 compute GT this easier to grade, everyone call DFS(GT), but in the main loop of DFS, consider the vertices in order of decreasing wf (as computed in line 1) please start with vertex "a" and 4...

  • Execute DFS on the graph below, starting in node a. Whenever you have a choice which...

    Execute DFS on the graph below, starting in node a. Whenever you have a choice which vertex to visit next, choose the next vertex in the adjacency list of the vertex (e.g., when you have reached node e, you must first try to visit node f, then g, and then . Indicate the outcome of the algorithm by labeling the edges of the graph either as T (tree edge) F (forward edge), B (back edge), or C (cross edge). Label...

  • Please help me with 2 (c), thank you!!! Figure 2: 4 10 Figure 3:1 4 Problems 1. Trace BFS on the following graphs. For...

    Please help me with 2 (c), thank you!!! Figure 2: 4 10 Figure 3:1 4 Problems 1. Trace BFS on the following graphs. For each vertex, record its color, parent, and distance fields, draw the resulting BFS tree, and determine the order in which vertices are added to the Queue. Process adjacency lists in ascending numerical order. a. The graph in figure 1, with 1 as the source. b. The directed graph in figure 2 with 1 as source. 2....

  • Consider the following directed graph for each of the problems: 1. Perform a breadth-first search on...

    Consider the following directed graph for each of the problems: 1. Perform a breadth-first search on the graph assuming that the vertices and adjacency lists are listed in alphabetical order. Show the breadth-first search tree that is generated. 2. Perform a depth-first search on the graph assuming that the vertices and adjacency lists are listed in alphabetical order. Classify each edge as tree, back or cross edge. Label each vertex with its start and finish time. 3. Remove all the...

  • Consider the graph at right. 17 15 [a] In what order are the vertices visited using...

    Consider the graph at right. 17 15 [a] In what order are the vertices visited using DFS 319 1 starting from vertex a? Where a choice exists, use alphabetical order. What if you use BFS? [b A vertex x is "finished" when the recursive call DFS (x) terminates. In what order are the vertices finished? (This is different from the order in which they are visited, when DFS (x) is called.) [c] In what order are edges added to the...

  • Give the adjacency matrix representation and the adjacency lists representation for the graph G_1. Assume that...

    Give the adjacency matrix representation and the adjacency lists representation for the graph G_1. Assume that vertices (e.g., in adjacency lists) are ordered alphabetically. For the following problems, assume that vertices are ordered alphabetically in the adjacency lists (thus you will visit adjacent vertices in alphabetical order). Execute a Breadth-First Search on the graph G_1, starting on vertex a. Specifiy the visit times for each node of the graph. Execute a Depth-First Search on the graph G_1 starting on vertex...

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