Basically graphs are of two types - 1. Directed graphs, 2. Undirected graphs.
Types of Graph
Basically
graphs are of two types -
1.
Directed graphs
2.
Undirected graphs.
In the
directed graph the directions are shown on the edges. As shown in the Fig.
5.6.1, the edges between the vertices are ordered. In this type of graph, the
edge E1 is in between the vertices V1 and V2.
The V1 is called head and the V2 is called the tail.
Similarly for V1 head the tail is V3 and so on.
We can
say E, is the set of (V1, V2) and not of (V2, V1).
Similarly
in an undirected graph, the edges are not ordered. Refer Fig. 5.6.2 for clear
understanding of undirected graph. In this type of graph the edge E1
is set of (V1, V2) or (V2, V1).
Data Structure: Unit IV : Multiway Search Trees and Graphs : Tag: : Data Structure - Types of Graph
Data Structure
CS3301 3rd Semester CSE Dept | 2021 Regulation | 3rd Semester CSE Dept 2021 Regulation