MathJax


[MO412] Question 2

Assume you only know two graph traversal algorithms: Depth-First Search (DFS) and Breadth-First Search (BFS). Given the following directed graphs, choose the alternative that correctly states, in order, which algorithm reaches NODE H first (least amount of movements). Every traversal must start from NODE A. Also, the list of nodes is ordered alphabetically.

a. BFS, BFS, DFS
b. BFS, BFS, DFS
c. DFS, DFS, BFS
d. DFS, DFS, DFS
e. None of the above.

Original idea by: Vitor Antônio Pimenta Silva

Comentários

  1. Nice question, but I'm afraid readers will have some doubts. For instance, what is a movement in a search? You ask for the least amount of movements. Perhaps a movement is a visit to a new node? Or revisiting an old nodes also counts? What happens when both BFS and DFS use the same amount of movements to reach H from A? I decided to discard it because of that.

    ResponderExcluir

Postar um comentário

Postagens mais visitadas deste blog

[MO412] Question 1

[MO412] Question 4