Given the following adjacency matrix that represents a directed graph (a '1' in row \(x\) and column \(y\) means a directed link \(x \rightarrow y\)), 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\) | \(b\) | \(c\) | \(d\) | \(e\) | \(f\) | \(g\) | |
\(a\) | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
\(b\) | 0 | 0 | 1 | 0 | 1 | 0 | 0 |
\(c\) | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
\(d\) | 0 | 0 | 0 | 0 | 1 | 0 | 1 |
\(e\) | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
\(f\) | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
\(g\) | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
- 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
No comments:
Post a Comment