WEEK-03
Given the following adjacency matrix that represents a directed graph, apply a topological sort using Depth First Search (DFS) and determine the start and finish times for each node. Start from node 'a' and always prioritize visiting nodes in alphabetical order.
- a(1,14); b(2,13); c(3,12); d(4,11); e(5,10); f(6,7); g(5,8)
- a(1,14); b(2,13); c(3,12); d(4,11); e(5,7); f(6,9); g(8,10)
- a(1,14); b(2,13); c(3,12); d(4,11); e(5,10); f(7,8); g(6,9)
- a(1,14); b(2,13); c(3,12); d(4,11); e(5,8); f(6,7); g(9,10)
- None of the above
Good question. I took it. Please state exactly what the 1's mean in your matrix, as it seems to be the reverse of what's in the book (e.g., a -> b or b -> a).
ResponderExcluir