0

I´m stuck here with a question I cannot resolve. the question is why can´t this matrix be an undirected graph? [ [0,1,0], [1,1,1], [0,0,0] ] I was told by my teacher that it can´t be an undirected graph. I have to explain why but I really don´t know.

stu
  • 33
  • 2
  • 5

1 Answers1

0

The second node is connected to the third node. The third node is not connected to the second node. This is a one-way connection, which can only happen in directed graphs.

Basically, an undirected graph matrix is always a symmetric matrix - and your matrix is not symmetric.

Idan Arye
  • 12,402
  • 5
  • 49
  • 68
  • Great, thank you, but one last thing, how can I know which node is connected to which node? – stu Dec 10 '13 at 16:38
  • By the very definition of the matrix representation of graphs. Node `#i` is connected to node `#j` iff `M[i,j]`>0. – Idan Arye Dec 10 '13 at 16:44