In a graph, a "tree edge" is an edge that is present in the tree obtained after performing DFS on the graph. Suppose that \(k\) tree edges resulted from a depth-first traversal of an \(n\)-vertex, undirected graph. The number of the connected components in the graph can be calculated as:
- \( k-1 \)
- \( k \)
- \( n-k \)
- \( n-k+1 \)
- None of the above
Original idea by: Soroor Salavati
No comments:
Post a Comment