What is the difference between a directed and undirected graph

后端 未结 7 1176
花落未央
花落未央 2021-02-05 06:02

What is the difference between these fundamental types?

In drawings I see that the directed has arrows, but what exactly is meant by these arrows in the directed graph a

7条回答
  •  情歌与酒
    2021-02-05 06:57

    All of the answers so far are right. Typically, a graph is depicted in diagrammatic form as a set of dots for the vertices, joined by lines or curves for the edges. The edges may be directed (asymmetric) or undirected (symmetric).

    Imagine if the vertices represent people at a party. If there is an edge between the two people if they shake hands, then this is an undirected graph, because if person A shook hands with person B, then person B also shook hands with person A.

    On the other hand, if the vertices represent people at a party, and there is an edge from person A to person B when person A knows of person B, then this graph is directed, because knowing of someone is not necessarily a symmetric relation.

提交回复
热议问题