Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started