2. This question concerns the graph G shown below. (a) Mark the spanning tree for G...
2. This question concerns the graph G shown below. (a) Mark the spanning tree for G obtained by performing a depth-first search starting at the vertex A, and using the convention that nearby vertices should be explored in a counter-clockwise fasion, beginning with east; so E comes first, then NE, then N, ... (b) Mark the spanning tree for G obtained by performing a breadth-first search starting at the vertex A, and using the convention that nearby vertices should be...
2. This question concerns the graph G shown below. (a) Mark the spanning tree for G obtained by performing a depth-first search starting at the vertex E, and using the convention that nearby vertices should be explored in a counter-clockwise fasion, beginning with east; so E comes first, then NE, then N, ... (b) Mark the spanning tree for G obtained by performing a breadth-first search starting at the vertex E, and using the convention that nearby vertices should be...
7.[6] Consider the graph G below: a.[3] Find a Depth-First Search tree T for the above graph starting with the vertex 0. Show all the vertices as they are discovered in sequence starting from 1 to the last vertex included in T. b.[3] Find a Breadth-First Search tree T for the above graph starting with the vertex 0. Show all the vertices as they are discovered in sequence starting from 1 to the last vertex included in T.
Question II - Graph Traversal and Minimum Spanning Trees [40 Points] Consider the following graph: B 10 1 4 1 H 9 4 a) Traverse the graph starting from vertex A, and using the Breadth-First Search algorithm. Show the traversal result and the data structure you are using. [10 Points] b) Traverse the graph starting from vertex A, and using the Depth-First Search (Post-order) algorithm. Show the traversal result and the data structure you are using. [10 Points] c) Apply...
Solve (a) and (b) using BFS and DFS diagram BFS Given an undirected graph below (a) Show the shortest distance to each vertex from source vertex H and predecessor tree on the graph that result from running breadth-finst search (BFS).Choose adjacen vertices in al phabetical order b) Show the start and finsh time for each vertex, starting from source vertex H, that result from running depth-first search (DFS)Choose aljacent vertices in alphabet- ical order DFS BFS Given an undirected graph...
BFS Given an undirected graph below (a) Show the shortest distance to each vertex from source vertex H and predecessor tree on the graph that result from running breadth-finst search (BFS).Choose adjacen vertices in al phabetical order b) Show the start and finsh time for each vertex, starting from source vertex H, that result from running depth-first search (DFS)Choose aljacent vertices in alphabet- ical order DFS BFS Given an undirected graph below (a) Show the shortest distance to each vertex...
discrete 2 question 31 For Esercises 25.28, write the nodes in a breadth first search of the graph for Exercises 21 the node specified 25、 26, g 20. In the computer network in the accompanying figure, the same message is to be broade Dribe ( 21-24 28. e 27. to nodes 4.Е. F and G. One way to do this is to find the shortest path from C to send out multiple copies of the same message. A more etficient...
Let G= (V, E) be a connected undirected graph and let v be a vertex in G. Let T be the depth-first search tree of G starting from v, and let U be the breadth-first search tree of G starting from v. Prove that the height of T is at least as great as the height of U
5. Consider the graph G and spanning tree T drawn below. Alice says that T is a BFS tree for G. Bob says that T is a DFS tree for G. Both are correct! Identify a vertex, X that can be the root of T as a BFS, and a vertex, Y, that can be the root of T as a DFS. For full credit, also show why each other vertex cannot be correct. T T C с f g