








Question 7) (type tree The correct answer for the given statement "In particular, edge (A,B) is or back edge)" is tree edge.
Tree edge Explanation: Performing DFS on the given graph starting from vertex A is as follows: • Begin with start vertex A and mark it as visited by changing the color from white to red.
Check for all unvisited adjacent vertexes of vertex A. The vertex B and E are adjacent to vertex A. Choose the vertex in alphabetical order. The vertex B comes before vertex E.
So, visit the vertex B and mark it visited by changing the color from to red. • The unvisited adjacent vertexes for B are C and E. Apply the alphabetical order, the vertex C comes before vertex E. So, visit the vertex C and mark it visited by coloring it red.
• Visit the vertex F, which is the only unvisited adjacent vertex of C.
Mark it as visited by coloring it red.
The unvisited adjacent vertexes for F are E and I. Apply the alphabetical order, the vertex E comes before vertex I. So, visit the vertex E and mark it visited by coloring it red.
We were unable to transcribe this image
• All the adjacent vertex of E are visited, backtrack to the vertex F.
Check for any unvisited adjacent vertex related to vertex F. Vertex I is the only unvisited adjacent vertex left, which is connected to vertex F. Visit the vertex I and mark it red in color.
Hence, edge (A,B) is a tree edge because edge AB is present in the tree obtained after applying DFS on the given graph. (type tree The correct answer for the given statement "In particular, edge (D,G) is or back edge)" is tree edge.
Tree edge
Explanation: Performing DFS on the given graph starting from vertex D is as follows: • Begin with start vertex D and mark it as visited by changing the color from white to red. • Check for all unvisited adjacent vertexes of vertex D. The vertex G and H are adjacent to vertex D. Choose the vertex in alphabetical order. The vertex G comes before vertex H.
So, visit the vertex H and mark it visited by changing the color from to red.
• Visit the vertex H, which is the only unvisited adjacent vertex of G. Mark it as visited by coloring it red. Hence, edge (D, G) is a tree edge because edge DG is present in the tree obtained after applying DFS on the given graph.
.