• edited by
216 views
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.

  1. tree
  2. cross
  3. back
  4. gray

 

1 Answer

1 1 vote
Solution : In DFS, if $d[u]<d[v]$, the edge $(u, v)$ is classified as a tree edge.
Answer:
Position:
Show:

Related questions

2 2 votes
1 1 answer
457
457 views
GO Classes asked Oct 16, 2024
457 views
Consider the given two statements.$\mathrm{S} 1:$ Depth-first search is asymptotically faster than breadth-first search.$\mathrm{S} 2:$ Deleting an element from a binary ...
3 3 votes
3 3 answers
679
679 views
GO Classes asked Oct 16, 2024
679 views
Consider the given graph $\text{G}.$ Traversal trees $\text{T1}$ and $\text{T2}$ (given below) are made by DFS or BFS traversals starting from s..Which of the following i...
0 0 votes
2 2 answers
255
255 views
GO Classes asked Oct 16, 2024
255 views
Which of the following is/are TRUE ?If we perform DFS on an undirected graph, there are no cross edges.If the DFS tree has no back edges, then there are no cycles in the ...
1 1 vote
1 1 answer
332
332 views
GO Classes asked Oct 16, 2024
332 views
Which of the following is correct option about $\mathrm{S} 1$ and $\mathrm{S} 2?$$\mathrm{S} 1:$ If $\text{G}$ is a weighted graph with $n$ vertices and $m$ edges that do...