Question: Question 2 : Practice with DFS and BFS ( 1 0 points ) None of the questions below need explanations. They are all full -

Question 2: Practice with DFS and BFS (10 points)
None of the questions below need explanations. They are all full-credit or no-credit.
a. List the sequence of vertices visited by depth-first search, starting at the point A . When multiple vertices can be chosen to be visited at a given time, settle the tie by visiting the vertex that comes first alphabetically. Each vertex should be visited only once. An example (incorrect) answer should look like: (A, B, F, E,..., J, K)(3 points)
b. List the sequence of vertices visited by a breadth-first search, starting at the point A . When multiple vertices can be chosen to be visited at a given time, settle the tie by visiting the vertex that comes first alphabetically. Each vertex should be visited only once. (3 points)
c. Breadth-first search starting at A would mark A as depth 0. Any adjacent vertices will be marked with depth 1. The next wave would have depth 2, then 3, and so on. Redraw the graph above and mark each vertex with the depth from breadth-first search starting at A.(2 points)
d. What is the greatest possible depth of a vertex in the above graph if you are able to start breadth-first search from any point on the graph? (2 points)
Question 2 : Practice with DFS and BFS ( 1 0

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 Programming Questions!