GATE CSE
First time here? Checkout the FAQ!
x
0 votes
89 views

asked in Algorithms by Boss (6k points)   | 89 views

If i remove edge b/w B and E the graph is acyclic.

then apply DFS starts from vertex A.

A-B-C-E-D.

It results two back edges D-C and E-B.

most cases it results only one back edge and in certain case like above it results two also.

Hence it results multiple back edges.

bt d-c is nt back edge it is cross edge
If some node is previously visited and we visit that node again then that edge is the back edge.
yes.bro.

i missed it

Once u refer Coreman text book for DFS traversal,then u can easily understand.

parent node time intervals are u/v

and child is x/y then backside lies in b/w parent.i.e)u<=x<=y<=v   // condition for back edges.

so,whats the answer ..single or multiple??

1 Answer

0 votes

here is a result given in cormen book.....
A directed graph G is acyclic iff depth first search of G yields no back edges
i think b is correct
 

answered by Veteran (10.6k points)  


Top Users May 2017
  1. akash.dinkar12

    3146 Points

  2. pawan kumarln

    1608 Points

  3. sh!va

    1580 Points

  4. Arjun

    1326 Points

  5. Devshree Dubey

    1230 Points

  6. Angkit

    1028 Points

  7. Debashish Deka

    1012 Points

  8. Bikram

    970 Points

  9. LeenSharma

    810 Points

  10. srestha

    662 Points

Monthly Topper: Rs. 500 gift card
Top Users 2017 May 22 - 28
  1. pawan kumarln

    234 Points

  2. Ahwan

    118 Points

  3. jjayantamahata

    106 Points

  4. joshi_nitish

    106 Points

  5. Aditya GN

    63 Points


22,722 questions
29,048 answers
65,039 comments
27,510 users