1

If I have an unweighted directed multigraph where, for every edge going from node1 to node2, there is an edge going from node2 to node1, does that mean can be treated as un undirected graph?

To give context, I am modelling a metro system where between each connected station, there is a line where a train can go either way.

PS sorry about the title. Couldn't figure out a concise way to say it.

Ewan Brown
  • 143
  • 1
  • 9

1 Answers1

0

While these graphs will behave similarly, they have some fundamentally different properties. For example, consider a two-node graph with a single edge linking the two nodes. This graph has no simple cycles. However, when you convert it to a directed graph with edges going both ways, the graph now has a simple cycle formed by walking forwards and then backwards, since you’ve traversed two different edges in the process.

This doesn’t mean that representing the graph this way is a bad idea. It’s actually quite common to do this. What it does mean is that there are a few cases where the mathematical properties of the graphs will be different, particularly if you’re walking around one hop at a time and tracking which edges you’ve used.

templatetypedef
  • 362,284
  • 104
  • 897
  • 1,065