Pedro has been given several tasks to do. But instead of a list with the order of the tasks, his supervisor gave him a graph where edges that go from node A to B mean that task B depends on task A. Unfortunately, Pedro does not know how to take this information from the graph, so he doesn't know which tasks to do first. The graph his supervisor gave was:
As a specialist in graphs, you were chosen to help Pedro with ordering the tasks he needs to do. His supervisor said to him to always prioritize the task with a lesser index when he is able to select between free tasks. Knowing the constraints, which order should Pedro follow?
- 1, 2, 3, 4, 7, 6, 9, 10, 8, 5
- 5, 8, 10, 9, 6, 7, 4, 3, 2, 1
- 1, 5, 2, 6, 4, 8, 9, 7, 10, 3
- 1, 2, 6, 3, 4, 7, 9, 10, 8, 5
- None of the above.
Original idea by: Pedro Henrique Di Francia Rosso