0 0 votes Consider performing a depth-first search (DFS) on an undirected and unweighted graph $G$ starting at vertex $s$. For any vertex $u$ in $G, d[u]$ is the length of the shortest path from $s$ to $u$. Let $(u, v)$ be an edge in $G$ such that $d[u]<d[v]$. If the edge $(u, v)$ is explored first in the direction from $u$ to $v$ during the above DFS, then $(u, v)$ becomes a _______ edge.treecrossbackgray Algorithms goclasses_da_dsa_tw6 goclasses algorithms graph-algorithms one-mark + – GO Classes 216 views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
1 1 vote Solution : In DFS, if $d[u]<d[v]$, the edge $(u, v)$ is classified as a tree edge. GO Classes answered Oct 16, 2024 GO Classes comment Share Follow See 1 comment 1 1 comment reply Ajay Sreenivas commented Jan 17, 2025 reply Follow flag If d[u] < d[v] (u,v) can also be back edge right? From u let us say we can reach 2 vertices and one of them is v. Then we can choose u->v first or another path. since in the question it is said that edge (u,v) is explored first it will become tree edge. If we have chosen the other path first and we can reach v from the other path also, then (u,v) can become back edge. correct me if I am wrong. 0 0 replyShare Please log in or register to add a comment.