What is the difference between a directed and undirected graph

后端 未结 7 1191
花落未央
花落未央 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:41

    A directed graph is a graph in which edges have orientation (given by the arrowhead). This means that an edge (u, v) is not identical to edge (v, u). An example could be nodes representing people and edges as a gift from one person to another.

    An undirected graph is a graph in which edges don't have orientation (no arrowhead). This means that an edge (u, v) is identical to edge (v, u). An example for this type of graph could be nodes representing cities and edges representing roads between cities.

    0 讨论(0)
  • 2021-02-05 06:51

    A graph in which every edge is directed is called a Directed graph, and a graph in which every edge is undirected is called undirected graph.

    0 讨论(0)
  • 2021-02-05 06:53

    In a directed graph, there is direction but in un-directed graph there is no direction.

    Think in in terms of city network , where City A-> City B represents one way from City A to City B which means you can travel from City A to City B (may be through this path). It's an example of directed graph City c - City D represents the un-directed graph where you can travel in any direction

    0 讨论(0)
  • 2021-02-05 06:55

    The difference is the same as between one directional and bidirectional streets - in directed graph, the direction matters and you can't use the edge in the other direction. An undirected graph can be simulated using a directed graph by using pairs of edges in both directions.

    0 讨论(0)
  • 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.

    0 讨论(0)
  • 2021-02-05 07:02

    Imagine graphs as a set of pumps( the circles) which can send liquid to others when are connected.In directed graphs the arrow show from where it comes and where the liquid (data) goes and in undirected graph it goes from both ways.Also a directed graph can have multiple arrows between two vertices(the pumps ) depending always on the graph.

    0 讨论(0)
提交回复
热议问题