MathJax


Saturday, March 25, 2023

2023-203

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

  1. a(1,14); b(2,13); c(3,12); d(4,11); e(5,10); f(6,7); g(5,8)
  2. a(1,14); b(2,13); c(3,12); d(4,11); e(5,7); f(6,9); g(8,10)
  3. a(1,14); b(2,13); c(3,12); d(4,11); e(5,10); f(7,8); g(6,9)
  4. a(1,14); b(2,13); c(3,12); d(4,11); e(5,8); f(6,7); g(9,10)
  5. None of the above
Original idea by: Thaysa Bello

No comments:

Post a Comment

2026-341

  In the study of Network Flow, the Ford-Fulkerson algorithm relies on constructing a Residual Network     from an original flow network    ...