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. \begin{equation*} \begin{matrix} & 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 \end{matrix} \end{equation*}
  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

Comentários

  1. 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

Postar um comentário

Postagens mais visitadas deste blog

WEEK-04 (Optional)

WEEK-12 - Network Robustness