QUESTION 2 (15 pts): (Topological Sorting) Consider the following adjacency matrix of a graph G. 1 2 3 4 5 6. 7 8 9 1 2
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
QUESTION 2 (15 pts): (Topological Sorting) Consider the following adjacency matrix of a graph G. 1 2 3 4 5 6. 7 8 9 1 2
QUESTION 2 (15 pts): (Topological Sorting) Consider the following adjacency matrix of a graph G. 1 2 3 4 5 6. 7 8 9 1 2 1 1 3 1 1 1 1 5 6 1 1 7 8 1 1 a) Apply DFS (depth first search) starting at any node from which you can start. Draw the resulting tree or forest. b) Find a topological ordering of the nodes in G in case there is an order, if not then state why an order does not exist.