Tree - is a hierarchical data structure of nodes.
Nodes are usually structured in the parent-child manner. However line joining two nodes has no significance.
Nodes are usually structured in the parent-child manner. However line joining two nodes has no significance.
Graph - similar to the tress except that line joining the nodes is also important (generally known as edge). In graph a edge could represent anything (time, distance etc possibilities are endless). i.e. In a train map line may represent the distance or time.
In plain words a scaled train map in the example of graph whereas same train map without scaling is the example of a tree.
In plain words a scaled train map in the example of graph whereas same train map without scaling is the example of a tree.
Moreover edges are broadly categorized in the two categories as follows:
1) Bi-directional graph, i.e. edges is bidirectional.
2) Unidirectional graph, ugh just opposite to bi-directional.
Nice! Maybe you could have added how the graph images themselves were created
ReplyDeleteAn edge in a directed graph ideally should be shown with only a single arrow head. To represent the 2-way (A to B and B to A), you must ideally add 2 separate directed edges - one pointing in each direction.
ReplyDelete