Edge classification (16/08/2024)

After running a DFS algorithm in a directed graph, the following table represents the start and end time of each node.


Node

Start time

End time

A

1

10

B

8

9

C

2

7

D

3

4

E

5

6

 

Select the correct alternative about the edges:

 

a) The edge A -> C is a backward edge

b) The edge D -> E is a forward edge

c) The edge B -> C is a cross edge

d) The edge E-> D is a forward edge

e) None of the above

Original idea by: João Vitor  

Comentários

  1. Very good question. However, the reader is unsure about which edges exist in the graph. If edge B -> C exists, it will certainly be a cross edge, so alternative (c) would be correct. However, it may not exist, in which case the correct answer would be (e). This ambiguity forces me to discard your question.

    ResponderExcluir

Postar um comentário

Postagens mais visitadas deste blog

Graph Teory (23/08/2024)

BFS (06/09/2024)