Question: 2 PROBLEM 2 - Simulating DFS. Suppose we launch depth-first search from vertex e in the graph on the previous page. Your Job: simulate this

 2 PROBLEM 2 - Simulating DFS. Suppose we launch depth-first search

2 PROBLEM 2 - Simulating DFS. Suppose we launch depth-first search from vertex e in the graph on the previous page. Your Job: simulate this run of DFS Rule The behavior of DFS depends on the order in which the outgoing edges of a vertex are examined. For this problem, you must follow this rule When we examine the neighbors of a vertex u, we examine them in alphabetical order -- i.e., in exactly the order they are listed in the adjacency list data structure you created in (1D) Your Report: To summarize the result of your simulation, give the following information (clearly labeled) A. Order of Discovery: The vertices reachable from e will be discovered in some order. We will get you started: vertex e will be discovered first. Your Job: List the order in which the vertices are discovered (your answer will just be a list of all of the vertices; this list starts with e) Edge Types: For this problem, we are interested in two types of edges: B. o "DFS Tree Edges" - these are edges that are "traversed" during DFS - i.e., when a neighboring vertex is labeled as UNDISCOVERED, we recursively explore from that vertex (and we "traverse" that edge) marked as "ACTIVE" (or "GREY") label each DFS Tree Edge clearly with a big "T" and o "Back Edges" -- these are edges that, when examined, the destination vertex is Your Job: Redraw the graph in the same form as given on the previous page and . label each Back Edge with a big"B

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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!