-1

Regarding weighted graphs:

If there is a weight 3 from A->B and a weight 1 from B->A, does this mean that there are 2 edges between A and B? I'm 95% sure that the answer is yes, but I'd like to be certain. I'm trying to see if directed graphs with weight schemes like this are automatically multigraphs.

Thanks for your valuable input!

Marcus

Marcus Kim
  • 283
  • 2
  • 12
  • I just realized, are you asking if the edge weight of 1 from B->A cancels out one unit of the edge weight from A->B bringing the total weight down to 2? If so, that is not the case. –  Apr 04 '18 at 03:13
  • @ConfusedByCode: I think, no. He seems to just figuring out the scenario when a directed graph is called a multigraph. – harmands Apr 04 '18 at 03:19

2 Answers2

2

As noted here

A graph with one edge from A to B and one edge from B to A, will simply be called a directed graph, but if we would have a directed graph with multiple edges from A to B, it will be called as multigraph or specifically, in our case, multidigraph.

enter image description here

Like, in the diagram(taken from same link).

In the first graph, there is no case when we have two edges from same origin and destination, so its a normal directed graph. But in case of second graph, there are two edges from e to d and from b to c. Thus, making it a multidigraph.

harmands
  • 1,082
  • 9
  • 24
1

There are 2 edges between A and B, but they are not the same edge in a directed graph. There is the edge from A to B (A->B) and the edge from B to A (B->A). This does not make the graph a multigraph because those are two distinct edges.

In an undirected multigraph the source and destination nodes do not matter. The edges would no longer be (A->B) and (B->A) . They would simply each become (A, B) indicating an edge between A and B exists. If more than one edge connects any two nodes in an undirected graph, the graph becomes a multigraph.

A Direcited Multigraph must have multiple edges with the same source and destination. If there were multiple edges from A to B, then it would be a directed multigraph. However, you list two distinct directed edges. (A->B) and (B->A). These edges are not identical and so the graph you describe is not a multigraph.