Entradas

Mostrando entradas de agosto, 2024

Question 2 - Graph Theory

Let G be a simple, undirected, and connected graph with n vertices. Consider the following statements: A. If (u, v) is a bridge in G, then at least one of the vertices u or v is a cut vertex. B. The maximum number of bridges that G can have is n-1. C. If G is a tree with more than 2 vertices and with f leaves, then the minimum number of edges that need to be added so that there are no bridges is ⌈f/2⌉. Select the alternative that identifies the incorrect statements: a) A and B b) B and C c) Only A d) Only C e) None of the above Original Idea by Sergio Sanchez

Question 1 - DFS

During a Depth-First Search (DFS) on a directed graph G, the following edges are observed: The edge (u, v) connects node u to node v, which has already been visited and fully explored. The edge (x, y) connects node x to node y, which has been visited but not fully explored yet. The edge (a, b) connects node a to node b, which has been fully explored, but b belongs to a different branch in the DFS tree. Which of the following options correctly classifies these edges according to their type in a DFS traversal? A) (u, v) is a forward edge, (x, y) is a back edge, (a, b) is a back edge. B) (u, v) is a cross edge, (x, y) is a forward edge, (a, b) is a tree edge. C) (u, v) is a forward or cross edge, (x, y) is a back edge, (a, b) is a cross edge. D) (u, v) is a back edge, (x, y) is a cross edge, (a, b) is a forward edge. E) (u, v) is a cross edge, (x, y) is a back edge, (a, b) is a tree edge. Original Idea by Sergio Sanchez